Skip to content

Commit e7eddf0

Browse files
committed
Clarify the multiple incompatible uses of "phred-scale".
Sometimes this refers to $10 log_{10}(p)$, sometimes to $10 log_{10}(1-p)$, and sometimes to something normalised so $p$ isn't really a probability at all. Note CNL, CNP and CNQ don't mention phred anywhere in their short description and only Phred in the long description for CNQ, so I applied the same logic to PL, PP (is this correct?) and PQ. Also clarified the "VCF tag naming conventions" part. I changed phred-scale in one part there to phred-true-scale. I'm not so happy with that, but as it's immediately followed by the formula I think it's clear.
1 parent 7137b57 commit e7eddf0

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

VCFv4.2.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ \subsubsection{Genotype fields}
223223
\item FT : sample genotype filter indicating if this genotype was ``called'' (similar in concept to the FILTER field). Again, use PASS to indicate that all filters have been passed, a semicolon-separated list of codes for filters that fail, or `.' to indicate that filters have not been applied. These values should be described in the meta-information in the same way as FILTERs (String, no whitespace or semicolons permitted)
224224
\item GL : genotype likelihoods comprised of comma separated floating point $log_{10}$-scaled likelihoods for all possible genotypes given the set of alleles defined in the REF and ALT fields. In presence of the GT field the same ploidy is expected and the canonical order is used; without GT field, diploidy is assumed. If A is the allele in REF and B,C,... are the alleles as ordered in ALT, the ordering of genotypes for the likelihoods is given by: F(j/k) = (k*(k+1)/2)+j. In other words, for biallelic sites the ordering is: AA,AB,BB; for triallelic sites the ordering is: AA,AB,BB,AC,BC,CC, etc. For example: GT:GL 0/1:-323.03,-99.29,-802.53 (Floats)
225225
\item GLE : genotype likelihoods of heterogeneous ploidy, used in presence of uncertain copy number. For example: GLE=0:-75.22,1:-223.42,0/0:-323.03,1/0:-99.29,1/1:-802.53 (String)
226-
\item PL : the phred-scaled genotype likelihoods rounded to the closest integer (and otherwise defined precisely as the GL field) (Integers)
226+
\item PL : the $-10 log_{10}$ scaled genotype likelihoods rounded to the closest integer, and otherwise defined in the same way as the GL field (Integers).
227227
\item GP : the phred-scaled genotype posterior probabilities (and otherwise defined precisely as the GL field); intended to store imputed genotype probabilities (Floats)
228228
\item GQ : conditional genotype quality, encoded as a phred quality $-10log_{10}$ p(genotype call is wrong, conditioned on the site's being variant) (Integer)
229229
\item HQ : haplotype qualities, two comma separated phred qualities (Integers)

VCFv4.3.tex

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ \subsubsection{Genotype fields}
427427
GT & 1 & String & Genotype \\
428428
HQ & 2 & Integer & Haplotype quality \\
429429
MQ & 1 & Integer & RMS mapping quality \\
430-
PL & G & Integer & Phred-scaled genotype likelihoods rounded to the closest integer \\
431-
PP & G & Integer & Phred-scaled genotype posterior probabilities rounded to the closest integer \\
432-
PQ & 1 & Integer & Phasing quality \\
430+
PL & G & Integer & $-10 log_{10}$ scaled genotype likelihoods rounded to the closest integer \\
431+
PP & G & Integer & $-10 log_{10}$ scaled genotype posterior probabilities rounded to the closest integer \\
432+
PQ & 1 & Integer & Phred-scaled phasing quality \\
433433
PS & 1 & Integer & Phase set \\
434434
\end{longtable}
435435
@@ -515,8 +515,8 @@ \subsubsection{Genotype fields}
515515
516516
\item HQ (Integer): Haplotype qualities, two comma separated phred qualities.
517517
\item MQ (Integer): RMS mapping quality, similar to the version in the INFO field.
518-
\item PL (Integer): The phred-scaled genotype likelihoods rounded to the closest integer, and otherwise defined in the same way as the GL field.
519-
\item PP (Integer): The phred-scaled genotype posterior probabilities rounded to the closest integer, and otherwise defined in the same way as the GP field.
518+
\item PL (Integer): The $-10 log_{10}$ scaled genotype likelihoods rounded to the closest integer, and otherwise defined in the same way as the GL field.
519+
\item PP (Integer): The $-10 log_{10}$ scaled genotype posterior probabilities rounded to the closest integer, and otherwise defined in the same way as the GP field.
520520
\item PQ (Integer): Phasing quality, the phred-scaled probability that alleles are ordered incorrectly in a heterozygote (against all other members in the phase set).
521521
We note that we have not yet included the specific measure for precisely defining ``phasing quality''; our intention for now is simply to reserve the PQ tag for future use as a measure of phasing quality.
522522
\item PS (non-negative 32-bit Integer): Phase set, defined as a set of phased genotypes to which this genotype belongs.
@@ -544,13 +544,14 @@ \subsection{VCF tag naming conventions}
544544
\begin{itemize}
545545
\item The `L' suffix means \emph{likelihood} as log-likelihood in the sampling distribution, $\log_{10} \Pr(\mathrm{Data}|\mathrm{Model})$.
546546
Likelihoods are represented as $\log_{10}$ scale, thus they are negative numbers (e.g.\ GL, CNL).
547-
The likelihood can be also represented in some cases as phred-scale in a separate tag (e.g.\ PL).
547+
In some cases the likelihood may also be represented using a positive value in a separate tag (e.g.\ PL) using the $-10 \log_{10}(probability\_of\_being\_correct)$ scale.
548+
In this case they may also be normalised so the most likely event has a score of 0.
548549
549550
\item The `P' suffix means \emph{probability} as linear-scale probability in the posterior distribution, which is $\Pr(\mathrm{Model}|\mathrm{Data})$. Examples are GP, CNP.
550551
551552
\item The `Q' suffix means \emph{quality} as log-complementary-phred-scale posterior probability, $-10 \log_{10} \Pr(\mathrm{Data}|\mathrm{Model})$, where the model is the most likely genotype that appears in the GT field.
552553
Examples are GQ, CNQ.
553-
The fixed site-level QUAL field follows the same convention (represented as a phred-scaled number).
554+
The fixed site-level QUAL field follows the same convention (represented as a phred-scaled number with $QUAL = -10 \log_{10}(probability\_of\_being\_incorrect)$).
554555
\end{itemize}
555556
556557
@@ -2085,6 +2086,7 @@ \section{List of changes}
20852086
\subsection{Changes to VCFv4.3}
20862087
20872088
\begin{itemize}
2089+
\item Clarify distinction between Phred ($-10 log_{10}(p\_of\_incorrect)$) and $-10 log_{10}(p\_of\_correct)$.
20882090
\item More strict language: ``should'' replaced with ``must'' where appropriate
20892091
\item Tables with Type and Number definitions for INFO and FORMAT reserved keys
20902092

