|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectapollo.datamodel.Range
apollo.datamodel.SeqFeature
apollo.datamodel.FeatureSet
public class FeatureSet
I think SeqFeature should implement all the functions of FeatureSet, so its polymorphic, so when you have a SeqFeatureI you dont have to care whether its a SeqFeature or a FeatureSet, so you dont have to keep downcasting to descend the datamodel (or do any other feature set functionality) As now you go through the Vector of SeqFeatures, cast to SeqFeature, then ask instanceof FeatureSetI and cast to FeatureSetI, which is potentially confusing.
| Field Summary | |
|---|---|
protected java.util.Vector |
features
|
protected byte |
flags
This flag is just for the use of bop to indicate that the feature has already had a an exon removed. |
java.lang.String |
genericReadThroughStopResidue
|
protected SequenceI |
hitSequence
|
protected static org.apache.log4j.Logger |
logger
|
protected int |
minus1_frameshift
|
protected boolean |
missing_3prime
|
protected boolean |
missing_5prime
|
protected int |
plus1_frameshift
|
static byte |
POLYA_REMOVED
|
protected java.lang.String |
readthrough_stop
|
protected static java.lang.String |
standard_start_codon
sometimes the translation may have an unconventional start codon and we need to note this |
protected java.lang.String |
start_codon
|
protected boolean |
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 | |
|---|---|
FeatureSet()
|
|
FeatureSet(FeatureList kids,
java.lang.String name,
java.lang.String type,
int strand)
|
|
FeatureSet(FeatureSetI fs,
java.lang.String class_name)
|
|
FeatureSet(int low,
int high,
java.lang.String type,
int strand)
|
|
FeatureSet(SeqFeatureI sf)
|
|
FeatureSet(java.lang.String type,
int strand)
|
|
| Method Summary | |
|---|---|
void |
accept(Visitor visitor)
General implementation of Visitor pattern. |
void |
addFeature(SeqFeatureI feature)
Add feature to end of features list, recalc low and high |
void |
addFeature(SeqFeatureI feature,
boolean sort)
no-op - overridden by FeatureSet |
void |
adjustEdges()
Set low and high according to lowest and highest coord in kids |
void |
adjustEdges(SeqFeatureI span)
If span has higher high and or lower low than current, reset high/low |
boolean |
beforeFivePrimeEnd(SeqFeatureI feature)
Returns true if the feature passed in has a 3 prime end that is more 5prime than this feature. |
SequenceEdit[] |
buildEditList()
|
protected SequenceEdit[] |
buildORFEditList()
|
void |
calcTranslationStartForLongestPeptide()
This sets the start at a standard start codon that gives the longest peptide (which may not be the first start codon). |
boolean |
canHaveChildren()
This method determines if there are any child SeqFeatures in this set (FeatureSets are NOT included). |
void |
clearKids()
by default no kids - no-op |
java.lang.Object |
clone()
to get a field-by-field replica of this feature |
void |
deleteFeature(SeqFeatureI feature)
The number of directly containd features. |
SeqFeatureI |
deleteFeatureAt(int i)
|
FeatureList |
findFeaturesByAllNames(java.lang.String name)
Searches recursively on both name and hit name |
FeatureList |
findFeaturesByAllNames(java.lang.String searchString,
boolean useRegExp)
|
FeatureList |
findFeaturesByAllNames(java.lang.String searchString,
boolean useRegExp,
boolean kidNamesOverParent)
useRegExp is whether to search using pattern as a regular expression In fact, we ALWAYS do a RegExp search with the ORO pattern matchers. |
FeatureList |
findFeaturesByHitName(java.lang.String hname)
Returns FeatureList of Features with hit name. |
FeatureList |
findFeaturesByName(java.lang.String name)
Returns a FeatureList of all SeqFeatureIs that have this name empty if no features match. |
FeatureList |
findFeaturesByName(java.lang.String name,
boolean kidNamesOverParent)
|
void |
flipFlop()
Overrides SeqFeature.flipFlop. |
java.lang.String |
get_cDNA()
This needs to be fixed to account for edits to the genomic sequence, but I don't think it is urgent because this case is still so extremely rare. |
java.lang.String |
get_ORF(java.lang.String mRNA)
will return an empty string if the translation start site has not been set. |
protected java.lang.String |
get_ORF(java.lang.String mRNA,
int start_offset,
int end_offset)
|
SeqFeatureI |
getFeatureAt(int i)
returns a seqfeature at the specified position |
SeqFeatureI |
getFeatureContaining(int position)
Returns the FIRST feature in the set containing the position return this if none of children contain pos but FS does (intron) return null if doesnt contain position. |
int |
getFeatureIndex(SeqFeatureI sf)
By default SeqFeature has no kids so returns -1 be default. |
int |
getFeaturePosition(int genomic_pos)
This is an important method. |
java.util.Vector |
getFeatures()
returns a vector of all the child features belonging to this feature. |
int |
getGenomicPosForPeptidePos(int peptidePosition)
For a position in peptide coordinates get the corresponding genomic position For now just do this in FeatureSet, I could imagine having a peptide object |
int |
getGenomicPosition(int transcript_pos)
Converts a transcript position (1 based without introns of course) to a genomic position |
SequenceI |
getHitSequence()
if kids have hit feats then this is the hit seq associated with them This is a convenience for having to get hit seq from kids |
int |
getIndexContaining(int position)
|
int |
getLastBaseOfStopCodon()
|
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 |
java.lang.String |
getName()
In the case where the range is chromosomal the name is the chromosome name |
int |
getNumberOfDescendents()
The number of descendants (direct and indirect) in this FeatureSetI. |
int |
getPeptidePosForGenomicPos(int genomicPosition)
|
int |
getPositionFrom(int base_position,
int base_offset)
|
double |
getScore()
|
SequenceEdit |
getSequencingErrorAtPosition(int base_position)
any errors in the genomic sequence will apply to all of the transcripts for the gene |
int |
getSplicedLength()
|
int |
getSplicedLength(int startExon,
int endExon)
This needs to be fixed to account for edits to the genomic sequence |
java.lang.String |
getSplicedTranscript(int startExon,
int endExon)
|
java.lang.String |
getStartAA()
|
java.lang.String |
getStartCodon()
|
TranslationI |
getTranslation()
FeatureSetI itself implements TranslationI so just return self - in future this may be done with a separate translation object |
int |
getTranslationEnd()
|
RangeI |
getTranslationRange()
TranslationI interface |
int |
getTranslationStart()
Returns start of translation in genomic coords |
boolean |
hasDescendents()
returns true if the count of the number of leaf features (those that can't have child features themselves) is > 0. |
boolean |
hasNameBeenSet()
|
boolean |
hasReadThroughStop()
|
boolean |
hasTranslation()
FeatureSets have translations. |
boolean |
hasTranslationEnd()
Returns true if there is end of translation for the transcript, ie getTranslationEnd()!=0. |
boolean |
hasTranslationStart()
Returns true if transcript has a translation start (!=0) |
protected void |
insertFeatureAt(SeqFeatureI feature,
int position)
Add feature(kid) to features list at position position. |
boolean |
isFlagSet(int mask)
return the current state of the bit for this flag |
boolean |
isMissing3prime()
|
boolean |
isMissing5prime()
If true this means there is no real start codon - its missing, rename this isMissing5PrimeStart? or isMissingTranslationStart? hasTranslationStart() can be true while isMissing5prime is true - this means that theres a "contrived" start at the beginning of the transcript |
boolean |
isProteinCodingGene()
Whoa! Why does this always return true? Are all FeatureSets really protein coding genes? Or is it just that this method is never called, because it is overridden in more specific classes? I agree - changing to return false - MG 11.21.05 Change, now return the value of isProteinCodingGene (this flag defaults to false) Cyril P 01.15.06 |
boolean |
isSequencingErrorPosition(int base_position)
any errors in the genomic sequence will apply to all of the transcripts for the gene |
boolean |
isTransSpliced()
|
int |
minus1FrameShiftPosition()
|
boolean |
pastThreePrimeEnd(SeqFeatureI feature)
Returns true if the feature passed in has a 5 prime start that is located beyound the 3prime end of this feature. |
int |
plus1FrameShiftPosition()
|
boolean |
rangeIsUnassigned()
Return true if range has been assigned high & low |
int |
readThroughStopPosition()
|
java.lang.String |
readThroughStopResidue()
|
void |
setFlag(boolean state,
byte mask)
|
void |
setHitSequence(SequenceI seq)
Is this an explicit alignment used by jalview? - the alternative to cigars? no I dont think it is - its used by the analysis adapters & game if kids have hit feats then this is the hit seq associated with them This is a convenience for having to get hit seq from kids |
boolean |
setMinus1FrameShiftPosition(int shift_pos)
|
void |
setMissing3prime(boolean partial)
|
void |
setMissing5prime(boolean partial)
|
void |
setPeptideValidity(boolean validity)
TranslationI method - no-op overridden by Transcript. |
protected void |
setPhases()
|
boolean |
setPlus1FrameShiftPosition(int shift_pos)
returns false of the frame shift position is unworkable |
void |
setProteinCodingGene(boolean isProteinCodingGene)
A setter is needed for some featureSet, like gene prediction results, which can have translation start and stop whithout being instances of transcripts |
void |
setReadThroughStop(boolean readthrough)
The generic version--set readthrough stop to true or false. |
void |
setReadThroughStop(java.lang.String residue)
|
void |
setRefSequence(SequenceI seq)
This is presently used to locate features that have a drawable. |
void |
setTranslationEnd(int pos)
|
void |
setTranslationEndFromStart()
Sets the translation end to the end of the ORF from the current translation start OR to the end of the last exon if no stop codons are found in phase. |
void |
setTranslationEndNoPhase(int pos)
|
boolean |
setTranslationStart(int pos)
|
boolean |
setTranslationStart(int pos,
boolean set_end)
If pos is not contained in FeatureSet, set trans start fails and false is returned, true on success. |
int |
size()
FeatureSet overrides - merge with getNumberOfChildren |
void |
sort(int sortStrand)
|
void |
sort(int sortStrand,
boolean byLow)
sort the child features of the set |
java.lang.String |
toString()
For debugging |
java.lang.String |
translate()
conceptually any piece of sequence may potentially be translated // this is useful to ascertain the potential of any given sequence // it may also be needed if a prediction program provides this // information // This method translates by extracting the coding pieces of // sequence from the exons to create a single string which // is then translated with phase 0. |
boolean |
unConventionalStart()
|
boolean |
withinCDS(int pos)
Returns true if the position is within the CDS of this feature |
| 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.RangeI |
|---|
contains, contains, convertFromBaseOrientedToInterbase, convertFromInterbaseToBaseOriented, getEnd, getFeatureType, getHigh, getLeftOverlap, getLow, getRangeClone, getRefSequence, getResidues, getRightOverlap, getStart, getStrand, hasFeatureType, hasName, hasRefSequence, isContainedByRefSeq, isExactOverlap, isForwardStrand, isIdentical, isSequenceAvailable, length, overlaps, sameRange, setEnd, setFeatureType, setHigh, setLow, setName, setStart, setStrand |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger logger
public static byte POLYA_REMOVED
protected static java.lang.String standard_start_codon
protected java.util.Vector features
protected SequenceI hitSequence
protected byte flags
protected int plus1_frameshift
protected int minus1_frameshift
protected java.lang.String readthrough_stop
public java.lang.String genericReadThroughStopResidue
protected boolean trans_spliced
protected boolean missing_5prime
protected boolean missing_3prime
protected java.lang.String start_codon
| Constructor Detail |
|---|
public FeatureSet()
public FeatureSet(SeqFeatureI sf)
public FeatureSet(java.lang.String type,
int strand)
public FeatureSet(int low,
int high,
java.lang.String type,
int strand)
public FeatureSet(FeatureList kids,
java.lang.String name,
java.lang.String type,
int strand)
public FeatureSet(FeatureSetI fs,
java.lang.String class_name)
| Method Detail |
|---|
public boolean hasTranslation()
hasTranslation in interface SeqFeatureIhasTranslation in class SeqFeaturepublic TranslationI getTranslation()
getTranslation in interface SeqFeatureIgetTranslation in class SeqFeaturepublic java.lang.String getName()
RangeI
getName in interface RangeIgetName in class Rangepublic boolean hasNameBeenSet()
hasNameBeenSet in interface FeatureSetIpublic int size()
SeqFeature
size in interface SeqFeatureIsize in class SeqFeaturepublic void addFeature(SeqFeatureI feature)
addFeature in interface SeqFeatureIaddFeature in class SeqFeature
public void addFeature(SeqFeatureI feature,
boolean sort)
SeqFeature
addFeature in interface SeqFeatureIaddFeature in class SeqFeature
protected void insertFeatureAt(SeqFeatureI feature,
int position)
public boolean pastThreePrimeEnd(SeqFeatureI feature)
public boolean beforeFivePrimeEnd(SeqFeatureI feature)
public void deleteFeature(SeqFeatureI feature)
FeatureSetI
deleteFeature in interface FeatureSetIpublic SeqFeatureI deleteFeatureAt(int i)
deleteFeatureAt in interface FeatureSetIpublic SeqFeatureI getFeatureAt(int i)
SeqFeature
getFeatureAt in interface SeqFeatureIgetFeatureAt in class SeqFeaturepublic java.util.Vector getFeatures()
SeqFeature
getFeatures in interface SeqFeatureIgetFeatures in class SeqFeaturepublic void clearKids()
SeqFeature
clearKids in interface SeqFeatureIclearKids in class SeqFeaturepublic FeatureList getLeafFeatsOver(int pos)
SeqFeatureI
getLeafFeatsOver in interface SeqFeatureIgetLeafFeatsOver in class SeqFeaturepublic void adjustEdges()
adjustEdges in interface FeatureSetIpublic void adjustEdges(SeqFeatureI span)
adjustEdges in interface FeatureSetIpublic FeatureList findFeaturesByHitName(java.lang.String hname)
findFeaturesByHitName in interface FeatureSetIpublic FeatureList findFeaturesByName(java.lang.String name)
findFeaturesByName in interface FeatureSetI
public FeatureList findFeaturesByName(java.lang.String name,
boolean kidNamesOverParent)
findFeaturesByName in interface FeatureSetIpublic FeatureList findFeaturesByAllNames(java.lang.String name)
findFeaturesByAllNames in interface FeatureSetI
public FeatureList findFeaturesByAllNames(java.lang.String searchString,
boolean useRegExp)
findFeaturesByAllNames in interface FeatureSetI
public FeatureList findFeaturesByAllNames(java.lang.String searchString,
boolean useRegExp,
boolean kidNamesOverParent)
findFeaturesByAllNames in interface FeatureSetIpublic void setRefSequence(SequenceI seq)
setRefSequence in interface RangeIsetRefSequence in class Rangeseq - the new parent SequenceIpublic void setHitSequence(SequenceI seq)
setHitSequence in interface FeatureSetIpublic SequenceI getHitSequence()
getHitSequence in interface FeatureSetIgetHitSequence in interface SeqFeatureIgetHitSequence in class SeqFeaturepublic double getScore()
getScore in interface SeqFeatureIgetScore in class SeqFeaturepublic int getNumberOfDescendents()
SeqFeature
getNumberOfDescendents in interface SeqFeatureIgetNumberOfDescendents in class SeqFeaturepublic boolean canHaveChildren()
canHaveChildren in interface RangeIcanHaveChildren in class Rangepublic boolean hasDescendents()
FeatureSetI
hasDescendents in interface FeatureSetIpublic SeqFeatureI getFeatureContaining(int position)
getFeatureContaining in interface SeqFeatureIgetFeatureContaining in class SeqFeaturepublic int getIndexContaining(int position)
getIndexContaining in interface FeatureSetIpublic int getFeatureIndex(SeqFeatureI sf)
SeqFeature
getFeatureIndex in interface SeqFeatureIgetFeatureIndex in class SeqFeaturepublic void sort(int sortStrand)
sort in interface FeatureSetI
public void sort(int sortStrand,
boolean byLow)
sort in interface FeatureSetIsortStrand - - sort by minus strand or positive/no strandbyLow - - sort by genomic positionSeqFeatureUtil.sort()public java.lang.String translate()
SeqFeature
translate in interface SeqFeatureItranslate in class SeqFeaturepublic void calcTranslationStartForLongestPeptide()
calcTranslationStartForLongestPeptide in interface TranslationIpublic void setProteinCodingGene(boolean isProteinCodingGene)
setProteinCodingGene in interface FeatureSetIpublic boolean isProteinCodingGene()
isProteinCodingGene in interface FeatureSetIisProteinCodingGene in interface SeqFeatureIisProteinCodingGene in class SeqFeaturesetProteinCodingGene(boolean)public void setTranslationEndFromStart()
setTranslationEndFromStart in interface TranslationIpublic boolean setTranslationStart(int pos)
setTranslationStart in interface TranslationI
public boolean setTranslationStart(int pos,
boolean set_end)
setTranslationStart in interface TranslationIpublic void setTranslationEndNoPhase(int pos)
public void setTranslationEnd(int pos)
setTranslationEnd in interface TranslationIpublic int getTranslationStart()
getTranslationStart in interface TranslationIpublic int getTranslationEnd()
getTranslationEnd in interface TranslationIpublic boolean hasTranslationEnd()
hasTranslationEnd in interface TranslationIpublic boolean hasTranslationStart()
hasTranslationStart in interface TranslationI
public int getPositionFrom(int base_position,
int base_offset)
getPositionFrom in interface FeatureSetIpublic int getLastBaseOfStopCodon()
getLastBaseOfStopCodon in interface TranslationIpublic java.lang.String get_cDNA()
SeqFeature
get_cDNA in interface SeqFeatureIget_cDNA in class SeqFeature
public java.lang.String getSplicedTranscript(int startExon,
int endExon)
public int getSplicedLength()
getSplicedLength in interface FeatureSetI
public int getSplicedLength(int startExon,
int endExon)
public java.lang.String get_ORF(java.lang.String mRNA)
get_ORF in class SeqFeature
protected java.lang.String get_ORF(java.lang.String mRNA,
int start_offset,
int end_offset)
public int getFeaturePosition(int genomic_pos)
getFeaturePosition in interface SeqFeatureIgetFeaturePosition in class SeqFeaturepublic int getGenomicPosition(int transcript_pos)
getGenomicPosition in interface SeqFeatureIgetGenomicPosition in class SeqFeaturepublic int getGenomicPosForPeptidePos(int peptidePosition)
getGenomicPosForPeptidePos in interface SeqFeatureIgetGenomicPosForPeptidePos in class SeqFeaturepublic int getPeptidePosForGenomicPos(int genomicPosition)
protected void setPhases()
public void accept(Visitor visitor)
accept in interface SeqFeatureIaccept in class SeqFeaturepublic boolean isTransSpliced()
public void setMissing5prime(boolean partial)
setMissing5prime in interface TranslationIpublic boolean isMissing5prime()
TranslationI
isMissing5prime in interface TranslationIpublic void setMissing3prime(boolean partial)
setMissing3prime in interface TranslationIpublic boolean isMissing3prime()
isMissing3prime in interface TranslationIpublic boolean unConventionalStart()
unConventionalStart in interface FeatureSetIpublic java.lang.String getStartAA()
getStartAA in interface FeatureSetIpublic java.lang.String getStartCodon()
getStartCodon in interface FeatureSetIpublic boolean hasReadThroughStop()
hasReadThroughStop in interface FeatureSetIpublic java.lang.String readThroughStopResidue()
readThroughStopResidue in interface FeatureSetIpublic int readThroughStopPosition()
readThroughStopPosition in interface FeatureSetIpublic void setReadThroughStop(boolean readthrough)
setReadThroughStop in interface FeatureSetIpublic void setReadThroughStop(java.lang.String residue)
setReadThroughStop in interface FeatureSetIpublic boolean isSequencingErrorPosition(int base_position)
isSequencingErrorPosition in interface FeatureSetIpublic SequenceEdit getSequencingErrorAtPosition(int base_position)
getSequencingErrorAtPosition in interface FeatureSetIpublic void flipFlop()
flipFlop in interface SeqFeatureIflipFlop in class SeqFeaturepublic java.lang.Object clone()
clone in interface SeqFeatureIclone in class SeqFeaturepublic RangeI getTranslationRange()
getTranslationRange in interface TranslationIpublic void setPeptideValidity(boolean validity)
setPeptideValidity in interface TranslationIpublic SequenceEdit[] buildEditList()
buildEditList in interface FeatureSetIprotected SequenceEdit[] buildORFEditList()
public int plus1FrameShiftPosition()
plus1FrameShiftPosition in interface FeatureSetIpublic int minus1FrameShiftPosition()
minus1FrameShiftPosition in interface FeatureSetIpublic boolean setPlus1FrameShiftPosition(int shift_pos)
FeatureSetI
setPlus1FrameShiftPosition in interface FeatureSetIpublic boolean setMinus1FrameShiftPosition(int shift_pos)
setMinus1FrameShiftPosition in interface FeatureSetIpublic boolean withinCDS(int pos)
FeatureSetI
withinCDS in interface FeatureSetIpublic boolean isFlagSet(int mask)
isFlagSet in interface FeatureSetI
public void setFlag(boolean state,
byte mask)
setFlag in interface FeatureSetIpublic java.lang.String toString()
toString in class SeqFeaturepublic boolean rangeIsUnassigned()
rangeIsUnassigned in interface RangeIrangeIsUnassigned in class Range
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||