edu.unc.csbio.data
Class Gene

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

public class Gene
extends Feature

The class Gene inherits abstract class Feature and contains information of gene.

Version:
0.1
Author:
Shunping Huang , Jack Wang

Field Summary
private  java.lang.String biotype
          The name, id and biotype of the gene.
private  java.lang.String id
          The name, id and biotype of the gene.
private  java.lang.String name
          The name, id and biotype of the gene.
private  java.util.ArrayList<Transcript> transcripts
          An ArrayList of transcripts in the gene
 
Fields inherited from class edu.unc.csbio.data.Feature
chrom, end, start
 
Constructor Summary
Gene(java.lang.String _id, java.lang.String _name, java.lang.String _biotype, Transcript _t)
          A constructor for Gene object
 
Method Summary
 void addTranscript(Transcript t)
          The method to add a new transcript
 int getLength()
          The method to get the exon part length of the gene
 java.util.ArrayList<Transcript> getTranscripts()
          The method to get transcripts in the gene
 java.lang.String toString()
          A method to get gene 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, id and biotype of the gene.


id

private java.lang.String id
The name, id and biotype of the gene.


biotype

private java.lang.String biotype
The name, id and biotype of the gene.


transcripts

private java.util.ArrayList<Transcript> transcripts
An ArrayList of transcripts in the gene

Constructor Detail

Gene

public Gene(java.lang.String _id,
            java.lang.String _name,
            java.lang.String _biotype,
            Transcript _t)
A constructor for Gene object

Parameters:
_id - id of the gene
_name - name of the gene
_biotype - biotype of the gene
_t - a list of transcript in the gene
Method Detail

getTranscripts

public java.util.ArrayList<Transcript> getTranscripts()
The method to get transcripts in the gene

Returns:
an ArrayList of transcripts

addTranscript

public void addTranscript(Transcript t)
The method to add a new transcript


getLength

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

Overrides:
getLength in class Feature
Returns:
the length of a transcript, which has the max length

toString

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

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