tamsen / Pisces

Somatic and germline variant caller for amplicon data. Recommended caller for tumor-only workflows.
GNU General Public License v3.0
7 stars 0 forks source link

Can I disable the flag BS when this filter is not used? #20

Closed Manuel-DominguezCBG closed 11 months ago

Manuel-DominguezCBG commented 1 year ago

In our test, we only obtained R1 reads. I was wondering if there is a way to not flag variants based on SB. Is this possible?

My code

apptainer exec --bind "$ref_folder":"$ref_folder" \
               "$pisces"  dotnet /app/Pisces_5.2.9.122/Pisces.dll \
               -bam  "${Sample_ID}"_FINAL_SORTED.bam \
               -g  "$piscesrefgenomefolder" \
               -o ./ \
               -i "$ampliconscoordenatesbed"  \
               --gvcf false \
               --minvq 20 \
               --maxvq 100 \
               --minbq 20 \
               --mindpfilter 5000 \
               --ssfilter False\
               --minmq 20 \
               --mindp 10 

and a couple of variants


#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  2111700067_FINAL_SORTED.bam
chr5    171410472   .   G   C   80  LowDP;NC;SB DP=14   GT:GQ:AD:DP:VF:NL:SB    0/1:80:4,6:14:0.429:20:-100.0000
chr5    171410482   .   A   T   100 LowDP;NC;SB DP=969  GT:GQ:AD:DP:VF:NL:SB    0/1:100:919,49:969:0.051:20:-100.0000

I know that the tool is not filtering out variant based on SB but it is weird that the flag is still there.

tamsen commented 1 year ago

Hi, can you pls send me a small bam that reproduces this and I'll take a look? Pisces was designed with amplicons in mind, and it should handle sections where coverage only goes in one direction. In general these should not get flagged with SB. In your case it might be an interaction with all the other filters. I can take a look.

You can also try the "-OutputSBFiles" option to output some extra files, which should show the counts in each direction, to verify the reads are only going in one direction.

best Tamsen

Manuel-DominguezCBG commented 1 year ago

Hello,

please find in this link a bam file and the VCF file as a result of analyzing the BAM with the exact code provided above.

Again it can be seen the -100.000 flag.

I am validating my pipeline and to do this I took demo data provided by Illumina. I took this https://basespace.illumina.com/projects/27687666/samples. I took the fastq files but I had a look at the BAM files generated by them (I don't know what pipeline they used) and I saw the same flag in the VCF they generated. In case this info helps you.

Manuel-DominguezCBG commented 11 months ago

Hello @tamsen, any update about this issue?? No rush, just checking if you figure out this. We can perferly remove the flag from the VCF but if this can be done directly from PISCES, that would be great!! ;)

tamsen commented 11 months ago

Hi Sorry! I missed that you added the bam. Hang on.

tamsen commented 11 months ago

OK, it looks like a small bug, so that when other filters are activated in a particular combination the SB flag shows up. You have the ssFilter off, and the actual SB being reported is "-100" so PISCES is not finding any real SB in your data.

Thanks for finding this issue. It must have been around a long time. Sorry you have to have the extra step to remove the flag.

Manuel-DominguezCBG commented 11 months ago

Ok! Thank you @tamsen. Are you planning to remove the SB flag when the ssFilter is off in a future release? If so, please le me know. I am happy to add an extra step to delete this flag.

Thank you for your help!

Manuel-DominguezCBG commented 11 months ago

This command does the bit bcftools annotate -x FORMAT/SB input.vcf > output.vcf

I close this issue. Thanks!!