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
|
boolean |
equals(Object o) |
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() |
List<String> |
getComments() |
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() |
List<AbstractReference> |
getReferences() |
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
|
int |
hashCode() |
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 bioBegin) |
void |
setBioEnd(Integer bioEnd) |
void |
setComments(List<String> comments)
Set comments.
|
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 |
setReferences(List<AbstractReference> references)
Set the list of
AbstractReference |
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, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public AbstractSequence()
public AbstractSequence(String seqString, CompoundSet<C> compoundSet) throws CompoundNotFoundException
seqString
- compoundSet
- CompoundNotFoundException
public 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 bioBegin)
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)
annotationType
- 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<AbstractReference> getReferences()
AbstractReference
public void setReferences(List<AbstractReference> references)
AbstractReference
references
- public List<FeatureInterface<AbstractSequence<C>,C>> getFeatures(String featureType, int bioSequencePosition)
featureType
- bioSequencePosition
- public List<FeatureInterface<AbstractSequence<C>,C>> getFeatures(int bioSequencePosition)
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 List<String> getComments()
public void setComments(List<String> comments)
comments
- 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()
Accessioned
getAccession
in interface Accessioned
public void setAccession(AccessionID accession)
accession
- the accession to setpublic TaxonomyID getTaxonomy()
public void setTaxonomy(TaxonomyID taxonomy)
taxonomy
- the species to setpublic CompoundSet<C> getCompoundSet()
Sequence
getCompoundSet
in interface Sequence<C extends Compound>
public void setCompoundSet(CompoundSet<C> compoundSet)
public String getSequenceAsString(Integer bioStart, Integer bioEnd, Strand strand)
bioStart
- bioEnd
- strand
- public String getSequenceAsString()
getSequenceAsString
in interface Sequence<C extends Compound>
public List<C> getAsList()
Sequence
public C getCompoundAt(int position)
Sequence
getCompoundAt
in interface Sequence<C extends Compound>
position
- The 1-indexed position of the amino acidpublic 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
public SequenceView<C> getSubSequence(Integer bioStart, Integer bioEnd)
Sequence
getSubSequence
in interface Sequence<C extends Compound>
bioStart
- bioEnd
- 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>
Copyright © 2000–2019 BioJava. All rights reserved.