VCFv4.4.draft.tex

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,9 @@ \subsubsection{Genotype fields}
432432
GT & 1 & String & Genotype \\
433433
HQ & 2 & Integer & Haplotype quality \\
434434
MQ & 1 & Integer & RMS mapping quality \\
435-
PL & G & Integer & Phred-scaled genotype likelihoods rounded to the closest integer \\
436-
PP & G & Integer & Phred-scaled genotype posterior probabilities rounded to the closest integer \\
437-
PQ & 1 & Integer & Phasing quality \\
435+
PL & G & Integer & $-10 log_{10}$ scaled genotype likelihoods rounded to the closest integer \\
436+
PP & G & Integer & $-10 log_{10}$ scaled genotype posterior probabilities rounded to the closest integer \\
437+
PQ & 1 & Integer & Phred-scaled phasing quality \\
438438
PS & 1 & Integer & Phase set \\
439439
\end{longtable}
440440
@@ -520,8 +520,8 @@ \subsubsection{Genotype fields}
520520
521521
\item HQ (Integer): Haplotype qualities, two comma separated phred qualities.
522522
\item MQ (Integer): RMS mapping quality, similar to the version in the INFO field.
523-
\item PL (Integer): The phred-scaled genotype likelihoods rounded to the closest integer, and otherwise defined in the same way as the GL field.
524-
\item PP (Integer): The phred-scaled genotype posterior probabilities rounded to the closest integer, and otherwise defined in the same way as the GP field.
523+
\item PL (Integer): The $-10 log_{10}$ scaled genotype likelihoods rounded to the closest integer, and otherwise defined in the same way as the GL field.
524+
\item PP (Integer): The $-10 log_{10}$ scaled genotype posterior probabilities rounded to the closest integer, and otherwise defined in the same way as the GP field.
525525
\item PQ (Integer): Phasing quality, the phred-scaled probability that alleles are ordered incorrectly in a heterozygote (against all other members in the phase set).
526526
We note that we have not yet included the specific measure for precisely defining ``phasing quality''; our intention for now is simply to reserve the PQ tag for future use as a measure of phasing quality.
527527
\item PS (non-negative 32-bit Integer): Phase set, defined as a set of phased genotypes to which this genotype belongs.
@@ -549,13 +549,14 @@ \subsection{VCF tag naming conventions}
549549
\begin{itemize}
550550
\item The `L' suffix means \emph{likelihood} as log-likelihood in the sampling distribution, $\log_{10} \Pr(\mathrm{Data}|\mathrm{Model})$.
551551
Likelihoods are represented as $\log_{10}$ scale, thus they are negative numbers (e.g.\ GL, CNL).
552-
The likelihood can be also represented in some cases as phred-scale in a separate tag (e.g.\ PL).
552+
In some cases the likelihood may also be represented using a positive value in a separate tag (e.g.\ PL) using the $-10 \log_{10}(probability\_of\_being\_correct)$ scale.
553+
In this case they may also be normalised so the most likely event has a score of 0.
553554
554555
\item The `P' suffix means \emph{probability} as linear-scale probability in the posterior distribution, which is $\Pr(\mathrm{Model}|\mathrm{Data})$. Examples are GP, CNP.
555556
556557
\item The `Q' suffix means \emph{quality} as log-complementary-phred-scale posterior probability, $-10 \log_{10} \Pr(\mathrm{Data}|\mathrm{Model})$, where the model is the most likely genotype that appears in the GT field.
557558
Examples are GQ, CNQ.
558-
The fixed site-level QUAL field follows the same convention (represented as a phred-scaled number).
559+
The fixed site-level QUAL field follows the same convention (represented as a phred-scaled number with $QUAL = -10 \log_{10}(probability\_of\_being\_incorrect)$).
559560
\end{itemize}
560561
561562
@@ -2223,6 +2224,7 @@ \subsection{Changes between VCFv4.4 and VCFv4.3}
22232224
\subsection{Changes to VCFv4.3}
22242225
22252226
\begin{itemize}
2227+
\item Clarify distinction between Phred ($-10 log_{10}(p\_of\_incorrect)$) and $-10 log_{10}(p\_of\_correct)$.
22262228
\item More strict language: ``should'' replaced with ``must'' where appropriate
22272229
\item Tables with Type and Number definitions for INFO and FORMAT reserved keys
22282230

0 commit comments

Comments
 (0)