@DocumentedFeature(groupName="Variant Annotations", groupSummary="Available to HaplotypeCaller, Mutect2, VariantAnnotator and GenotypeGVCFs. See https://software.broadinstitute.org/gatk/documentation/article?id=10836", summary="Root mean square of the mapping quality of reads across all samples (MQ)") public final class RMSMappingQuality extends InfoFieldAnnotation implements StandardAnnotation, ReducibleAnnotation
This annotation provides an estimation of the overall mapping quality of reads supporting a variant call, averaged over all samples in a cohort.
The root mean square is equivalent to the mean of the mapping qualities plus the standard deviation of the mapping qualities.
Constructor and Description |
---|
RMSMappingQuality() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
annotate(ReferenceContext ref,
htsjdk.variant.variantcontext.VariantContext vc,
ReadLikelihoods<htsjdk.variant.variantcontext.Allele> likelihoods)
Computes the annotation for the given variant and the likelihoods per read.
|
java.util.Map<java.lang.String,java.lang.Object> |
annotateRawData(ReferenceContext ref,
htsjdk.variant.variantcontext.VariantContext vc,
ReadLikelihoods<htsjdk.variant.variantcontext.Allele> likelihoods)
Generate the raw data necessary to calculate the annotation.
|
void |
calculateRawData(htsjdk.variant.variantcontext.VariantContext vc,
ReadLikelihoods<htsjdk.variant.variantcontext.Allele> likelihoods,
ReducibleAnnotationData rawAnnotations) |
void |
combineAttributeMap(ReducibleAnnotationData<java.lang.Double> toAdd,
ReducibleAnnotationData<java.lang.Double> combined) |
java.util.Map<java.lang.String,java.lang.Object> |
combineRawData(java.util.List<htsjdk.variant.variantcontext.Allele> vcAlleles,
java.util.List<ReducibleAnnotationData<?>> annotationList)
Combine raw data, typically during the merging of raw data contained in multiple gVCFs as in CombineGVCFs and the
preliminary merge for GenotypeGVCFs
|
java.util.Map<java.lang.String,java.lang.Object> |
finalizeRawData(htsjdk.variant.variantcontext.VariantContext vc,
htsjdk.variant.variantcontext.VariantContext originalVC)
Calculate the final annotation value from the raw data which was generated by either annotateRawData or calculateRawData
|
htsjdk.variant.variantcontext.VariantContext |
finalizeRawMQ(htsjdk.variant.variantcontext.VariantContext vc)
converts
GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY into VCFConstants.RMS_MAPPING_QUALITY_KEY annotation if present |
java.util.List<htsjdk.variant.vcf.VCFInfoHeaderLine> |
getDescriptions()
Returns the descriptions used for the VCF INFO meta field.
|
static RMSMappingQuality |
getInstance() |
java.util.List<java.lang.String> |
getKeyNames()
Return the keys
|
java.util.List<htsjdk.variant.vcf.VCFInfoHeaderLine> |
getRawDescriptions()
Returns the descriptions used for the VCF INFO meta field corresponding to the annotations raw key.
|
java.lang.String |
getRawKeyName() |
java.lang.String |
makeFinalizedAnnotationString(int numOfReads,
java.util.Map<htsjdk.variant.variantcontext.Allele,java.lang.Double> perAlleleData) |
java.lang.String |
makeRawAnnotationString(java.util.List<htsjdk.variant.variantcontext.Allele> vcAlleles,
java.util.Map<htsjdk.variant.variantcontext.Allele,java.lang.Number> perAlleleData) |
protected void |
parseRawDataString(ReducibleAnnotationData<java.lang.Number> myData) |
toString
public java.lang.String getRawKeyName()
getRawKeyName
in interface ReducibleAnnotation
public java.util.List<java.lang.String> getKeyNames()
VariantAnnotation
getKeyNames
in class VariantAnnotation
public java.util.List<htsjdk.variant.vcf.VCFInfoHeaderLine> getDescriptions()
InfoFieldAnnotation
getDescriptions
in class InfoFieldAnnotation
public java.util.List<htsjdk.variant.vcf.VCFInfoHeaderLine> getRawDescriptions()
ReducibleAnnotation
getRawDescriptions
in interface ReducibleAnnotation
public java.util.Map<java.lang.String,java.lang.Object> annotateRawData(ReferenceContext ref, htsjdk.variant.variantcontext.VariantContext vc, ReadLikelihoods<htsjdk.variant.variantcontext.Allele> likelihoods)
annotateRawData
in interface ReducibleAnnotation
ref
- the reference context for this annotationvc
- the variant context to annotatelikelihoods
- likelihoods indexed by sample, allele, and read within samplepublic java.util.Map<java.lang.String,java.lang.Object> combineRawData(java.util.List<htsjdk.variant.variantcontext.Allele> vcAlleles, java.util.List<ReducibleAnnotationData<?>> annotationList)
ReducibleAnnotation
combineRawData
in interface ReducibleAnnotation
vcAlleles
- The merged allele list across all variants being combined/mergedannotationList
- The raw data for all the variants being combined/mergedpublic java.lang.String makeRawAnnotationString(java.util.List<htsjdk.variant.variantcontext.Allele> vcAlleles, java.util.Map<htsjdk.variant.variantcontext.Allele,java.lang.Number> perAlleleData)
public java.util.Map<java.lang.String,java.lang.Object> finalizeRawData(htsjdk.variant.variantcontext.VariantContext vc, htsjdk.variant.variantcontext.VariantContext originalVC)
ReducibleAnnotation
finalizeRawData
in interface ReducibleAnnotation
vc
- -- contains the final set of alleles, possibly subset by GenotypeGVCFsoriginalVC
- -- used to get all the alleles for all gVCFspublic java.lang.String makeFinalizedAnnotationString(int numOfReads, java.util.Map<htsjdk.variant.variantcontext.Allele,java.lang.Double> perAlleleData)
public void combineAttributeMap(ReducibleAnnotationData<java.lang.Double> toAdd, ReducibleAnnotationData<java.lang.Double> combined)
public void calculateRawData(htsjdk.variant.variantcontext.VariantContext vc, ReadLikelihoods<htsjdk.variant.variantcontext.Allele> likelihoods, ReducibleAnnotationData rawAnnotations)
public java.util.Map<java.lang.String,java.lang.Object> annotate(ReferenceContext ref, htsjdk.variant.variantcontext.VariantContext vc, ReadLikelihoods<htsjdk.variant.variantcontext.Allele> likelihoods)
InfoFieldAnnotation
annotate
in class InfoFieldAnnotation
ref
- Reference context, may be nullvc
- Variant to be annotated. Not null.likelihoods
- likelihoods indexed by sample, allele, and read within samplepublic htsjdk.variant.variantcontext.VariantContext finalizeRawMQ(htsjdk.variant.variantcontext.VariantContext vc)
GATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY
into VCFConstants.RMS_MAPPING_QUALITY_KEY
annotation if presentvc
- which potentially contains rawMQGATKVCFConstants.RAW_RMS_MAPPING_QUALITY_KEY
it will be replaced with VCFConstants.RMS_MAPPING_QUALITY_KEY
otherwise return the original vcprotected void parseRawDataString(ReducibleAnnotationData<java.lang.Number> myData)
public static RMSMappingQuality getInstance()