apollo.datamodel
Class AnnotatedFeature

java.lang.Object
  extended by apollo.datamodel.Range
      extended by apollo.datamodel.SeqFeature
          extended by apollo.datamodel.FeatureSet
              extended by apollo.datamodel.AnnotatedFeature
All Implemented Interfaces:
AnnotatedFeatureI, Comparable, FeatureSetI, RangeI, SeqFeatureI, TranslationI, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AssemblyFeature, Exon, Protein, SequenceEdit, Transcript

public class AnnotatedFeature
extends FeatureSet
implements AnnotatedFeatureI

One thought Im having is that annotation stuff would be a HASA instead of a ISA for SeqFeatureI. So this object would not extend FeatureSet/SeqFeature, it would just contain these methods. A SeqFeatureI would optionally have one of these objects. just a thought.

See Also:
Serialized Form

Field Summary
protected  boolean annotationRoot
           
protected static org.apache.log4j.Logger logger
           
protected  java.lang.String owner
           
 
Fields inherited from class apollo.datamodel.FeatureSet
features, flags, genericReadThroughStopResidue, hitSequence, minus1_frameshift, missing_3prime, missing_5prime, plus1_frameshift, POLYA_REMOVED, readthrough_stop, standard_start_codon, start_codon, trans_spliced
 
Fields inherited from class apollo.datamodel.SeqFeature
biotype, edit_offset_adjust, id, phase, properties, ref_features, refFeature, refId, score, scores
 
Fields inherited from class apollo.datamodel.Range
high, low, name, refSeq, strand, type
 
Fields inherited from interface apollo.datamodel.RangeI
NO_NAME, NO_TYPE
 
Constructor Summary
AnnotatedFeature()
           
AnnotatedFeature(FeatureSetI fs, java.lang.String class_name)
           
