edu.unc.csbio.data
Class Transcript

java.lang.Object
  extended by edu.unc.csbio.data.Feature
      extended by edu.unc.csbio.data.Transcript
All Implemented Interfaces:
java.lang.Comparable<Feature>

public class Transcript
extends Feature

The class Transcript inherits abstract class Feature and contains information of transcript.

Version:
0.1
Author:
Shunping Huang , Jack Wang

Field Summary
private  java.util.ArrayList<Exon> exons
          An ArrayList of exons in the gene
private  java.lang.String id
          The name and id of the transcript.
private  java.lang.String name
          The name and id of the transcript.
 
Fields inherited from class edu.unc.csbio.data.Feature
chrom, end, start
 
Constructor Summary
Transcript(java.lang.String _id, java.lang.String _name, Exon _e)
          A constructor for Transcript object
 
Method Summary
 void addExon(Exon e)
          The method to add a new exon
 java.lang.String getId()
          the method to get id of transcript
 int getLength()
          The method to get the exon part length of the transcript
 java.lang.String getSequence(SequenceBuffer motherSequence)
          The method to get a transcript sequence from a sequence buffer.
 int refPos(int seqPos)
          The method to convert a position in transcript sequence coordinate to the reference coordinate
 java.lang.String toString()
          A method to get transcript information
 
Methods inherited from class edu.unc.csbio.data.Feature
compareTo, getChromosome, getEnd, getRange, getStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name
The name and id of the transcript.


id

private java.lang.String id
The name and id of the transcript.


exons

private java.util.ArrayList<Exon> exons
An ArrayList of exons in the gene

Constructor Detail

Transcript

public Transcript(java.lang.String _id,
                  java.lang.String _name,
                  Exon _e)
A constructor for Transcript object

Parameters:
_id - id of the transcript
_name - name of the transcript
_e - the first exon in the transcript
Method Detail

getId

public java.lang.String getId()
the method to get id of transcript

Returns:
transcript id

addExon

public void addExon(Exon e)
The method to add a new exon


refPos

public int refPos(int seqPos)
The method to convert a position in transcript sequence coordinate to the reference coordinate

Returns:
the position in reference gene

getSequence

public java.lang.String getSequence(SequenceBuffer motherSequence)
The method to get a transcript sequence from a sequence buffer.

Parameters:
motherSequence - a sequence buffer
Returns:
a transcript sequence

getLength

public int getLength()
The method to get the exon part length of the transcript

Overrides:
getLength in class Feature
Returns:
the total length of all exons on the transcript

toString

public java.lang.String toString()
A method to get transcript information

Specified by:
toString in class Feature
Returns:
a string containing transcript id, name, biotype, chromosome name, start/end position and its exons information
See Also:
Object.toString()