phred score from vcf quality
1
1
Entering edit mode
7.8 years ago
bioguy24 ▴ 230

Is there a tool or script that calculate just a one or two digit phred score using the quality in a vcf? Thanks :).

  #CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT
  NA12878_BC2 chr1    949608  .       G       A       712.267 PASS  AF=0.4625;AO=260;DP=572;FAO=185;FDP=400;FR=.;FRO=215;FSAF=107;FSAR=78;F SRF =107;FSRR=108;FWDB=0.0625823;FXX=0;HRUN=1;LEN=1;MLLD=147.924;OALT=A;OID=.; OMAPALT=A;OPOS=949608;OREF=G;PB=0.5;PBP=1;QD=7.12267;RBI=0.0625867;REFB=-0.0025082;REVB=0.000737111;RO=311;SAF=141;SAR=119;SRF=154;SRR=157;SSEN=0;SSEP=0;SSSB=0.0466704;STB=0.543855;STBP=0.089;TYPE=snp;VARB=0.00322495;ANN=IRSG15  GT:GQ:DP:FDP:RO:FRO:AO:FAO:AF:SAR:SAF:SRF:SRR:FSAR:FSAF:FSRF:FSRR0/1:712:572:400:311:215:260:185:0.4625:119:141:154:157:78:10,107:108
ngs • 2.0k views
ADD COMMENT
1
Entering edit mode
7.8 years ago

The QUAL field is already Phred scaled according to the spec. If you mean you want to encode this field as 2 ASCII characters you could use the +33 encoding as in FASTQ files, but take the product of the two values to achieve a larger range of integers.

ADD COMMENT
1
Entering edit mode

Correction of Matt's statement: It depends on your variant caller. While FreeBayes, GATK, and SAMtools/BCFtools produce PHRED quality scores, VarScan produces p-values by default (PHRED can be generated with the '--vcf-output' flag).

ADD REPLY

Login before adding your answer.

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