public abstract class GencodeGtfFeature extends java.lang.Object implements htsjdk.tribble.Feature, java.lang.Comparable<GencodeGtfFeature>
GencodeGtfFeature
represents data in a GENCODE GTF file.
Features are grouped logically by related data.
While the abstract class GencodeGtfFeature
represents a single line
of a GENCODE GTF File, the concrete instantiations represent at least one line,
and often more than one.
For example, a GencodeGtfGeneFeature
represents all lines in the given
data file with information on a particular gene. This includes all transcripts,
exons, coding regions, etc. in that gene.
Similarly, a GencodeGtfTranscriptFeature
represents all lines in the given
data file with information on a particular transcript.
However, a GencodeGtfSelenocysteineFeature
represents a particular line
in the given data file that contains information on a specific selenocysteine.
The specification of a GTF file is defined here:
http://mblab.wustl.edu/GTF22.html
Currently only supports GENCODE versions 19-26.
Created by jonn on 7/21/17.Modifier and Type | Class and Description |
---|---|
static class |
GencodeGtfFeature.AnnotationSource
Keyword identifying the source of the feature, like a program
(e.g.
|
static class |
GencodeGtfFeature.FeatureTag
Additional relevant information appended to a feature.
|
static class |
GencodeGtfFeature.FeatureType
Type of the feature represented in a single line of a GENCODE GTF File.
|
static class |
GencodeGtfFeature.GeneTranscriptStatus
Indication of whether a feature is new, tenatative, or already known.
|
static class |
GencodeGtfFeature.GeneTranscriptType
Biotype / transcript type for the transcript or gene represented in a feature.
|
static class |
GencodeGtfFeature.GenomicPhase
Whether the first base of the CDS segment is the first (frame 0), second (frame 1) or third (frame 2) \
in the codon of the ORF.
|
static class |
GencodeGtfFeature.LocusLevel
Status of how a position was annotated / verified:
1 - verified locus
2 - manually annotated locus
3 - automatically annotated locus
For more information, see:
https://www.gencodegenes.org/data_format.html
https://en.wikipedia.org/wiki/General_feature_format
|
static class |
GencodeGtfFeature.OptionalField<T> |
static class |
GencodeGtfFeature.RemapStatus
Attribute that indicates the status of the mapping.
|
static class |
GencodeGtfFeature.RemapTargetStatus
Attribute that compares the mapping to the existing target annotations.
|
static class |
GencodeGtfFeature.TranscriptSupportLevel
Transcript score according to how well mRNA and EST alignments match over its full length.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANNOTATION_SOURCE_ENA |
static java.lang.String |
ANNOTATION_SOURCE_ENSEMBL |
static java.lang.String |
ANNOTATION_SOURCE_HAVANA |
static java.lang.String |
EXTRA_FIELD_KEY_VALUE_SPLITTER |
static int |
NO_EXON_NUMBER |
static int |
NO_FEATURE_ORDER |
Modifier | Constructor and Description |
---|---|
protected |
GencodeGtfFeature(GencodeGtfFeatureBaseData baseData)
Populate this GencodeGtfFeature with the given data.
|
protected |
GencodeGtfFeature(java.lang.String[] gtfFields,
java.lang.String gtfFileType)
Populate this GencodeGtfFeature with the given data.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GencodeGtfFeature other)
Comparable interface implementation for
GencodeGtfFeature . |
boolean |
contains(htsjdk.samtools.util.Locatable other)
Checks if
other is contained within this GencodeGtfFeature . |
static GencodeGtfFeature |
create(GencodeGtfFeatureBaseData baseData)
Create the appropriate
GencodeGtfFeature object based on the given baseData |
static GencodeGtfFeature |
create(java.lang.String[] gtfFields,
java.lang.String gtfFileType)
Create a
GencodeGtfFeature based on a line from a Gencode GTF File. |
static GencodeGtfFeature |
create(java.lang.String gtfLine,
java.lang.String gtfFileType)
Create a
GencodeGtfFeature based on a line from a Gencode GTF File. |
boolean |
equals(java.lang.Object that) |
java.lang.String |
getAnnotationSource() |
java.lang.String |
getAnonymousOptionalFields() |
java.lang.String |
getChromosomeName() |
java.lang.String |
getContig() |
int |
getEnd() |
java.lang.String |
getExonId() |
int |
getExonNumber() |
int |
getFeatureOrderNumber() |
GencodeGtfFeature.FeatureType |
getFeatureType() |
java.lang.String |
getGeneId() |
java.lang.String |
getGeneName() |
GencodeGtfFeature.GeneTranscriptStatus |
getGeneStatus() |
GencodeGtfFeature.GeneTranscriptType |
getGeneType() |
int |
getGenomicEndLocation() |
GencodeGtfFeature.GenomicPhase |
getGenomicPhase() |
SimpleInterval |
getGenomicPosition() |
int |
getGenomicStartLocation() |
htsjdk.tribble.annotation.Strand |
getGenomicStrand() |
java.lang.String |
getGtfSourceFileType() |
GencodeGtfFeature.LocusLevel |
getLocusLevel() |
GencodeGtfFeature.OptionalField<?> |
getOptionalField(java.lang.String key) |
java.util.List<GencodeGtfFeature.OptionalField<?>> |
getOptionalFields() |
int |
getStart() |
java.lang.String |
getTranscriptId() |
java.lang.String |
getTranscriptName() |
GencodeGtfFeature.GeneTranscriptStatus |
getTranscriptStatus() |
GencodeGtfFeature.GeneTranscriptType |
getTranscriptType() |
java.lang.String |
getUcscGenomeVersion() |
int |
hashCode() |
boolean |
overlaps(htsjdk.samtools.util.Locatable other)
Checks if
other overlaps with this GencodeGtfFeature . |
java.lang.String |
serializeToString()
Serializes all data in
GencodeGtfFeature to a string. |
void |
setFeatureOrderNumber(int featureOrderNumber) |
void |
setUcscGenomeVersion(java.lang.String ucscGenomeVersion) |
java.lang.String |
toString() |
public static final java.lang.String ANNOTATION_SOURCE_ENSEMBL
public static final java.lang.String ANNOTATION_SOURCE_HAVANA
public static final java.lang.String ANNOTATION_SOURCE_ENA
public static final int NO_FEATURE_ORDER
public static final int NO_EXON_NUMBER
public static final java.lang.String EXTRA_FIELD_KEY_VALUE_SPLITTER
protected GencodeGtfFeature(java.lang.String[] gtfFields, java.lang.String gtfFileType)
gtfFields
- String[]
containing an ordered list of fields to use to populate this GencodeGtfFeature
.gtfFileType
- A String
containing the file type of the GTF data that created this GencodeGtfFeature
.protected GencodeGtfFeature(GencodeGtfFeatureBaseData baseData)
public static GencodeGtfFeature create(GencodeGtfFeatureBaseData baseData)
GencodeGtfFeature
object based on the given baseData
baseData
- A GencodeGtfFeatureBaseData
object containing all data for a single line in a GENCODE GTF File.GencodeGtfFeature
containing the data in baseData
public static GencodeGtfFeature create(java.lang.String gtfLine, java.lang.String gtfFileType)
GencodeGtfFeature
based on a line from a Gencode GTF File.gtfLine
- A line from a Gencode GTF File to convert into a GencodeGtfFeature
object.gtfFileType
- A String
containing the file type of the GTF data that created this GencodeGtfFeature
.GencodeGtfFeature
representing the information in gtfLine
public static GencodeGtfFeature create(java.lang.String[] gtfFields, java.lang.String gtfFileType)
GencodeGtfFeature
based on a line from a Gencode GTF File.gtfFields
- A line from a Gencode GTF File split on the FIELD_DELIMITER
character.gtfFileType
- A String
containing the file type of the GTF data that created this GencodeGtfFeature
.GencodeGtfFeature
representing the information in gtfLine
public java.lang.String getContig()
getContig
in interface htsjdk.samtools.util.Locatable
public int getStart()
getStart
in interface htsjdk.samtools.util.Locatable
public int getEnd()
getEnd
in interface htsjdk.samtools.util.Locatable
public java.lang.String serializeToString()
GencodeGtfFeature
to a string.
This includes all subfields of child classes.String
representing this GencodeGtfFeature
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getGtfSourceFileType()
public java.lang.String getUcscGenomeVersion()
public void setUcscGenomeVersion(java.lang.String ucscGenomeVersion)
public SimpleInterval getGenomicPosition()
public int getFeatureOrderNumber()
public java.lang.String getChromosomeName()
public java.lang.String getAnnotationSource()
public GencodeGtfFeature.FeatureType getFeatureType()
public int getGenomicStartLocation()
public int getGenomicEndLocation()
public htsjdk.tribble.annotation.Strand getGenomicStrand()
public GencodeGtfFeature.GenomicPhase getGenomicPhase()
public java.lang.String getGeneId()
public java.lang.String getTranscriptId()
public GencodeGtfFeature.GeneTranscriptType getGeneType()
public java.lang.String getGeneName()
public GencodeGtfFeature.GeneTranscriptType getTranscriptType()
public java.lang.String getTranscriptName()
public GencodeGtfFeature.GeneTranscriptStatus getGeneStatus()
public GencodeGtfFeature.GeneTranscriptStatus getTranscriptStatus()
public int getExonNumber()
public java.lang.String getExonId()
public GencodeGtfFeature.LocusLevel getLocusLevel()
public java.util.List<GencodeGtfFeature.OptionalField<?>> getOptionalFields()
public java.lang.String getAnonymousOptionalFields()
public GencodeGtfFeature.OptionalField<?> getOptionalField(java.lang.String key)
public int compareTo(GencodeGtfFeature other)
GencodeGtfFeature
.
Order is determined by GencodeGtfFeatureBaseData.featureOrderNumber
compareTo
in interface java.lang.Comparable<GencodeGtfFeature>
other
- GencodeGtfFeature
to which to comparepublic boolean equals(java.lang.Object that)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean contains(htsjdk.samtools.util.Locatable other)
other
is contained within this GencodeGtfFeature
.
Comparison is made using SimpleInterval.contains(Locatable)
ala GencodeGtfFeatureBaseData.genomicPosition
contains
in interface htsjdk.samtools.util.Locatable
other
- Locatable
of which to check the bounds.other
is contained within the bounds of this GencodeGtfFeature
, false otherwise.public boolean overlaps(htsjdk.samtools.util.Locatable other)
other
overlaps with this GencodeGtfFeature
.
Comparison is made using SimpleInterval.overlaps(Locatable)
ala GencodeGtfFeatureBaseData.genomicPosition
overlaps
in interface htsjdk.samtools.util.Locatable
other
- Locatable
-derived class of which to check the bounds.other
overlaps the bounds of this GencodeGtfFeature
, false otherwise.public void setFeatureOrderNumber(int featureOrderNumber)