File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -203,10 +203,14 @@ process mask_beds {
203203
204204
205205// To make intersect files we need to combine them into one channel with
206- // toSortedList() (fermi is before manta in alphabet).
206+ // toList() and then sort in the map so that fermi is before manta in the
207+ // channel. We can't use toSortedList here since the full pathname is used
208+ // which includes the work directory (`3a/7c63f4...`).
207209masked_vcfs. tap { masked_vcfs }
208210 .filter( ~/ .*(manta|fermikit).*/ )
209- .toSortedList(). set { intersect_input }
211+ .toList()
212+ .map { n -> n[0 ] =~ / fermikit/ ? n : [n[1 ], n[0 ]] }
213+ .set { intersect_input }
210214
211215process intersect_files {
212216 input:
@@ -238,7 +242,8 @@ process intersect_files {
238242 | cut -f 1-8 \
239243 | sort -k1,1V -k2,2n > combined_masked_OTHER.vcf
240244
241- sort -k1,1V -k2,2n combined_masked_*.vcf >> combined_masked.vcf
245+ ( grep '^#' $fermi_vcf ; \
246+ sort -k1,1V -k2,2n combined_masked_*.vcf ) >> combined_masked.vcf
242247 """
243248}
244249
You can’t perform that action at this time.
0 commit comments