File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,12 @@ process SV_CHIMERA_FILTER {
1919 def prefix = task. ext. prefix ?: " ${ meta.id} "
2020 def out_vcf = vcf. getName(). replaceFirst(/ \. vcf(\. gz|\. bgz)?$/ , ' .ffpe_filtered.vcf.gz' )
2121 """
22- bcftools view -Oz -i "(FORMAT/SR[1] + FORMAT/RP[1]) > 6 && (INFO/AS) >= 1 && (FORMAT/QUAL[1]) >= 150" ${ vcf} > ${ out_vcf}
22+ # Detect tumor sample name (first sample listed = tumor by GRIDSS/SvABA convention)
23+ tumor_idx=\$ (( \$ (bcftools query -l ${ vcf} | wc -l) - 1 ))
24+ bcftools view -Oz \\
25+ -i "(FORMAT/SR[\$ {tumor_idx}] + FORMAT/RP[\$ {tumor_idx}]) > 6 && (INFO/AS) >= 1 && (FORMAT/QUAL[\$ {tumor_idx}]) >= 150" \\
26+ ${ vcf} > ${ out_vcf}
27+ # bcftools view -Oz -i "(FORMAT/SR[1] + FORMAT/RP[1]) > 6 && (INFO/AS) >= 1 && (FORMAT/QUAL[1]) >= 150" ${ vcf} > ${ out_vcf}
2328
2429 bcftools index --tbi ${ out_vcf}
2530
You can’t perform that action at this time.
0 commit comments