|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava3.core.sequence.template.AbstractSequence<C>
C
- public abstract class AbstractSequence<C extends Compound>
The base class for DNA, RNA and Protein sequences.
Nested Class Summary | |
---|---|
static class |
AbstractSequence.AnnotationType
|
Constructor Summary | |
---|---|
AbstractSequence()
|
|
AbstractSequence(SequenceReader<C> proxyLoader,
CompoundSet<C> compoundSet)
A ProxySequenceReader allows abstraction of both the storage of the sequence data and the location of the sequence data. |
|
AbstractSequence(String seqString,
CompoundSet<C> compoundSet)
Create a Sequence from a simple string where the values should be found in compoundSet |
Method Summary | |
---|---|
void |
addFeature(FeatureInterface<AbstractSequence<C>,C> feature)
Add a feature to this sequence. |
void |
addFeature(int bioStart,
int bioEnd,
FeatureInterface<AbstractSequence<C>,C> feature)
Method to help set the proper details for a feature as it relates to a sequence where the feature needs to have a location on the sequence |
void |
addNote(String note)
Add notes about this sequence that will get exported for GFF3 |
int |
countCompounds(C... compounds)
Returns the number of times we found a compound in the Sequence |
AccessionID |
getAccession()
Returns the AccessionID this location is currently bound with |
AbstractSequence.AnnotationType |
getAnnotationType()
|
List<C> |
getAsList()
Returns the Sequence as a List of compounds |
Integer |
getBioBegin()
|
Integer |
getBioEnd()
|
C |
getCompoundAt(int position)
Returns the Compound at the given biological index |
CompoundSet<C> |
getCompoundSet()
Gets the compound set used to back this Sequence |
DatabaseReferenceInterface |
getDatabaseReferences()
|
String |
getDescription()
|
List<FeatureInterface<AbstractSequence<C>,C>> |
getFeatures()
|
List<FeatureInterface<AbstractSequence<C>,C>> |
getFeatures(int bioSequencePosition)
Return features at a sequence position |
List<FeatureInterface<AbstractSequence<C>,C>> |
getFeatures(String featureType,
int bioSequencePosition)
Return features at a sequence position by type |
List<FeatureInterface<AbstractSequence<C>,C>> |
getFeaturesByType(String type)
|
FeaturesKeyWordInterface |
getFeaturesKeyWord()
|
int |
getIndexOf(C compound)
Scans through the Sequence looking for the first occurrence of the given compound |
SequenceView<C> |
getInverse()
Does the right thing to get the inverse of the current Sequence. |
int |
getLastIndexOf(C compound)
Scans through the Sequence looking for the last occurrence of the given compound |
int |
getLength()
Returns the length of the Sequence |
ArrayList<String> |
getNotesList()
|
String |
getOriginalHeader()
|
AbstractSequence<C> |
getParentSequence()
|
SequenceReader<C> |
getProxySequenceReader()
|
String |
getSequenceAsString()
Default case is to assume strand is positive because only CDSSequence can be either positive or negative Strand. |
String |
getSequenceAsString(Integer bioStart,
Integer bioEnd,
Strand strand)
|
Double |
getSequenceScore()
Provide place holder for a metric that indicate a score associated with the sequence |
String |
getSource()
Added support for the source of this sequence for GFF3 export If a sub sequence doesn't have source then check for parent source |
SequenceView<C> |
getSubSequence(Integer bioStart,
Integer bioEnd)
Returns a portion of the sequence from the different positions. |
TaxonomyID |
getTaxonomy()
|
Collection<Object> |
getUserCollection()
Provided for convience if the developer needs to associate data with a sequence |
Iterator<C> |
iterator()
|
void |
removeFeature(FeatureInterface<AbstractSequence<C>,C> feature)
Remove a feature from the sequence |
void |
removeNote(String note)
|
void |
setAccession(AccessionID accession)
|
void |
setAnnotationType(AbstractSequence.AnnotationType annotationType)
|
void |
setBioBegin(Integer begin)
|
void |
setBioEnd(Integer end)
|
void |
setCompoundSet(CompoundSet<C> compoundSet)
|
void |
setDatabaseReferences(DatabaseReferenceInterface databaseReferences)
|
void |
setDescription(String description)
|
void |
setFeaturesKeyWord(FeaturesKeyWordInterface featuresKeyWord)
|
void |
setNotesList(ArrayList<String> notesList)
|
void |
setOriginalHeader(String originalHeader)
|
void |
setParentSequence(AbstractSequence<C> parentSequence)
|
void |
setProxySequenceReader(SequenceReader<C> proxyLoader)
Very important method that allows external mappings of sequence data and features. |
void |
setSequenceScore(Double sequenceScore)
|
void |
setSource(String source)
Added support for the source of this sequence for GFF3 export |
void |
setTaxonomy(TaxonomyID taxonomy)
|
void |
setUserCollection(Collection<Object> userCollection)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractSequence()
public AbstractSequence(String seqString, CompoundSet<C> compoundSet)
seqString
- compoundSet
- public AbstractSequence(SequenceReader<C> proxyLoader, CompoundSet<C> compoundSet)
proxyLoader
- compoundSet
- Method Detail |
---|
public void setProxySequenceReader(SequenceReader<C> proxyLoader)
proxyLoader
- public SequenceReader<C> getProxySequenceReader()
public Integer getBioBegin()
public void setBioBegin(Integer begin)
bioBegin
- the bioBegin to setpublic Integer getBioEnd()
public void setBioEnd(Integer end)
bioEnd
- the bioEnd to setpublic Collection<Object> getUserCollection()
public void setUserCollection(Collection<Object> userCollection)
userCollection
- public AbstractSequence.AnnotationType getAnnotationType()
public void setAnnotationType(AbstractSequence.AnnotationType annotationType)
annotation
- the annotation to setpublic String getDescription()
public void setDescription(String description)
description
- the description to setpublic String getOriginalHeader()
public void setOriginalHeader(String originalHeader)
originalHeader
- the originalHeader to setpublic AbstractSequence<C> getParentSequence()
public void setParentSequence(AbstractSequence<C> parentSequence)
parentSequence
- the parentSequence to setpublic String getSource()
public void setSource(String source)
source
- the source to setpublic void addNote(String note)
note
- public void removeNote(String note)
public ArrayList<String> getNotesList()
public void setNotesList(ArrayList<String> notesList)
notesList
- the notesList to setpublic Double getSequenceScore()
public void setSequenceScore(Double sequenceScore)
sequenceScore
- the sequenceScore to setpublic List<FeatureInterface<AbstractSequence<C>,C>> getFeatures(String featureType, int bioSequencePosition)
featureType
- bioSequencePosition
-
public List<FeatureInterface<AbstractSequence<C>,C>> getFeatures(int bioSequencePosition)
featureType
- bioSequencePosition
-
public List<FeatureInterface<AbstractSequence<C>,C>> getFeatures()
public void addFeature(int bioStart, int bioEnd, FeatureInterface<AbstractSequence<C>,C> feature)
bioStart
- bioEnd
- feature
- public void addFeature(FeatureInterface<AbstractSequence<C>,C> feature)
feature
- public void removeFeature(FeatureInterface<AbstractSequence<C>,C> feature)
feature
- public List<FeatureInterface<AbstractSequence<C>,C>> getFeaturesByType(String type)
type
-
public FeaturesKeyWordInterface getFeaturesKeyWord()
public void setFeaturesKeyWord(FeaturesKeyWordInterface featuresKeyWord)
featuresKeyWord
- the featuresKeyWord to setpublic DatabaseReferenceInterface getDatabaseReferences()
public void setDatabaseReferences(DatabaseReferenceInterface databaseReferences)
databaseReferences
- the databaseReferences to setpublic AccessionID getAccession()
Accessioned
getAccession
in interface Accessioned
public void setAccession(AccessionID accession)
accession
- the accession to setpublic TaxonomyID getTaxonomy()
public void setTaxonomy(TaxonomyID taxonomy)
species
- the species to setpublic CompoundSet<C> getCompoundSet()
Sequence
getCompoundSet
in interface Sequence<C extends Compound>
public void setCompoundSet(CompoundSet<C> compoundSet)
public String toString()
toString
in class Object
public String getSequenceAsString(Integer bioStart, Integer bioEnd, Strand strand)
begin
- end
- strand
-
public String getSequenceAsString()
getSequenceAsString
in interface Sequence<C extends Compound>
public List<C> getAsList()
Sequence
getAsList
in interface Sequence<C extends Compound>
public C getCompoundAt(int position)
Sequence
getCompoundAt
in interface Sequence<C extends Compound>
position
- The 1-indexed position of the amino acid
public int getIndexOf(C compound)
Sequence
getIndexOf
in interface Sequence<C extends Compound>
compound
-
public int getLastIndexOf(C compound)
Sequence
getLastIndexOf
in interface Sequence<C extends Compound>
compound
-
public int getLength()
Sequence
getLength
in interface Sequence<C extends Compound>
public SequenceView<C> getSubSequence(Integer bioStart, Integer bioEnd)
Sequence
getSubSequence
in interface Sequence<C extends Compound>
bioStart
- bioEnd
-
public Iterator<C> iterator()
iterator
in interface Iterable<C extends Compound>
public int countCompounds(C... compounds)
Sequence
countCompounds
in interface Sequence<C extends Compound>
compounds
-
public SequenceView<C> getInverse()
Sequence
getInverse
in interface Sequence<C extends Compound>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |