Base Quality of a reported variant in VCF
1
0
Entering edit mode
9.2 years ago

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.

alignment FASTQ VCF next-gen Variant-Calling • 3.4k views
ADD COMMENT
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 REPLY
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 REPLY
0
Entering edit mode

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

ADD REPLY
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 REPLY
2
Entering edit mode
9.2 years ago

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 COMMENT
0
Entering edit mode

Thank you Devon Ryan. Really helped a lot.

ADD REPLY

Login before adding your answer.

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