@@ -95,6 +95,7 @@ nextflow_process {
9595 path(process.out.vcf.get(0).get(1)).vcf.variantsMD5,
9696 path(process.out.vcf.get(0).get(1)).vcf.summary,
9797 path(process.out.vcf.get(0).get(1)).vcf.sampleCount,
98+ process.out.index,
9899 process.out.findAll { key, val -> key.startsWith("versions")}
99100 ).match() }
100101 )
@@ -120,6 +121,7 @@ nextflow_process {
120121 path(process.out.vcf.get(0).get(1)).vcf.variantsMD5,
121122 path(process.out.vcf.get(0).get(1)).vcf.summary,
122123 path(process.out.vcf.get(0).get(1)).vcf.sampleCount,
124+ process.out.index,
123125 process.out.findAll { key, val -> key.startsWith("versions")}
124126 ).match() }
125127 )
@@ -143,10 +145,10 @@ nextflow_process {
143145 )
144146 }
145147 }
146- test("homo sapiens - 1 VCF - --force-single") {
148+ test("homo sapiens - 1 VCF - --force-single --output-type z --write-index ") {
147149 when {
148150 params {
149- trgt_merge_args = "--force-single"
151+ trgt_merge_args = "--force-single --output-type z --write-index "
150152 }
151153 process {
152154 """
@@ -165,11 +167,86 @@ nextflow_process {
165167 path(process.out.vcf.get(0).get(1)).vcf.variantsMD5,
166168 path(process.out.vcf.get(0).get(1)).vcf.summary,
167169 path(process.out.vcf.get(0).get(1)).vcf.sampleCount,
170+ process.out.index,
168171 process.out.findAll { key, val -> key.startsWith("versions")}
169172 ).match() }
170173 )
171174 }
172175 }
176+ test("homo sapiens - 1 VCF - --force-single --output-type b --write-index") {
177+ when {
178+ params {
179+ trgt_merge_args = "--force-single --output-type b --write-index"
180+ }
181+ process {
182+ """
183+ input[0] = BCFTOOLS_SORT.out.vcf
184+ .join(BCFTOOLS_SORT.out.tbi)
185+ .first()
186+ input[1] = GUNZIP.out.gunzip
187+ input[2] = SAMTOOLS_FAIDX.out.fai
188+ """
189+ }
190+ }
191+ then {
192+ assertAll(
193+ { assert process.success },
194+ { assert snapshot(
195+ file(process.out.vcf.get(0).get(1)).name,
196+ process.out.index,
197+ process.out.findAll { key, val -> key.startsWith("versions")}
198+ ).match() }
199+ )
200+ }
201+ }
202+ test("homo sapiens - 2 VCFs - tbi index - stub") {
203+ options "-stub"
204+ when {
205+ params {
206+ trgt_merge_args = "--output-type z --write-index"
207+ }
208+ process {
209+ """
210+ input[0] = BCFTOOLS_SORT.out.vcf
211+ .join(BCFTOOLS_SORT.out.tbi)
212+ .map { meta, vcf, tbi -> [ [ id : 'test' ], vcf, tbi ] }
213+ .groupTuple()
214+ input[1] = [[],[]]
215+ input[2] = [[],[]]
216+ """
217+ }
218+ }
219+ then {
220+ assertAll(
221+ { assert process.success },
222+ { assert snapshot(process.out).match() }
223+ )
224+ }
225+ }
226+ test("homo sapiens - 2 VCFs - csi index - stub") {
227+ options "-stub"
228+ when {
229+ params {
230+ trgt_merge_args = "--output-type b --write-index"
231+ }
232+ process {
233+ """
234+ input[0] = BCFTOOLS_SORT.out.vcf
235+ .join(BCFTOOLS_SORT.out.tbi)
236+ .map { meta, vcf, tbi -> [ [ id : 'test' ], vcf, tbi ] }
237+ .groupTuple()
238+ input[1] = [[],[]]
239+ input[2] = [[],[]]
240+ """
241+ }
242+ }
243+ then {
244+ assertAll(
245+ { assert process.success },
246+ { assert snapshot(process.out).match() }
247+ )
248+ }
249+ }
173250 test("homo sapiens - 2 VCFs - stub") {
174251 options "-stub"
175252 when {
@@ -187,10 +264,7 @@ nextflow_process {
187264 then {
188265 assertAll(
189266 { assert process.success },
190- { assert snapshot(
191- process.out,
192- process.out.findAll { key, val -> key.startsWith("versions")}
193- ).match() }
267+ { assert snapshot(process.out).match() }
194268 )
195269 }
196270 }
0 commit comments