Thank you Devon Ryan. Really helped a lot.
• 0 views
•
link
Hello World,
Curious to know if any simple way is there to get base quality of a reported variant in VCF. To be exact I am not looking for phred score of variant which is directly available in VCF but the base quality phred score. I am using bcftools and alignment using samtools.
Just parse the mpileup:
samtools mpileup -f reference.fasta -r chr1:234-235 file.bam
The last column is the base quality. You might also be able to use sam2tsv from Pierre's jvarkit, where it looks like column 6 has the quality score for each base in each read.
Thank you Devon Ryan. Really helped a lot.
Log in to answer this question.
Multiple bases above a threshold are required to support a variant, no? You might have to look at extracting the base quality scores of all reads involved.
Thank You RamRS. Lets say we have the confident variant(mainly SNP) with us. Thus from that filtered vcf I require basecall phred score. I can get it with scripting, but luking for any easy option btw.
In other words, you want the phred scores of the bases underlying a variant call, yes?
Exactly Devon Ryan. I need the base quality of variant rather than phred quality of variant which is there in vcf row for a variant