Biostar Beta. Not for public use.
Base Quality of a reported variant in VCF
0
Entering edit mode
17 months ago
India

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.
ADD COMMENTlink
0
Entering edit mode

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.

ADD REPLYlink
0
Entering edit mode

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.

ADD REPLYlink
0
Entering edit mode

In other words, you want the phred scores of the bases underlying a variant call, yes?

ADD REPLYlink
0
Entering edit mode

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

ADD REPLYlink
2
Entering edit mode
15 months ago
Freiburg, Germany

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.

ADD COMMENTlink
0
Entering edit mode

Thank you Devon Ryan. Really helped a lot.

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1