@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 raw data format for this annotation consists of a list of two entries: the sum of the squared mapping qualities and the number of reads across variant (not homRef) genotypes
The root mean square is equivalent to the mean of the mapping qualities plus the standard deviation of the mapping qualities.
Modifier and Type | Field and Description |
---|---|
boolean |
allowOlderRawKeyValues |
static java.lang.String |
RMS_MAPPING_QUALITY_OLD_BEHAVIOR_OVERRIDE_ARGUMENT |
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,
AlleleLikelihoods<GATKRead,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,
AlleleLikelihoods<GATKRead,htsjdk.variant.variantcontext.Allele> likelihoods)
Generate the raw data necessary to calculate the annotation.
|
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_MAPPING_QUALITY_WITH_DEPTH_KEY into VCFConstants.RMS_MAPPING_QUALITY_KEY annotation if present
NOTE: this is currently only used by HaplotypeCaller in VCF mode and GnarlyGenotyper |
static java.lang.String |
getDeprecatedRawKeyName() |
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.lang.String |
getPrimaryRawKey()
Get the string that's used to combine data for this annotation
|
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.util.List<java.lang.String> |
getSecondaryRawKeys()
Get additional raw key strings that are not the primary key
|
boolean |
hasSecondaryRawKeys() |
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRawKeyNames
public static final java.lang.String RMS_MAPPING_QUALITY_OLD_BEHAVIOR_OVERRIDE_ARGUMENT
@Argument(fullName="allow-old-rms-mapping-quality-annotation-data", doc="Override to allow old RMSMappingQuality annotated VCFs to function", optional=true) public boolean allowOlderRawKeyValues
public java.lang.String getPrimaryRawKey()
ReducibleAnnotation
getPrimaryRawKey
in interface ReducibleAnnotation
public boolean hasSecondaryRawKeys()
hasSecondaryRawKeys
in interface ReducibleAnnotation
public java.util.List<java.lang.String> getSecondaryRawKeys()
getSecondaryRawKeys
in interface ReducibleAnnotation
public static java.lang.String getDeprecatedRawKeyName()
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, AlleleLikelihoods<GATKRead,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.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.util.Map<java.lang.String,java.lang.Object> annotate(ReferenceContext ref, htsjdk.variant.variantcontext.VariantContext vc, AlleleLikelihoods<GATKRead,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_MAPPING_QUALITY_WITH_DEPTH_KEY
into VCFConstants.RMS_MAPPING_QUALITY_KEY
annotation if present
NOTE: this is currently only used by HaplotypeCaller in VCF mode and GnarlyGenotypervc
- which potentially contains rawMQGATKVCFConstants.RAW_MAPPING_QUALITY_WITH_DEPTH_KEY
it will be replaced with VCFConstants.RMS_MAPPING_QUALITY_KEY
otherwise return the original vcpublic static RMSMappingQuality getInstance()