public final class Annotation extends Object implements VariantDescription, Comparable<Annotation>
VariantDescription
interface for quicker access to the variant description information.Modifier and Type | Field and Description |
---|---|
static String |
INFO_EFFECT
This line is added to the output of a VCF file annotated by Jannovar and describes the new field for the INFO
section entitled EFFECT, which decribes the effects of variants (splicing,missense,stoploss, etc).
|
static String |
INFO_HGVS
This line is added to the output of a VCF file annotated by Jannovar and describes the new field for the INFO
section entitled HGVS, which provides the HGVS encoded variant corresponding to the chromosomal variant in the
original VCF file.
|
static String |
VCF_ANN_DESCRIPTION_STRING
The DESCRIPTION string to use in the VCF header for VCFVariantAnnotation objects
|
Constructor and Description |
---|
Annotation(Collection<AnnotationMessage> messages)
Initialize object with messages only.
|
Annotation(TranscriptModel transcript,
GenomeVariant change,
Collection<VariantEffect> effects,
AnnotationLocation annoLoc,
NucleotideChange genomicNTChange,
NucleotideChange cdsNTChange,
ProteinChange proteinChange)
Initialize the
Annotation with the given values. |
Annotation(TranscriptModel transcript,
GenomeVariant change,
Collection<VariantEffect> varTypes,
AnnotationLocation annoLoc,
NucleotideChange genomicNTChange,
NucleotideChange cdsNTChange,
ProteinChange proteinChange,
Collection<AnnotationMessage> messages)
Initialize the
Annotation with the given values. |
public static final String INFO_EFFECT
public static final String INFO_HGVS
public static final String VCF_ANN_DESCRIPTION_STRING
public Annotation(Collection<AnnotationMessage> messages)
messages
- AnnotationMessage
s to use in this annotationpublic Annotation(TranscriptModel transcript, GenomeVariant change, Collection<VariantEffect> effects, AnnotationLocation annoLoc, NucleotideChange genomicNTChange, NucleotideChange cdsNTChange, ProteinChange proteinChange)
Annotation
with the given values.
The constructor will sort effects
by pathogenicity before storing.change
- the annotated GenomeVariant
transcript
- transcript for this annotationeffects
- type of the variantsannoLoc
- location of the variantgenomicNTChange
- ghromosome/genome-level change, to be prepended with "g."cdsNTChange
- CDS-level NucleotideChange
proteinChange
- predicted ProteinChange
public Annotation(TranscriptModel transcript, GenomeVariant change, Collection<VariantEffect> varTypes, AnnotationLocation annoLoc, NucleotideChange genomicNTChange, NucleotideChange cdsNTChange, ProteinChange proteinChange, Collection<AnnotationMessage> messages)
Annotation
with the given values.
The constructor will sort effects
by pathogenicity before storing.transcript
- transcript for this annotationchange
- the annotated GenomeVariant
varTypes
- type of the variantsannoLoc
- location of the variantgenomicNTChange
- ghromosome/genome-level change, to be prepended with "g."cdsNTChange
- CDS-level NucleotideChange
proteinChange
- ProteinChange
with a predicted protein changemessages
- Collection
of AnnotationMessage
objectspublic GenomeVariant getGenomeVariant()
GenomeVariant
public com.google.common.collect.ImmutableSortedSet<VariantEffect> getEffects()
public com.google.common.collect.ImmutableSortedSet<AnnotationMessage> getMessages()
public AnnotationLocation getAnnoLoc()
null
if not even nearby a TranscriptModel
public NucleotideChange getGenomicNTChange()
NucleotideChange
with genomic changespublic String getGenomicNTChangeStr()
public NucleotideChange getCDSNTChange()
NucleotideChange
with changes on the CDS level for coding transcripts and on the transcript level
otherwise, null if the change does not affect any transcriptpublic String getCDSNTChangeStr()
public ProteinChange getProteinChange()
ProteinChange
public String getProteinChangeStr(AminoAcidCode code)
code
- the protein change code to use.public String getProteinChangeStr()
ProteinChange.toHGVSString()
.public TranscriptModel getTranscript()
null
for VariantEffect.INTERGENIC_VARIANT
annotationspublic PutativeImpact getPutativeImpact()
PutativeImpact
of all getEffects()
.public String toVCFAnnoString(String alt, boolean escape)
ALT
allele.
The ALT
allele has to be given to this function since we trim away at least the first base of
REF
/ALT
.alt
- alt alleleescape
- whether or not to escape the invalid VCF characters, e.g. '='
.public String toVCFAnnoString(String alt)
toVCFAnnoString(alt, true)
.alt
- alternateve allelepublic String getGeneSymbol()
"."
if it has no transcript."."
public String getSymbolAndAnnotation(AminoAcidCode code)
"KIAA1751:uc001aim.1:exon18:c.T2287C:p.X763Q"
.code
- the amino acid codenull
if transcript
is null
public VariantEffect getMostPathogenicVarType()
VariantEffect
link effects
, null
if none.public String getChrName()
getChrName
in interface VariantDescription
public int getChr()
getChr
in interface VariantDescription
public int getPos()
getPos
in interface VariantDescription
public String getRef()
getRef
in interface VariantDescription
public String getAlt()
getAlt
in interface VariantDescription
public int compareTo(Annotation other)
compareTo
in interface VariantDescription
compareTo
in interface Comparable<Annotation>
Copyright © 2016. All rights reserved.