calculate mismatch rate from VCF file
1
0
Entering edit mode
8 months ago
Dora ▴ 10

I want to calculate the mismatch rate on base-level, I notice that the information in VCF file may help.

##INFO=<ID=DP4,Number=4,Type=Integer,Description="Number of high-quality ref-forward , ref-reverse, alt-forward and alt-reverse bases">

Question: can I use (alt-forward + alt-reverse) / (ref_forward + ref-reverse + alt-forward + alt-reverse) to get the mismatch rate?

PS: in my case, the mismatch means one bases convert into the other, the insertion or deletion is not included

Thank you in advance!

mismatch-rate VCF • 566 views
ADD COMMENT
0
Entering edit mode
8 months ago

I want to calculate the mismatch rate on base-level,

samtools stats in.bam | grep "error rate" | cut -f 2,3

error rate: 2.032389e-02
ADD COMMENT
0
Entering edit mode

Thank you for your reply!! My bad. I didn't mention that I want to get the mismatch rate for each site. Is this error rate for each site?

ADD REPLY
0
Entering edit mode

use the output of samtools mpileup

ADD REPLY
0
Entering edit mode

I was using it but the output file was too big, so that I thought the vcf file was more efficient. But now I know that I can stop working on vcf file and turn to mpileup again. Thank you so much~~

ADD REPLY
0
Entering edit mode

I was using it but the output file was too big

pipe the output

ADD REPLY

Login before adding your answer.

Traffic: 1855 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