AnnotatedFeature(SeqFeatureI sf)
           
 
Method Summary
 void accept(Visitor visitor)
          General implementation of Visitor pattern.
 void addComment(Comment comm)
           
 void addComment(int index, Comment comm)
           
 void addEvidence(Evidence evidence)
           
 void addEvidence(java.lang.String evidenceId)
           
 void addEvidence(java.lang.String evidenceId, int type)
           
 void addEvidence(java.lang.String evidenceId, java.lang.String setId, int type)
           
 void addSynonym(int index, java.lang.String syn)
           
 void addSynonym(java.lang.String syn)
          addSynonym used to refuse (quite reasonably) to add synonyms that are the same as the name of the feature, but Chado XML is rather fond of those reflexive synonyms, so go ahead and add them, what the heck.
 void addSynonym(Synonym syn)
           
 void clearComments()
           
 void clearSynonyms()
           
 java.lang.Object clone()
          to get a field-by-field replica of this feature
 AnnotatedFeatureI cloneAnnot()
           
 void deleteComment(Comment comm)
           
 void deleteComment(int i)
           
 int deleteEvidence(java.lang.String evidenceId)
           
 void deleteSynonym(java.lang.String syn)
           
 void deleteSynonym(Synonym syn)
           
 SequenceI get_cDNASequence()
          by default return null - overridden by Transcript subclass
 AnnotatedFeatureI getAnnotatedFeature()
          if hasAnnotatedFeature is true, this returns the AnnotatedFeature
 AnnotatedFeatureI getAnnotChild(int i)
          Return ith AnnotatedFeatureI child
 int getCommentIndex(Comment comm)
          Returns index of comment, -1 if not found
 java.util.Vector getComments()
           
 java.lang.String getDescription()
           
 java.util.Vector getEvidence()
           
 EvidenceFinder getEvidenceFinder()
           
 int getNonConsensusAcceptorNum()
          Returns transcript exon number with non consensus acceptor.
 int getNonConsensusDonorNum()
          Returns transcript exon number with non consensus donor.
 java.lang.String getOwner()
          Get owner of annotation.
 Synonym getSynonym(int i)
           
 java.util.Vector getSynonyms()
           
 java.util.Vector getSynonyms(boolean excludeInternalSynonyms)
           
 int getSynonymSize()
           
 boolean hasAnnotatedFeature()
          Whether the SeqFeature is an annotation - return false by default - AnnotatedFeature overrides
 boolean hasSynonym(java.lang.String name)
           
 boolean isAnnotTop()
          true for top level annots (e.g.
 boolean isFinished()
           
 boolean isProblematic()
           
 boolean isProteinCodingGene()
          This is the isProteinCodingGene method that really matters--the ones in other classes aren't really used.
 boolean nonConsensusSplicingOkay()
          Return true if non consensus splicing has been deemed ok.
 void nonConsensusSplicingOkay(boolean okay)
          Set whether its ok to have non-consensus splice site - no-op overridden by Transcript
 void setDescription(java.lang.String desc)
           
 void setEvidenceFinder(EvidenceFinder ef)
           
 void setIsProblematic(boolean isProblematic)
           
 void setOwner(java.lang.String owner)
          Set owner of annotation.
 java.lang.String toString()
          For debugging
 
Methods inherited from class apollo.datamodel.FeatureSet
addFeature, addFeature, adjustEdges, adjustEdges, beforeFivePrimeEnd, buildEditList, buildORFEditList, calcTranslationStartForLongestPeptide, canHaveChildren, clearKids, deleteFeature, deleteFeatureAt, findFeaturesByAllNames, findFeaturesByAllNames, findFeaturesByAllNames, findFeaturesByHitName, findFeaturesByName, findFeaturesByName, flipFlop, get_cDNA, get_ORF, get_ORF, getFeatureAt, getFeatureContaining, getFeatureIndex, getFeaturePosition, getFeatures, getGenomicPosForPeptidePos, getGenomicPosition, getHitSequence, getIndexContaining, getLastBaseOfStopCodon, getLeafFeatsOver, getName, getNumberOfDescendents, getPeptidePosForGenomicPos, getPositionFrom, getScore, getSequencingErrorAtPosition, getSplicedLength, getSplicedLength, getSplicedTranscript, getStartAA, getStartCodon, getTranslation, getTranslationEnd, getTranslationRange, getTranslationStart, hasDescendents, hasNameBeenSet, hasReadThroughStop, hasTranslation, hasTranslationEnd, hasTranslationStart, insertFeatureAt, isFlagSet, isMissing3prime, isMissing5prime, isSequencingErrorPosition, isTransSpliced, minus1FrameShiftPosition, pastThreePrimeEnd, plus1FrameShiftPosition, rangeIsUnassigned, readThroughStopPosition, readThroughStopResidue, setFlag, setHitSequence, setMinus1FrameShiftPosition, setMissing3prime, setMissing5prime, setPeptideValidity, setPhases, setPlus1FrameShiftPosition, setProteinCodingGene, setReadThroughStop, setReadThroughStop, setRefSequence, setTranslationEnd, setTranslationEndFromStart, setTranslationEndNoPhase, setTranslationStart, setTranslationStart, size, sort, sort, translate, unConventionalStart, withinCDS
 
Methods inherited from class apollo.datamodel.SeqFeature
addDbXref, addProperty, addRefFeature, addScore, addScore, addScore, addScore, alignmentIsPeptide, amend_RNA, buildmRNAEditList, clearProperties, cloneFeature, compareTo, descendsFrom, getAlignment, getAnalogousOppositeStrandFeature, getCigar, getCloneSource, getCodingDNA, getCodingProperties, getDatabase, getDbXref, getDbXrefs, getEndPhase, getExplicitAlignment, getFeatureSequence, getFrame, getGenomicErrors, getHend, getHhigh, getHitFeature, getHlow, getHname, getHstart, getHstrand, getId, getIdentifier, getNumberOfChildren, getParent, getPeptideSequence, getPhase, getPrimaryDbXref, getProgramName, getProperties, getPropertiesMulti, getProperty, getPropertyMulti, getProteinFeat, getRefFeature, getRefFeature, getRefId, getScore, getScores, getStrandedFeatSetAncestor, getSubSequence, getSyntenyLinkInfo, getTopLevelType, getUnpaddedAlignment, getUserObject, hasAlignable, hasAnalogousOppositeStrandFeature, hasCigar, hasHitFeature, hasId, hasKids, hasPeptideSequence, hasSyntenyLinkInfo, haveExplicitAlignment, haveRealAlignment, initWithSeqFeat, isAncestorOf, isAnnot, isClone, isCodon, isExon, isProtein, isSameFeat, isSequencingError, isTranscript, main, merge, na2aa, numberOfGenerations, parseCigar, removeProperty, replaceProperty, setAlignment, setAnalogousOppositeStrandFeature, setCigar, setDatabase, setExplicitAlignment, setId, setIdentifier, setPhase, setProgramName, setQueryFeature, setRefFeature, setScore, setSyntenyLinkInfo, setTopLevelType, setUserObject
 
Methods inherited from class apollo.datamodel.Range
contains, contains, convertFromBaseOrientedToInterbase, convertFromInterbaseToBaseOriented, getEnd, getEndAsString, getFeatureType, getHigh, getLeftOverlap, getLow, getRangeClone, getRefSequence, getResidues, getRightOverlap, getStart, getStartAsString, getStrand, hasFeatureType, hasName, hasRefSequence, isContainedByRefSeq, isExactOverlap, isForwardStrand, isIdentical, isSequenceAvailable, length, overlaps, sameRange, setEnd, setFeatureType, setHigh, setLow, setName, setStart, setStrand
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface apollo.datamodel.AnnotatedFeatureI
getIdentifier, setIdentifier
 
Methods inherited from interface apollo.datamodel.FeatureSetI
adjustEdges, adjustEdges, buildEditList, deleteFeature, deleteFeatureAt, findFeaturesByAllNames, findFeaturesByAllNames, findFeaturesByAllNames, findFeaturesByHitName, findFeaturesByName, findFeaturesByName, getHitSequence, getIndexContaining, getPositionFrom, getSequencingErrorAtPosition, getSplicedLength, getStartAA, getStartCodon, hasDescendents, hasNameBeenSet, hasReadThroughStop, isFlagSet, isSequencingErrorPosition, minus1FrameShiftPosition, plus1FrameShiftPosition, readThroughStopPosition, readThroughStopResidue, setFlag, setHitSequence, setMinus1FrameShiftPosition, setPlus1FrameShiftPosition, setProteinCodingGene, setReadThroughStop, setReadThroughStop, sort, sort, unConventionalStart, withinCDS
 
Methods inherited from interface apollo.datamodel.SeqFeatureI
addDbXref, addFeature, addFeature, addProperty, addScore, addScore, addScore, addScore, alignmentIsPeptide, clearKids, clearProperties, cloneFeature, compareTo, descendsFrom, flipFlop, get_cDNA, getAlignment, getAnalogousOppositeStrandFeature, getCigar, getCloneSource, getCodingDNA, getCodingProperties, getDatabase, getDbXref, getDbXrefs, getEndPhase, getExplicitAlignment, getFeatureAt, getFeatureContaining, getFeatureIndex, getFeaturePosition, getFeatures, getFeatureSequence, getFrame, getGenomicErrors, getGenomicPosForPeptidePos, getGenomicPosition, getHend, getHhigh, getHitFeature, getHlow, getHname, getHstart, getHstrand, getId, getLeafFeatsOver, getNumberOfChildren, getNumberOfDescendents, getParent, getPeptideSequence, getPhase, getProgramName, getProperties, getPropertiesMulti, getProperty, getPropertyMulti, getProteinFeat, getRefFeature, getRefId, getScore, getScore, getScores, getStrandedFeatSetAncestor, getSyntenyLinkInfo, getTopLevelType, getTranslation, getUnpaddedAlignment, getUserObject, hasAlignable, hasAnalogousOppositeStrandFeature, hasHitFeature, hasId, hasKids, hasPeptideSequence, hasSyntenyLinkInfo, hasTranslation, haveExplicitAlignment, haveRealAlignment, isAncestorOf, isAnnot, isClone, isCodon, isExon, isProtein, isSameFeat, isSequencingError, isTranscript, merge, numberOfGenerations, parseCigar, removeProperty, replaceProperty, setAlignment, setAnalogousOppositeStrandFeature, setCigar, setDatabase, setExplicitAlignment, setId, setPhase, setProgramName, setQueryFeature, setRefFeature, setScore, setSyntenyLinkInfo, setTopLevelType, setUserObject, size, 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
 
Methods inherited from interface apollo.datamodel.TranslationI
calcTranslationStartForLongestPeptide, getLastBaseOfStopCodon, getTranslationEnd, getTranslationRange, getTranslationStart, hasTranslationEnd, hasTranslationStart, isMissing3prime, isMissing5prime, setMissing3prime, setMissing5prime, setPeptideValidity, setTranslationEnd, setTranslationEndFromStart, setTranslationStart, setTranslationStart
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

annotationRoot

protected boolean annotationRoot

owner

protected java.lang.String owner
Constructor Detail

AnnotatedFeature

public AnnotatedFeature()

AnnotatedFeature

public AnnotatedFeature(SeqFeatureI sf)

AnnotatedFeature

public AnnotatedFeature(FeatureSetI fs,
                        java.lang.String class_name)
Method Detail

cloneAnnot

public AnnotatedFeatureI cloneAnnot()
Specified by:
cloneAnnot in interface AnnotatedFeatureI

accept

public void accept(Visitor visitor)
General implementation of Visitor pattern. (see apollo.util.Visitor).

Specified by:
accept in interface SeqFeatureI
Overrides:
accept in class FeatureSet

toString

public java.lang.String toString()
Description copied from class: FeatureSet
For debugging

Overrides:
toString in class FeatureSet

getEvidence

public java.util.Vector getEvidence()
Specified by:
getEvidence in interface AnnotatedFeatureI

addEvidence

public void addEvidence(java.lang.String evidenceId,
                        java.lang.String setId,
                        int type)

addEvidence

public void addEvidence(java.lang.String evidenceId)
Specified by:
addEvidence in interface AnnotatedFeatureI

addEvidence

public void addEvidence(java.lang.String evidenceId,
                        int type)
Specified by:
addEvidence in interface AnnotatedFeatureI

addEvidence

public void addEvidence(Evidence evidence)
Specified by:
addEvidence in interface AnnotatedFeatureI

deleteEvidence

public int deleteEvidence(java.lang.String evidenceId)
Specified by:
deleteEvidence in interface AnnotatedFeatureI

setEvidenceFinder

public void setEvidenceFinder(EvidenceFinder ef)
Specified by:
setEvidenceFinder in interface AnnotatedFeatureI

getEvidenceFinder

public EvidenceFinder getEvidenceFinder()
Specified by:
getEvidenceFinder in interface AnnotatedFeatureI

getComments

public java.util.Vector getComments()
Specified by:
getComments in interface AnnotatedFeatureI

getCommentIndex

public int getCommentIndex(Comment comm)
Returns index of comment, -1 if not found

Specified by:
getCommentIndex in interface AnnotatedFeatureI

addComment

public void addComment(Comment comm)
Specified by:
addComment in interface AnnotatedFeatureI

addComment

public void addComment(int index,
                       Comment comm)
Specified by:
addComment in interface AnnotatedFeatureI

deleteComment

public void deleteComment(Comment comm)
Specified by:
deleteComment in interface AnnotatedFeatureI

deleteComment

public void deleteComment(int i)
Specified by:
deleteComment in interface AnnotatedFeatureI

clearComments

public void clearComments()
Specified by:
clearComments in interface AnnotatedFeatureI

clone

public java.lang.Object clone()
Description copied from class: FeatureSet
to get a field-by-field replica of this feature

Specified by:
clone in interface SeqFeatureI
Overrides:
clone in class FeatureSet

isProblematic

public boolean isProblematic()
Specified by:
isProblematic in interface AnnotatedFeatureI

isFinished

public boolean isFinished()
Specified by:
isFinished in interface AnnotatedFeatureI

setIsProblematic

public void setIsProblematic(boolean isProblematic)
Specified by:
setIsProblematic in interface AnnotatedFeatureI

addSynonym

public void addSynonym(java.lang.String syn)
addSynonym used to refuse (quite reasonably) to add synonyms that are the same as the name of the feature, but Chado XML is rather fond of those reflexive synonyms, so go ahead and add them, what the heck.

Specified by:
addSynonym in interface AnnotatedFeatureI

addSynonym

public void addSynonym(int index,
                       java.lang.String syn)
Specified by:
addSynonym in interface AnnotatedFeatureI

addSynonym

public void addSynonym(Synonym syn)
Specified by:
addSynonym in interface AnnotatedFeatureI

getSynonyms

public java.util.Vector getSynonyms()
Specified by:
getSynonyms in interface AnnotatedFeatureI

getSynonyms

public java.util.Vector getSynonyms(boolean excludeInternalSynonyms)
Specified by:
getSynonyms in interface AnnotatedFeatureI

deleteSynonym

public void deleteSynonym(java.lang.String syn)
Specified by:
deleteSynonym in interface AnnotatedFeatureI

deleteSynonym

public void deleteSynonym(Synonym syn)
Specified by:
deleteSynonym in interface AnnotatedFeatureI

clearSynonyms

public void clearSynonyms()
Specified by:
clearSynonyms in interface AnnotatedFeatureI

getSynonymSize

public int getSynonymSize()
Specified by:
getSynonymSize in interface AnnotatedFeatureI

getSynonym

public Synonym getSynonym(int i)
Specified by:
getSynonym in interface AnnotatedFeatureI

hasSynonym

public boolean hasSynonym(java.lang.String name)
Specified by:
hasSynonym in interface AnnotatedFeatureI

isProteinCodingGene

public boolean isProteinCodingGene()
This is the isProteinCodingGene method that really matters--the ones in other classes aren't really used.

Specified by:
isProteinCodingGene in interface FeatureSetI
Specified by:
isProteinCodingGene in interface SeqFeatureI
Overrides:
isProteinCodingGene in class FeatureSet
See Also:
FeatureSet.setProteinCodingGene(boolean)

setDescription

public void setDescription(java.lang.String desc)
Specified by:
setDescription in interface AnnotatedFeatureI

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface AnnotatedFeatureI

isAnnotTop

public boolean isAnnotTop()
Description copied from interface: SeqFeatureI
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

Specified by:
isAnnotTop in interface SeqFeatureI
Overrides:
isAnnotTop in class SeqFeature

hasAnnotatedFeature

public boolean hasAnnotatedFeature()
Description copied from class: SeqFeature
Whether the SeqFeature is an annotation - return false by default - AnnotatedFeature overrides

Specified by:
hasAnnotatedFeature in interface SeqFeatureI
Overrides:
hasAnnotatedFeature in class SeqFeature

getAnnotatedFeature

public AnnotatedFeatureI getAnnotatedFeature()
Description copied from interface: SeqFeatureI
if hasAnnotatedFeature is true, this returns the AnnotatedFeature

Specified by:
getAnnotatedFeature in interface SeqFeatureI
Overrides:
getAnnotatedFeature in class SeqFeature

setOwner

public void setOwner(java.lang.String owner)
Description copied from interface: AnnotatedFeatureI
Set owner of annotation. Currently only Transcript actually uses this.

Specified by:
setOwner in interface AnnotatedFeatureI

getOwner

public java.lang.String getOwner()
Description copied from interface: AnnotatedFeatureI
Get owner of annotation. Only used by Transcript.

Specified by:
getOwner in interface AnnotatedFeatureI

getNonConsensusAcceptorNum

public int getNonConsensusAcceptorNum()
Returns transcript exon number with non consensus acceptor. Return -1 by default - Transcript overrides.

Specified by:
getNonConsensusAcceptorNum in interface AnnotatedFeatureI

getNonConsensusDonorNum

public int getNonConsensusDonorNum()
Returns transcript exon number with non consensus donor. Returns -1 by default - Transcript overrides.

Specified by:
getNonConsensusDonorNum in interface AnnotatedFeatureI

nonConsensusSplicingOkay

public boolean nonConsensusSplicingOkay()
Return true if non consensus splicing has been deemed ok. This is set by curator with method that takes boolean. Overridden by Transcript.

Specified by:
nonConsensusSplicingOkay in interface AnnotatedFeatureI

nonConsensusSplicingOkay

public void nonConsensusSplicingOkay(boolean okay)
Set whether its ok to have non-consensus splice site - no-op overridden by Transcript

Specified by:
nonConsensusSplicingOkay in interface AnnotatedFeatureI

get_cDNASequence

public SequenceI get_cDNASequence()
by default return null - overridden by Transcript subclass

Specified by:
get_cDNASequence in interface AnnotatedFeatureI

getAnnotChild

public AnnotatedFeatureI getAnnotChild(int i)
Return ith AnnotatedFeatureI child

Specified by:
getAnnotChild in interface AnnotatedFeatureI