@@ -9,18 +9,40 @@ process VariantFiltrationSnpIndel {
99 tuple(analysis_id, path(vcf_file), path(vcf_idx_file))
1010
1111 output:
12- tuple(analysis_id, path(" ${ vcf_file.baseName } .filter${ ext_vcf} " ), path(" ${ vcf_file.baseName } .filter${ ext_vcf}${ ext_vcf_index} " ), emit : vcf_file)
12+ tuple(analysis_id, path(" ${ vcf_file.simpleName } .filter${ ext_vcf} " ), path(" ${ vcf_file.simpleName } .filter${ ext_vcf}${ ext_vcf_index} " ), emit : vcf_file)
1313
1414 script:
1515 ext_vcf = params. compress || vcf_file. getExtension() == " .gz" ? " .vcf.gz" : " .vcf"
1616 ext_vcf_index = params. compress || vcf_file. getExtension() == " .gz" ? " .tbi" : " .idx"
1717 """
18- gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" SelectVariants --reference ${ params.genome} --variant $vcf_file --output ${ vcf_file.baseName} .snp${ ext_vcf} --select-type-to-exclude INDEL
19- gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" SelectVariants --reference ${ params.genome} --variant $vcf_file --output ${ vcf_file.baseName} .indel${ ext_vcf} --select-type-to-include INDEL
18+ gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" SelectVariants \
19+ --reference ${ params.genome} \
20+ --variant $vcf_file \
21+ --output ${ vcf_file.simpleName} .snp${ ext_vcf} \
22+ --select-type-to-exclude INDEL
2023
21- gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" VariantFiltration --reference ${ params.genome} --variant ${ vcf_file.baseName} .snp${ ext_vcf} --output ${ vcf_file.baseName} .snp_filter${ ext_vcf} ${ params.snp_filter} ${ params.snp_cluster}
22- gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" VariantFiltration --reference ${ params.genome} --variant ${ vcf_file.baseName} .indel${ ext_vcf} --output ${ vcf_file.baseName} .indel_filter${ ext_vcf} ${ params.indel_filter}
24+ gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" SelectVariants \
25+ --reference ${ params.genome} \
26+ --variant $vcf_file \
27+ --output ${ vcf_file.simpleName} .indel${ ext_vcf} \
28+ --select-type-to-include INDEL
2329
24- gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" MergeVcfs --INPUT ${ vcf_file.baseName} .snp_filter${ ext_vcf} --INPUT ${ vcf_file.baseName} .indel_filter${ ext_vcf} --OUTPUT ${ vcf_file.baseName} .filter${ ext_vcf}
30+ gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" VariantFiltration \
31+ --reference ${ params.genome} \
32+ --variant ${ vcf_file.simpleName} .snp${ ext_vcf} \
33+ --output ${ vcf_file.simpleName} .snp_filter${ ext_vcf} \
34+ ${ params.snp_filter} \
35+ ${ params.snp_cluster}
36+
37+ gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" VariantFiltration \
38+ --reference ${ params.genome} \
39+ --variant ${ vcf_file.simpleName} .indel${ ext_vcf} \
40+ --output ${ vcf_file.simpleName} .indel_filter${ ext_vcf} \
41+ ${ params.indel_filter}
42+
43+ gatk --java-options "-Xmx${ task.memory.toGiga()-4} G" MergeVcfs \
44+ --INPUT ${ vcf_file.simpleName} .snp_filter${ ext_vcf} \
45+ --INPUT ${ vcf_file.simpleName} .indel_filter${ ext_vcf} \
46+ --OUTPUT ${ vcf_file.simpleName} .filter${ ext_vcf}
2547 """
2648}
0 commit comments