C - public abstract class AbstractSequence<C extends Compound> extends Object implements Sequence<C>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSequence.AnnotationType |
| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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() |
FeatureRetriever |
getFeatureRetriever() |
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<?> |
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 convince 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 |
setFeatureRetriever(FeatureRetriever featureRetriever) |
void |
setFeaturesKeyWord(FeaturesKeyWordInterface featuresKeyWord) |
void |
setNotesList(ArrayList<String> notesList) |
void |
setOriginalHeader(String originalHeader) |
void |
setParentSequence(AbstractSequence<?> 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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic AbstractSequence()
public AbstractSequence(String seqString, CompoundSet<C> compoundSet) throws CompoundNotFoundException
seqString - compoundSet - CompoundNotFoundExceptionpublic AbstractSequence(SequenceReader<C> proxyLoader, CompoundSet<C> compoundSet)
proxyLoader - compoundSet - public void setProxySequenceReader(SequenceReader<C> proxyLoader)
proxyLoader - public SequenceReader<C> getProxySequenceReader()
public Integer getBioBegin()
public void setBioBegin(Integer begin)
bioBegin - the bioBegin 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<?> getParentSequence()
public void setParentSequence(AbstractSequence<?> 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 FeatureRetriever getFeatureRetriever()
public void setFeatureRetriever(FeatureRetriever featureRetriever)
public AccessionID getAccession()
AccessionedgetAccession in interface Accessionedpublic void setAccession(AccessionID accession)
accession - the accession to setpublic TaxonomyID getTaxonomy()
public void setTaxonomy(TaxonomyID taxonomy)
species - the species to setpublic CompoundSet<C> getCompoundSet()
SequencegetCompoundSet in interface Sequence<C extends Compound>public void setCompoundSet(CompoundSet<C> compoundSet)
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()
Sequencepublic C getCompoundAt(int position)
SequencegetCompoundAt in interface Sequence<C extends Compound>position - The 1-indexed position of the amino acidpublic int getIndexOf(C compound)
SequencegetIndexOf in interface Sequence<C extends Compound>compound - public int getLastIndexOf(C compound)
SequencegetLastIndexOf in interface Sequence<C extends Compound>compound - public int getLength()
Sequencepublic SequenceView<C> getSubSequence(Integer bioStart, Integer bioEnd)
SequencegetSubSequence in interface Sequence<C extends Compound>bioStart - bioEnd - public int countCompounds(C... compounds)
SequencecountCompounds in interface Sequence<C extends Compound>compounds - public SequenceView<C> getInverse()
SequencegetInverse in interface Sequence<C extends Compound>Copyright © 2000–2017 BioJava. All rights reserved.