apollo.datamodel
Interface SeqFeatureI

All Superinterfaces:
java.lang.Cloneable, RangeI, java.io.Serializable
All Known Subinterfaces:
AnnotatedFeatureI, ExonI, FeaturePairI, FeatureSetI, StrandedFeatureSetI
All Known Implementing Classes:
AnnotatedFeature, AssemblyFeature, Exon, FeaturePair, FeatureSet, Protein, SeqFeature, SequenceEdit, StrandedFeatureSet, Transcript

public interface SeqFeatureI
extends RangeI


Field Summary
 
Fields inherited from interface apollo.datamodel.RangeI
NO_NAME, NO_TYPE
 
Method Summary
 void accept(Visitor visitor)
          A general utility method to accept Visitors.
 void addDbXref(DbXref xref)
           
 void addFeature(SeqFeatureI child)
          Add child feature
 void addFeature(SeqFeatureI feature, boolean sort)
          Add feature at sorted position
 void addProperty(java.lang.String name, java.lang.String property)
           
 void addScore(double score)
           
 void addScore(Score s)
           
 void addScore(java.lang.String name, double score)
           
 void addScore(java.lang.String name, java.lang.String score)
           
 boolean alignmentIsPeptide()
          Sequence of the alignment of hit to query, previously stored in hit features subject_alignment property.
 void clearKids()
          clear out allkids - if have any
 void clearProperties()
           
 java.lang.Object clone()
          to get a field-by-field replica of this feature
 SeqFeatureI cloneFeature()
          clones feature
 int compareTo(java.lang.Object sfObj)
           
 boolean descendsFrom(SeqFeatureI sf)
          This is the opposite of isAncestor.
 void flipFlop()
          This is used simply to move the feature directly to the opposite strand, without complementation of the Reference Sequence
 java.lang.String get_cDNA()
           
 java.lang.String getAlignment()
          Alignment will be padded if peptide
 SeqFeatureI getAnalogousOppositeStrandFeature()
          Returns null if hasAnalogousOppositeStrandFeatureSet is false.
 AnnotatedFeatureI getAnnotatedFeature()
          if hasAnnotatedFeature is true, this returns the AnnotatedFeature
 java.lang.String getCigar()
          an explicit variable for cigar strings that are compact representations of alignments
 SeqFeatureI getCloneSource()
          If this feature was cloned from another feature, return the original feature.
 java.lang.String getCodingDNA()
          Returns a String of sequence from start to end of translation, in the case where a feature does not have a start and stop the cDNA is returned
 int getCodingProperties()
           
 java.lang.String getDatabase()
           
 DbXref getDbXref(int i)
           
 java.util.Vector getDbXrefs()
           
 int getEndPhase()
           
 java.lang.String getExplicitAlignment()
          Explicitly set alignment.
 SeqFeatureI getFeatureAt(int i)
          returns a seqfeature at the specified position - rename getChild(i) for clarity?
 SeqFeatureI getFeatureContaining(int position)
          Returns the FIRST child feature containing the position.
 int getFeatureIndex(SeqFeatureI child)
          Returns index of child if feat has child.
 int getFeaturePosition(int genomic_pos)
           
 java.util.Vector getFeatures()
          returns a vector of all the child features belonging to this feature.
 SequenceI getFeatureSequence()
          Retrieve the SequenceI defined by this feature itself.
 int getFrame()
           
 java.util.HashMap getGenomicErrors()
           
 int getGenomicPosForPeptidePos(int peptidePos)
          For a position in peptide coordinates get the corresponding genomic position
 int getGenomicPosition(int feature_pos)
           
 int getHend()
           
 int getHhigh()
           
 SeqFeatureI getHitFeature()
          if hasHitFeature true return hit, else return itself
 SequenceI getHitSequence()
          If feat has hit feat, or children with hit feat, then this is the seq associated with the hit or kid hits
 int getHlow()
           
 java.lang.String getHname()
          convenience function for getHitFeature().getName()
 int getHstart()
           
 int getHstrand()
           
 java.lang.String getId()
           
 FeatureList getLeafFeatsOver(int pos)
          This is used in the base editor to find the sub features that overlap a base with a sequence edit on it
 int getNumberOfChildren()
          Returns the number of features (not all descnedants) this feature has.
 int getNumberOfDescendents()
          The number of descendants (direct and indirect) in this FeatureSetI.
 FeatureSetI getParent()
          Returns refFeature as FeatureSetI which I believe it is always the case that the refFeature is a FeatureSetI
 SequenceI getPeptideSequence()
          If SeqFeatureI.hasPeptideSequence()==true returns pep seq, otherwise returns null
 int getPhase()
          Phase is the internal offset from feature start for translation.
 java.lang.String getProgramName()
           
 java.util.Hashtable getProperties()
           
 java.util.Hashtable getPropertiesMulti()
           
 java.lang.String getProperty(java.lang.String name)
           
 java.util.Vector getPropertyMulti(java.lang.String name)
           
 Protein getProteinFeat()
          getProteinFeature().getReferenceSequence() should replace getPeptideSeq()
 SeqFeatureI getRefFeature()
          Retrieve the parent SeqFeatureI for this SeqFeatureI, or null if it is a tree root.
 java.lang.String getRefId()
           
 double getScore()
           
 double getScore(java.lang.String score)
           
 java.util.Hashtable getScores()
           
 StrandedFeatureSetI getStrandedFeatSetAncestor()
           
 java.lang.String getSyntenyLinkInfo()
           
 java.lang.String getTopLevelType()
           
 TranslationI getTranslation()
           
 java.lang.String getUnpaddedAlignment()
          Alignment without padding.
 java.lang.Object getUserObject()
          ADDED BY TAIR Return the user object or null if none exists
 boolean hasAlignable()
          Returns true if feat has an alignable (may be an ISA but thats inconsequetial here)
 boolean hasAnalogousOppositeStrandFeature()
          Returns false if analog opp strand fs not set
 boolean hasAnnotatedFeature()
          Whether the SeqFeature is an annotation - annotation here meaning gene, transcript or exon - not just top level annot - i fear the term "annotation" has 2 meanings - strictly the top level annotation, and loosely any level of the annotation.
 boolean hasHitFeature()
          Whether SeqFeatureI has a hit feature.
 boolean hasId()
          returns false if getId() == null
 boolean hasKids()
          Returns false if getFeatures().size() == 0
 boolean hasPeptideSequence()
          Whether feature has a peptide sequence
 boolean hasSyntenyLinkInfo()
           
 boolean hasTranslation()
          im thinking maybe there should be a separate interface for translation methods (yes i know there is - its called a feature set) and seqfeatureI would have this - not be implemented in a subclass (or if it is not have that be noticaeable at the api/interface level) in other words a HASA not a ISA! i think that would be cleaner
 boolean haveExplicitAlignment()
           
 boolean haveRealAlignment()
           
 boolean isAncestorOf(SeqFeatureI sf)
          Whether this is the ancestor of sf.
 boolean isAnnot()
           
 boolean isAnnotTop()
          true for top level annots (e.g.
 boolean isClone()
          Check to see if this feature is a cloned feature
 boolean isCodon()
          Returns true if feature is start or stop codon
 boolean isExon()
           
 boolean isProtein()
           
 boolean isProteinCodingGene()
           
 boolean isSameFeat(SeqFeatureI seqFeat)
          Helper method designed to compare two feats which has just been initialized.
 boolean isSequencingError()
           
 boolean isTranscript()
          Return true is feature has translation start and stop.
 SeqFeatureI merge(SeqFeatureI sf)
           
 int numberOfGenerations()
          Returns the number of generations (including itself) that are at and below this feature.
 void parseCigar()
           
 void removeProperty(java.lang.String name)
           
 void replaceProperty(java.lang.String key, java.lang.String value)
           
 void setAlignment(java.lang.String alignment)
           
 void setAnalogousOppositeStrandFeature(SeqFeatureI oppositeFeature)
          As a convenience one can record what the analogous feature is on the opposite strand.
 void setCigar(java.lang.String cigar)
           
 void setDatabase(java.lang.String db)
           
 void setExplicitAlignment(java.lang.String explicitAlignment)
           
 void setId(java.lang.String id)
           
 void setPhase(int phase)
           
 void setProgramName(java.lang.String type)
           
 void setQueryFeature(SeqFeatureI queryFeat)
           
 void setRefFeature(SeqFeatureI refFeature)
          Set the parent SeqFeatureI.
 void setScore(double score)
           
 void setSyntenyLinkInfo(java.lang.String linkInfo)
          Trying this out?? can set information needed to make synteny links between features for the synteny viewer.
 void setTopLevelType(java.lang.String type)
           
 void setUserObject(java.lang.Object userObject)
          ADDED by TAIR Set the user object
 int size()
          merge this with getNumberOfChildren
 java.lang.String translate()
           
 
Methods inherited from interface apollo.datamodel.RangeI
canHaveChildren, contains, contains, convertFromBaseOrientedToInterbase, convertFromInterbaseToBaseOriented, getEnd, getFeatureType, getHigh, getLeftOverlap, getLow, getName, getRangeClone, getRefSequence, getResidues, getRightOverlap, getStart, getStrand, hasFeatureType, hasName, hasRefSequence, isContainedByRefSeq, isExactOverlap, isForwardStrand, isIdentical, isSequenceAvailable, length, overlaps, rangeIsUnassigned, sameRange, setEnd, setFeatureType, setHigh, setLow, setName, setRefSequence, setStart, setStrand
 

Method Detail

getId

java.lang.String getId()

setId

void setId(java.lang.String id)

hasId

boolean hasId()
returns false if getId() == null


flipFlop

void flipFlop()
This is used simply to move the feature directly to the opposite strand, without complementation of the Reference Sequence


getFeatureSequence

SequenceI getFeatureSequence()
Retrieve the SequenceI defined by this feature itself.

Returns:
the current self SequenceI

getRefId

java.lang.String getRefId()

getRefFeature

SeqFeatureI getRefFeature()
Retrieve the parent SeqFeatureI for this SeqFeatureI, or null if it is a tree root.

Returns:
the parent SeqFeatureI Couldnt this return a FeatureSetI, doesnt a ref feature have to be a FeatureSetI?

getParent

FeatureSetI getParent()
Returns refFeature as FeatureSetI which I believe it is always the case that the refFeature is a FeatureSetI


setRefFeature

void setRefFeature(SeqFeatureI refFeature)
Set the parent SeqFeatureI.

When building a part-whole hieracy of features, you must both add a feature to its parent, and then call child.setRefFeature(parent). It is possible for a feature to be added to multiple feature sets, but there is only one legitimate parent.

Parameters:
refFeature - the new parent SeqFeatureI

getTopLevelType

java.lang.String getTopLevelType()

setTopLevelType

void setTopLevelType(java.lang.String type)

getProgramName

java.lang.String getProgramName()

setProgramName

void setProgramName(java.lang.String type)

getDatabase

java.lang.String getDatabase()

setDatabase

void setDatabase(java.lang.String db)

getScore

double getScore()

getScore

double getScore(java.lang.String score)

getScores

java.util.Hashtable getScores()

setScore

void setScore(double score)

addScore

void addScore(Score s)

addScore

void addScore(double score)

addScore

void addScore(java.lang.String name,
              double score)

addScore

void addScore(java.lang.String name,
              java.lang.String score)

addProperty

void addProperty(java.lang.String name,
                 java.lang.String property)

removeProperty

void removeProperty(java.lang.String name)

getProperty

java.lang.String getProperty(java.lang.String name)

getProperties

java.util.Hashtable getProperties()

replaceProperty

void replaceProperty(java.lang.String key,
                     java.lang.String value)

clearProperties

void clearProperties()

getPropertiesMulti

java.util.Hashtable getPropertiesMulti()

getPropertyMulti

java.util.Vector getPropertyMulti(java.lang.String name)

getFrame

int getFrame()
Returns:
1,2, or 3 for frame, or -1 if no frame

setPhase

void setPhase(int phase)

getPhase

int getPhase()
Phase is the internal offset from feature start for translation. It is NOT the frame relative to the ref sequence.

Returns:
0, 1, or 2

getEndPhase

int getEndPhase()

compareTo

int compareTo(java.lang.Object sfObj)

merge

SeqFeatureI merge(SeqFeatureI sf)

translate

java.lang.String translate()

get_cDNA

java.lang.String get_cDNA()

getCodingDNA

java.lang.String getCodingDNA()
Returns a String of sequence from start to end of translation, in the case where a feature does not have a start and stop the cDNA is returned


getGenomicPosition

int getGenomicPosition(int feature_pos)

getGenomicPosForPeptidePos

int getGenomicPosForPeptidePos(int peptidePos)
For a position in peptide coordinates get the corresponding genomic position


getFeaturePosition

int getFeaturePosition(int genomic_pos)

getNumberOfChildren

int getNumberOfChildren()
Returns the number of features (not all descnedants) this feature has. 0 is returned if not a FeatureSetI


size

int size()
merge this with getNumberOfChildren


clearKids

void clearKids()
clear out allkids - if have any


getFeatures

java.util.Vector getFeatures()
returns a vector of all the child features belonging to this feature. an empty vector is returned if the feature is unable to have children - should this be renamed getChildren for clarity? This should be changed to return a FeatureList


hasKids

boolean hasKids()
Returns false if getFeatures().size() == 0


getFeatureAt

SeqFeatureI getFeatureAt(int i)
returns a seqfeature at the specified position - rename getChild(i) for clarity?


getFeatureIndex

int getFeatureIndex(SeqFeatureI child)
Returns index of child if feat has child. If not returns -1


addFeature

void addFeature(SeqFeatureI child)
Add child feature


addFeature

void addFeature(SeqFeatureI feature,
                boolean sort)
Add feature at sorted position


getNumberOfDescendents

int getNumberOfDescendents()
The number of descendants (direct and indirect) in this FeatureSetI. This method should find each child, and invoke numChildFeatures for each child that is a FeatureSetI, and add 1 to the count for all others. FeatureSetI implementors should not count themselves, but only the leaf SeqFeatureI implementations. This should be renamed numDescendants. numChild can lead one to think its its just the kids and not further descendants. In fact there should be 2 methods: numDescendants, numChildren

Returns:
the number of features contained anywhere under this FeatureSetI

numberOfGenerations

int numberOfGenerations()
Returns the number of generations (including itself) that are at and below this feature. In other words, how deep is the tree from this feature down to the leaves


accept

void accept(Visitor visitor)
A general utility method to accept Visitors.


isSameFeat

boolean isSameFeat(SeqFeatureI seqFeat)
Helper method designed to compare two feats which has just been initialized. If the name, start and end are not the default values, then we call Range.isIdentical. Otherwise, we compare the IDs.

Parameters:
seqFeat -
Returns:
boolean
See Also:
RangeI.isIdentical(RangeI range)

isAncestorOf

boolean isAncestorOf(SeqFeatureI sf)
Whether this is the ancestor of sf. For a feature set this is true if sf is a descendant of this or equal. For SeqFeature(non FeatureSet) its true for equality. This replaces FeatureSetI.findFeature(sf) This needs to be renamed, there already is a contains from RangeI that means something totally different, having 2 different contains is confusing. Change to isAncestorOf(sf)


descendsFrom

boolean descendsFrom(SeqFeatureI sf)
This is the opposite of isAncestor. Returns true if descends from (or is equal to) the SeqFeatureI passed in


getLeafFeatsOver

FeatureList getLeafFeatsOver(int pos)
This is used in the base editor to find the sub features that overlap a base with a sequence edit on it


hasAnnotatedFeature

boolean hasAnnotatedFeature()
Whether the SeqFeature is an annotation - annotation here meaning gene, transcript or exon - not just top level annot - i fear the term "annotation" has 2 meanings - strictly the top level annotation, and loosely any level of the annotation. This needs to be resolved and made consistent. Should this be renamed hasAnnot - the fact that AnnotatedFeatureI extends SeqFeatureI is an implementation detail


isAnnot

boolean isAnnot()

getAnnotatedFeature

AnnotatedFeatureI getAnnotatedFeature()
if hasAnnotatedFeature is true, this returns the AnnotatedFeature


hasAlignable

boolean hasAlignable()
Returns true if feat has an alignable (may be an ISA but thats inconsequetial here)


hasHitFeature

boolean hasHitFeature()
Whether SeqFeatureI has a hit feature. FeaturePairI returns true.


getHitFeature

SeqFeatureI getHitFeature()
if hasHitFeature true return hit, else return itself


getHitSequence

SequenceI getHitSequence()
If feat has hit feat, or children with hit feat, then this is the seq associated with the hit or kid hits


setQueryFeature

void setQueryFeature(SeqFeatureI queryFeat)

getAlignment

java.lang.String getAlignment()
Alignment will be padded if peptide


setAlignment

void setAlignment(java.lang.String alignment)

getUnpaddedAlignment

java.lang.String getUnpaddedAlignment()
Alignment without padding. peptide alignment with no padding.


getExplicitAlignment

java.lang.String getExplicitAlignment()
Explicitly set alignment. no padding


setExplicitAlignment

void setExplicitAlignment(java.lang.String explicitAlignment)

haveExplicitAlignment

boolean haveExplicitAlignment()

haveRealAlignment

boolean haveRealAlignment()

getCigar

java.lang.String getCigar()
an explicit variable for cigar strings that are compact representations of alignments


setCigar

void setCigar(java.lang.String cigar)

parseCigar

void parseCigar()

getHname

java.lang.String getHname()
convenience function for getHitFeature().getName()


getHstart

int getHstart()

getHend

int getHend()

getHlow

int getHlow()

getHhigh

int getHhigh()

getHstrand

int getHstrand()

alignmentIsPeptide

boolean alignmentIsPeptide()
Sequence of the alignment of hit to query, previously stored in hit features subject_alignment property. If no actual alignment sequence returns hit sequence. When cigars get put in, this will calculate the alignment from the cigar and hit seq


hasPeptideSequence

boolean hasPeptideSequence()
Whether feature has a peptide sequence


getPeptideSequence

SequenceI getPeptideSequence()
If SeqFeatureI.hasPeptideSequence()==true returns pep seq, otherwise returns null


getProteinFeat

Protein getProteinFeat()
getProteinFeature().getReferenceSequence() should replace getPeptideSeq()


getFeatureContaining

SeqFeatureI getFeatureContaining(int position)
Returns the FIRST child feature containing the position. If no children returns self if self has position. position is genomic


clone

java.lang.Object clone()
to get a field-by-field replica of this feature


cloneFeature

SeqFeatureI cloneFeature()
clones feature


isClone

boolean isClone()
Check to see if this feature is a cloned feature

Returns:
whether this feature is a cloned feature

getCloneSource

SeqFeatureI getCloneSource()
If this feature was cloned from another feature, return the original feature. Note that the original feature may have changed since the time of cloning. Returns null if this is not a cloned feature.

Returns:
the source of the cloned feature

setAnalogousOppositeStrandFeature

void setAnalogousOppositeStrandFeature(SeqFeatureI oppositeFeature)
As a convenience one can record what the analogous feature is on the opposite strand. For instance a forward strand EST "analysis" would hold the reverse strand EST analysis. This comes in handy for moving results to opposite strand.


hasAnalogousOppositeStrandFeature

boolean hasAnalogousOppositeStrandFeature()
Returns false if analog opp strand fs not set


getAnalogousOppositeStrandFeature

SeqFeatureI getAnalogousOppositeStrandFeature()
Returns null if hasAnalogousOppositeStrandFeatureSet is false. Otherwise returns the analog opposite strand feature set


isTranscript

boolean isTranscript()
Return true is feature has translation start and stop. transcript returns true - should this be renamed isTranscript? should FeatureSet potentially return true


isExon

boolean isExon()

isProtein

boolean isProtein()

isSequencingError

boolean isSequencingError()

isAnnotTop

boolean isAnnotTop()
true for top level annots (e.g. genes & 1 level annots not transcripts nor exons) i think we also need an isResultTop or just isTop() especially if results get more varied in structure - like 1 level results


hasTranslation

boolean hasTranslation()
im thinking maybe there should be a separate interface for translation methods (yes i know there is - its called a feature set) and seqfeatureI would have this - not be implemented in a subclass (or if it is not have that be noticaeable at the api/interface level) in other words a HASA not a ISA! i think that would be cleaner


isProteinCodingGene

boolean isProteinCodingGene()

getTranslation

TranslationI getTranslation()

addDbXref

void addDbXref(DbXref xref)

getDbXrefs

java.util.Vector getDbXrefs()

getDbXref

DbXref getDbXref(int i)

getGenomicErrors

java.util.HashMap getGenomicErrors()

setUserObject

void setUserObject(java.lang.Object userObject)
ADDED by TAIR Set the user object


getUserObject

java.lang.Object getUserObject()
ADDED BY TAIR Return the user object or null if none exists


getCodingProperties

int getCodingProperties()

getStrandedFeatSetAncestor

StrandedFeatureSetI getStrandedFeatSetAncestor()

isCodon

boolean isCodon()
Returns true if feature is start or stop codon


setSyntenyLinkInfo

void setSyntenyLinkInfo(java.lang.String linkInfo)
Trying this out?? can set information needed to make synteny links between features for the synteny viewer. for now just a string (may need to be more involved in the future) actually this needs to be a list! so either set(List) or add(String) refactor!


getSyntenyLinkInfo

java.lang.String getSyntenyLinkInfo()

hasSyntenyLinkInfo

boolean hasSyntenyLinkInfo()