|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectapollo.gui.detailviewers.sequencealigner.Tier
public class Tier
A Tier is a container class that holds a set of non overlapping SeqFeatureI's. When referencing a position the 0th position corresponds to the first base in the reference sequence. The level of a tier is related to the different perspectives at which you can look at a tier. The Level.TOP is a view of the tier at a transcript level while the Level.BOTTOM corresponds to the exon level view. At each level a position is associated with a range, if that range corresponds to a feature then a position is also associated to that feature. The strand of a tier identifies how to translate from a tier position to a chromosome relative position. When adding features to a tier they should all be of the same strand type, and reading frame. Additionally all added features should be within the bounds of the reference sequence. Are type and phase needed?
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface apollo.gui.detailviewers.sequencealigner.TierI |
|---|
TierI.Level |
| Field Summary | |
|---|---|
protected java.util.Map<TierI.Level,org.bdgp.util.RangeHash> |
views
The different levels this tier can be viewed from. |
| Constructor Summary | |
|---|---|
Tier(SequenceI reference,
Strand strand,
ReadingFrame readingFrame)
Creates a new Tier |
|
| Method Summary | |
|---|---|
boolean |
addFeature(SeqFeatureI feature)
Adds the feature to this Tier |
java.util.Collection<SeqFeatureI> |
addFeatures(java.util.Collection<SeqFeatureI> features)
Adds a collection of features to this tier |
char |
charAt(int position)
Returns the base on the reference sequence for a given position |
void |
clear()
|
SeqFeatureI |
featureAt(int position,
TierI.Level level)
Gets the feature that contains a given position |
boolean |
featureExsitsAt(int position,
TierI.Level level)
Determines if there exsists a feature at a given position |
SeqFeatureI |
featureIn(org.bdgp.util.Range range,
boolean exact,
TierI.Level level)
Gets the first(?) feature within a given range inclusive(?) |
java.util.Collection<SeqFeatureI> |
featuresIn(org.bdgp.util.Range range,
TierI.Level level)
Gets all of the features within a given range |
int |
getBasePair(int position)
Translates a position on the tier into base pair coordinates. |
int |
getBoundaryType(int position,
TierI.Level level)
Returns the type of boundary of a base at a given position and level. |
java.util.Collection<SeqFeatureI> |
getFeatures(TierI.Level level)
Gets a collection of all the top level features in the tier |
int |
getHigh()
Gets the highest position on this tier |
int |
getLow()
Gets the lowest position on this tier |
SeqFeatureI |
getNextFeature(int position,
TierI.Level level)
gets the next feature in the 3' direction |
int |
getPosition(int basePair)
Translates a base pair coordinate into a position on the tier |
SeqFeatureI |
getPrevFeature(int position,
TierI.Level level)
gets the next feature in the 5' direction |
ReadingFrame |
getReadingFrame()
|
SequenceI |
getReference()
Returns the sequence which is used as a reference for this tier. |
Strand |
getStrand()
Gets the strand of this tier. |
SequenceType |
getType()
|
boolean |
handleAnnotationChangeEvent(AnnotationChangeEvent evt)
|
int |
numFeatures(TierI.Level level)
Gets the number of features at a given level. |
org.bdgp.util.Range |
rangeAt(int position,
TierI.Level level)
Returns the range that corresponds to a given position at a level. |
void |
removeFeature(SeqFeatureI feature)
Removes a given feature from this tier. |
void |
setReadingFrame(ReadingFrame rf)
|
void |
setReference(SequenceI s)
|
void |
setStrand(Strand s)
|
boolean |
willOverlap(SeqFeatureI feature)
Determine weather or not a feature will overlap with another feature already in the tier. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<TierI.Level,org.bdgp.util.RangeHash> views
| Constructor Detail |
|---|
public Tier(SequenceI reference,
Strand strand,
ReadingFrame readingFrame)
reference - the sequence on which the tier is basedstrand - the strand of the tierphase - the reading frame of the tier| Method Detail |
|---|
public boolean addFeature(SeqFeatureI feature)
addFeature in interface TierIfeature - the feature to be added
Calls willOverlappublic java.util.Collection<SeqFeatureI> addFeatures(java.util.Collection<SeqFeatureI> features)
addFeatures in interface TierIfeatures - a collection of features to be added
Calls addFeature
public int getBoundaryType(int position,
TierI.Level level)
getBoundaryType in interface TierIposition - the position to look atlevel - the level to look at
apollo.gui.detailviewers.exonviewer.TierI#boundaryTypeAt(int, int)public char charAt(int position)
charAt in interface TierIposition - the position of the base that is returned
apollo.gui.detailviewers.exonviewer.TierI#charAt(int)
public SeqFeatureI featureAt(int position,
TierI.Level level)
featureAt in interface TierIposition - the position that should be within the returned featurelevel - the level to view the tier at
nullapollo.gui.detailviewers.exonviewer.TierI#featureAt(int, int)
public boolean featureExsitsAt(int position,
TierI.Level level)
featureExsitsAt in interface TierIposition - the position to look for a feature atlevel - the level to view the tier at
featureAt(position,level) returns a feature
false if it returns nullapollo.gui.detailviewers.exonviewer.TierI#featureExsitsAt(int, int)
public SeqFeatureI featureIn(org.bdgp.util.Range range,
boolean exact,
TierI.Level level)
featureIn in interface TierIrange - a position range to look for features withinexact - not sure...level - the level to view the tier atapollo.gui.detailviewers.exonviewer.TierI#featureIn(org.bdgp.util.Range,
boolean, int)
public java.util.Collection<SeqFeatureI> featuresIn(org.bdgp.util.Range range,
TierI.Level level)
featuresIn in interface TierIrange - a position range to look for the features withinlevel - the level to view the tier atapollo.gui.detailviewers.exonviewer.TierI#featuresIn(org.bdgp.util.Range,
int)public SequenceI getReference()
getReference in interface TierIapollo.gui.detailviewers.exonviewer.TierI#getReference()public void setReference(SequenceI s)
setReference in interface TierIpublic int numFeatures(TierI.Level level)
numFeatures in interface TierIlevel - the level to view the tier at
apollo.gui.detailviewers.exonviewer.TierI#numFeatures(int)
public org.bdgp.util.Range rangeAt(int position,
TierI.Level level)
rangeAt in interface TierIposition - a position within the tierlevel - a level to view the tier at
apollo.gui.detailviewers.exonviewer.TierI#rangeAt(int, int)public void removeFeature(SeqFeatureI feature)
removeFeature in interface TierIfeature - the feature to be removedapollo.gui.detailviewers.exonviewer.TierI#removeFeature(apollo.datamodel.SeqFeatureI)public java.util.Collection<SeqFeatureI> getFeatures(TierI.Level level)
getFeatures in interface TierIpublic int getHigh()
getHigh in interface org.bdgp.util.RangeRange.getHigh()public int getLow()
getLow in interface org.bdgp.util.RangeRange.getLow()public int getBasePair(int position)
getBasePair in interface TierIposition - a position within the tier
public int getPosition(int basePair)
getPosition in interface TierIbasePair - a base pair coordinate within the tier
public boolean willOverlap(SeqFeatureI feature)
willOverlap in interface TierIfeature - the feature to be tested
public Strand getStrand()
getStrand in interface TierIpublic void setStrand(Strand s)
setStrand in interface TierIpublic ReadingFrame getReadingFrame()
getReadingFrame in interface TierIpublic void setReadingFrame(ReadingFrame rf)
setReadingFrame in interface TierI
public SeqFeatureI getNextFeature(int position,
TierI.Level level)
getNextFeature in interface TierI
public SeqFeatureI getPrevFeature(int position,
TierI.Level level)
getPrevFeature in interface TierIpublic void clear()
clear in interface TierIpublic boolean handleAnnotationChangeEvent(AnnotationChangeEvent evt)
handleAnnotationChangeEvent in interface AnnotationChangeListenerpublic SequenceType getType()
getType in interface TierI
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||