T
- the token type used by the underlying providerC
- the compound class to be used in the returned sequencespublic class BioJava3SequenceAdapter<T,C extends org.biojava3.core.sequence.template.Compound> extends AbstractBasicAlignmentModelView<T> implements SequenceDataAdapter<SingleBioJava3SequenceAdapter<T,C>,T>
AlignmentModel
as a set of BioJava Sequence
objects.Constructor and Description |
---|
BioJava3SequenceAdapter(AlignmentModel<T> underlyingProvider,
org.biojava3.core.sequence.template.CompoundSet<C> compoundSet)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
org.biojava3.core.sequence.template.CompoundSet<C> |
getCompoundSet()
Returns the compound set to be used for the translation.
|
SingleBioJava3SequenceAdapter<T,C> |
getSequence(java.lang.String sequenceID)
Returns an implementation of
Sequence that acts as a view to the sequence with the specified ID
in the underlying data source. |
SingleBioJava3SequenceAdapter<T,C> |
getSubSequence(java.lang.String sequenceID,
int offset,
int length)
Returns an implementation of
Sequence that acts as a view to a subsequence of the sequence
with the specified ID in the underlying data source. |
boolean |
returnsCopies()
Returns
false since this class always returns views of the underlying data source. |
org.biojava3.core.sequence.template.LightweightProfile<org.biojava3.core.sequence.template.Sequence<C>,C> |
toLightweightProfile()
Returns a BioJava alignment that contains the views of all sequences contained in the underlying data
source in the order they are stored there.
|
org.biojava3.core.sequence.template.LightweightProfile<org.biojava3.core.sequence.template.Sequence<C>,C> |
toLightweightProfile(SequenceOrder order)
Returns a BioJava alignment that contains the views of all sequences contained in the underlying data
source in the order specified in the
order object. |
getUnderlyingModel, setUnderlyingModel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getUnderlyingModel
public BioJava3SequenceAdapter(AlignmentModel<T> underlyingProvider, org.biojava3.core.sequence.template.CompoundSet<C> compoundSet)
provider
- the sequence data provider that contains the sequences to be viewedcompoundSet
- the compound set to be used for the translationpublic org.biojava3.core.sequence.template.CompoundSet<C> getCompoundSet()
public SingleBioJava3SequenceAdapter<T,C> getSequence(java.lang.String sequenceID)
Sequence
that acts as a view to the sequence with the specified ID
in the underlying data source.getSequence
in interface SequenceAccess<SingleBioJava3SequenceAdapter<T,C extends org.biojava3.core.sequence.template.Compound>>
sequenceID
- the ID of the sequence to be viewedSequence
objectpublic SingleBioJava3SequenceAdapter<T,C> getSubSequence(java.lang.String sequenceID, int offset, int length)
Sequence
that acts as a view to a subsequence of the sequence
with the specified ID in the underlying data source.getSubSequence
in interface SequenceDataAdapter<SingleBioJava3SequenceAdapter<T,C extends org.biojava3.core.sequence.template.Compound>,T>
sequenceID
- the ID of the sequence to be viewedoffset
- the start index of the subsequence to be viewed (The first token has the index 0.)length
- the length of the subsequence to be viewedSequence
objectpublic org.biojava3.core.sequence.template.LightweightProfile<org.biojava3.core.sequence.template.Sequence<C>,C> toLightweightProfile()
MultipleSequenceAlignment
(Note that the implementation type of
LightweightProfile
might change in future releases of LibrAlign.)public org.biojava3.core.sequence.template.LightweightProfile<org.biojava3.core.sequence.template.Sequence<C>,C> toLightweightProfile(SequenceOrder order)
order
object. This method can be used to obtain an BioJava
alignment with the same order as an AlignmentArea
area displaying these sequences.order
- the object specifying the order of the sequences in the returned alignmentMultipleSequenceAlignment
(Note that the implementation type of
LightweightProfile
might change in future releases of LibrAlign.)public boolean returnsCopies()
false
since this class always returns views of the underlying data source.returnsCopies
in interface SequenceDataAdapter<SingleBioJava3SequenceAdapter<T,C extends org.biojava3.core.sequence.template.Compound>,T>
false