public final class TranscriptProjectionDecorator extends Object
TranscriptModel
object and allow the coordinate conversion.Modifier and Type | Field and Description |
---|---|
static int |
INVALID_EXON_ID
constant for invalid exon index
|
static int |
INVALID_INTRON_ID
constant for invalid intron index
|
Constructor and Description |
---|
TranscriptProjectionDecorator(TranscriptModel transcript)
Initialize the object with the given
TranscriptModel |
Modifier and Type | Method and Description |
---|---|
GenomePosition |
cdsToGenomePos(CDSPosition pos)
Coordinate conversion from CDS to genome position.
|
TranscriptPosition |
cdsToTranscriptPos(CDSPosition pos)
Coordinate conversion from CDS to transcript position.
|
int |
exonIDInReferenceOrder(int exonID)
Returns the index of the (0-based) exon in the reference (forward) order.
|
CDSPosition |
genomeToCDSPos(GenomePosition pos)
Coordinate conversion from genome position to CDS position.
|
TranscriptPosition |
genomeToTranscriptPos(GenomePosition pos)
Coordinate conversion from genome position to transcript position.
|
String |
getCDSTranscript() |
TranscriptModel |
getTranscript() |
String |
getTranscriptStartingAtCDS() |
int |
locateExon(GenomePosition pos)
Returns (0-based) index of the exon (in the order determined by the transcript's strand).
|
int |
locateExon(TranscriptPosition pos)
Returns (0-based) index of the exon (in the order determined by the transcript's strand).
|
int |
locateIntron(GenomePosition pos)
Returns (0-based) index of the intron (in the order determined by the transcript's strand).
|
CDSInterval |
projectGenomeToCDSInterval(GenomeInterval interval)
|
CDSPosition |
projectGenomeToCDSPosition(GenomePosition pos)
|
TranscriptInterval |
projectGenomeToTXInterval(GenomeInterval interval)
|
TranscriptPosition |
projectGenomeToTXPosition(GenomePosition pos)
|
GenomePosition |
transcriptToGenomePos(TranscriptPosition pos)
Coordinate conversion from transcript to genome position.
|
public static final int INVALID_EXON_ID
public static final int INVALID_INTRON_ID
public TranscriptProjectionDecorator(TranscriptModel transcript)
TranscriptModel
transcript
- the TranscriptModel
to decoratepublic TranscriptModel getTranscript()
public String getCDSTranscript()
public String getTranscriptStartingAtCDS()
public TranscriptPosition genomeToTranscriptPos(GenomePosition pos) throws ProjectionException
pos
- genome position to convertpos
ProjectionException
- if the genome position was not validpublic CDSPosition genomeToCDSPos(GenomePosition pos) throws ProjectionException
pos
- genome position to convertpos
ProjectionException
- if the genome position was not validpublic TranscriptPosition cdsToTranscriptPos(CDSPosition pos)
pos
- the position in the CDS transcriptpublic GenomePosition cdsToGenomePos(CDSPosition pos) throws ProjectionException
pos
- the position in the CDS transcriptProjectionException
- on problems with the coordinate transformation (outside of the transcript)public GenomePosition transcriptToGenomePos(TranscriptPosition pos) throws ProjectionException
pos
- the position on the transcriptProjectionException
- on problems with the coordinate transformation (outside of the transcript)public int exonIDInReferenceOrder(int exonID)
exonID
- the 0-based exonID in transcript order (reverse order in the case of transcripts on the reverse
strand)public int locateIntron(GenomePosition pos)
pos
- the GenomePosition
to use for queryingINVALID_INTRON_ID
if pos is not in exonic
region but in transcript intervalpublic int locateExon(GenomePosition pos)
pos
- the GenomePosition
to use for queryingINVALID_EXON_ID
if pos is not in exonic region
but in transcript intervalpublic int locateExon(TranscriptPosition pos) throws ProjectionException
pos
- the TranscriptPosition
to use for queryingProjectionException
- if there was a problem with pos (somehow falls out of transcript region, can only happen if negative
or right of transcript end)public CDSPosition projectGenomeToCDSPosition(GenomePosition pos)
GenomePosition
to CDSPosition
for transcript
.
Positions upstream of CDS region are projected to the CDS begin position, downstream of CDS are projected to the
CDS end, positions in CDS introns are projected to first position of the next CDS exon.pos
- the position to translatepublic CDSInterval projectGenomeToCDSInterval(GenomeInterval interval)
GenomeInterval
to CDSInterval
for transcript
.
Positions upstream of CDS region are projected to the CDS begin position, downstream of CDS are projected to the
CDS end.interval
- the GenomeInterval
to projectpublic TranscriptPosition projectGenomeToTXPosition(GenomePosition pos)
GenomePosition
to TranscriptPosition
for transcript
.
Positions upstream of TX region are projected to the TX begin position, downstream of TX are projected to the TX
end, positions in introns are projected to first position of the next CDS exon.pos
- the position to translatepublic TranscriptInterval projectGenomeToTXInterval(GenomeInterval interval)
GenomeInterval
to TranscriptInterval
for transcript
.
Positions upstream of TX region are projected to the TX begin position, downstream of TX are projected to the TX
end.interval
- the GenomeInterval
to projectCopyright © 2016. All rights reserved.