- Type Parameters:
S- each element of the alignmentProfileis of type SC- each element of anAlignedSequenceis aCompoundof type C
- All Superinterfaces:
Iterable<AlignedSequence<S,,C>> Profile<S,C>
- All Known Subinterfaces:
MutableSequencePair<S,C>
- All Known Implementing Classes:
SimpleSequencePair
Defines a data structure for the results of pairwise sequence alignment.
- Author:
- Mark Chapman, Paolo Pavan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojava.nbio.core.alignment.template.Profile
Profile.StringFormat -
Method Summary
Modifier and TypeMethodDescriptiongetCompoundInQueryAt(int alignmentIndex) Returns theCompoundin query sequence at given column index in alignment.getCompoundInTargetAt(int alignmentIndex) Returns theCompoundin target sequence at given column index in alignment.intgetIndexInQueryAt(int alignmentIndex) Returns the query index corresponding to a given alignment column.intgetIndexInQueryForTargetAt(int targetIndex) Returns the query index corresponding to a given target index.intgetIndexInTargetAt(int alignmentIndex) Returns the target index corresponding to a given alignment column.intgetIndexInTargetForQueryAt(int queryIndex) Returns the target index corresponding to a given query index.intReturns the number of indices for which both the query and target sequences have an identicalCompound.intReturns the number of indices for which both the query and target sequences have a similarCompound.doublegetPercentageOfIdentity(boolean countGaps) Returns the percentage of identity between the two sequences in the alignment as a fraction between 0 and 1.getQuery()Returns the firstAlignedSequenceof the pair.Returns the secondAlignedSequenceof the pair.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.biojava.nbio.core.alignment.template.Profile
getAlignedSequence, getAlignedSequence, getAlignedSequences, getAlignedSequences, getAlignedSequences, getCompoundAt, getCompoundAt, getCompoundCountsAt, getCompoundCountsAt, getCompoundsAt, getCompoundSet, getCompoundWeightsAt, getCompoundWeightsAt, getIndexOf, getIndicesAt, getLastIndexOf, getLength, getOriginalSequences, getSize, getSubProfile, hasGap, isCircular, toString, toString, toString
-
Method Details
-
getCompoundInQueryAt
Returns theCompoundin query sequence at given column index in alignment.- Parameters:
alignmentIndex- column index in alignment- Returns:
- the query sequence element
- Throws:
IndexOutOfBoundsException- if alignmentIndex < 1 or alignmentIndex >Profile.getLength()
-
getCompoundInTargetAt
Returns theCompoundin target sequence at given column index in alignment.- Parameters:
alignmentIndex- column index in alignment- Returns:
- the target sequence element
- Throws:
IndexOutOfBoundsException- if alignmentIndex < 1 or alignmentIndex >Profile.getLength()
-
getIndexInQueryAt
Returns the query index corresponding to a given alignment column.- Parameters:
alignmentIndex- column index in alignment- Returns:
- index in query
Sequence - Throws:
IndexOutOfBoundsException- if alignmentIndex < 1 or alignmentIndex >Profile.getLength()
-
getIndexInQueryForTargetAt
Returns the query index corresponding to a given target index.- Parameters:
targetIndex- index in targetSequence- Returns:
- index in query
Sequence - Throws:
IndexOutOfBoundsException- if targetIndex < 1 or targetIndex >getTarget().getLength()
-
getIndexInTargetAt
Returns the target index corresponding to a given alignment column.- Parameters:
alignmentIndex- column index in alignment- Returns:
- index in target
Sequence - Throws:
IndexOutOfBoundsException- if alignmentIndex < 1 or alignmentIndex >Profile.getLength()
-
getIndexInTargetForQueryAt
Returns the target index corresponding to a given query index.- Parameters:
queryIndex- index in querySequence- Returns:
- index in target
Sequence - Throws:
IndexOutOfBoundsException- if queryIndex < 1 or queryIndex >getQuery().getLength()
-
getNumIdenticals
int getNumIdenticals()Returns the number of indices for which both the query and target sequences have an identicalCompound.- Returns:
- the number of identical indices
-
getPercentageOfIdentity
Returns the percentage of identity between the two sequences in the alignment as a fraction between 0 and 1.- Parameters:
countGaps- If true, gap positions are counted as mismatches, i.e., the percentage is normalized by the alignment length. If false, gap positions are not counted, i.e. the percentage is normalized by the number of aligned residue pairs. See May (2004). "Percent sequence identity: the need to be explicit."- Returns:
- the percentage of sequence identity as a fraction in [0,1]
-
getNumSimilars
int getNumSimilars()Returns the number of indices for which both the query and target sequences have a similarCompound.- Returns:
- the number of similar indices
-
getQuery
Returns the firstAlignedSequenceof the pair.- Returns:
- the first
AlignedSequenceof the pair
-
getTarget
Returns the secondAlignedSequenceof the pair.- Returns:
- the second
AlignedSequenceof the pair
-