Is There A Samtools/Bcftools Setting To Call Variants No Matter How Infrequent?
2
0
Entering edit mode
13.1 years ago

I can't get this position to be called by the samtools mpileup/bcftools stack.

I get the variant if I ask for all positions (not just variant):

samtools mpileup -u -f data/refs/myRef.fa data/bam/myBamFile.bam | bcftools view -

(showing one position for brevity)

myRef    21    .    C    T,G,X    0    .    DP=3796;I16=3730,0,55,0,135424,4994460,1972,72624,42241,1163355,634,7544,26664,192714,488,4340    PL    0,255,199,255,217,199,255,217,199,199

but if I ask for only variant positions I don't get anything.

samtools mpileup -u -f data/refs/myRef.fa data/bam/myBamFile.bam | bcftools view -v -

It is filtering but I can't figure out which filters to turn off.

The pileup itself is here:

myRef    21    C    3796    ...................................................................................................................TT........T.........T.....TT..T...T.T.T.....TT.TT...T.....T.TT..........T..TT......TT.T....T...TT.TT......T..T..T.T..TT...TT....TT.T..T..TT.TTT..........TT......TT............................................................................T...............................................................................................................................................................................T...........................................................................T................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................G.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................T..............................................................................................................................................................................................................................................................................................................................................................................................................................    HG7GHHDFGFHHHGHHBH8FHGHHHHFDHHHCGEHEH6>HHHH4HFHHDHAHHHHFGCHH<G@GHCHH:FD?EHHEGHH7EHHHGEE?;1HGGHB14EDHHFEE:HH?HH<GHBFEHHHGH>HEHHGHHGH@EHGGB>HFH<GEH>HHGHFHFEHGHBGHHHHHHGHHEHHGHGBGHF@HFHHHHGEH4HDGHHEFDEHHEF@CBG/HHHHHHGHDHHH?HGDFHHHHF@3HGHHHHHHHE=:HEHHHHHHE@DHHHHHHHGHDHEEHGHFEBFFHGDGGFD<GEHHBHF=HGHHGGHHH/FHHEHEFH;HDFHEHHG?BEHEHHHDHHGHHEH;EHG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HG:HHEGH<CHHGHH:GHH<=HGHGHH>EHHEGHGE=GFFHHHGHBDHHGGHH:BHHHEBHHHHEHHHG?HGFHHBHHHG>HFEEGGEHHHEGEFHHEHHGG6HGHGHHHHHDHHEGHAGFE1DEH:HHHDGH2G8CEFHHHHHGHGHHHBHHGAFHHGHH?HFHGGHHGHH?HH=HGHHEH;EFFGHDGHEEHHHHGHGHHHFGHE<HH?GHBHGHH>HHGHGFHFGHGHG<HHHHHH@HH,C@HGHABHHHHHHHGHHGEHGGHDHGBCDBGGGHHHHHHHGFHGHHGDGHBHGHHHHGHHEHDHFHHHHGHFHHHDBHGBHH?GHHHHHHGHHGG7HGHHHHGG=GC5HHHH?H:5?GHEHGHFGHFG
samtools bcftools • 6.5k views
ADD COMMENT
1
Entering edit mode
13.1 years ago
Doctoroots ▴ 800

Hi Jeremy, this could be a possible duplicate of this question, where the answer is that the use of BAQ by samtools reduces some true positives together with the false positive reduction and it is suggested to user either -B or -E in order to fix it.

also, your problem could be due to high coverage filtration, in which case you should use the -D / -d options to set the maximal accepted depth.

ADD COMMENT
1
Entering edit mode
13.1 years ago
lh3 33k

Bcftools assumes your sample is diploid, which greatly improves the power for variant calling from diploid sequences. Your SNP has <2% frequency, even approaching the sequencing error rate. There is no way bcftools can call it. If you really want to call it as a SNP "no matter how infrequent", you should just parse the I16 field (first 4 numbers are identical to DP4).

ADD COMMENT

Login before adding your answer.

Traffic: 1599 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6