|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.compbio.seq.Alignment
public class Alignment
Class Alignment encapsulates the result of a sequence alignment between a query sequence and a subject sequence. Alignment objects are returned by the align() method of class ProteinLocalAlignment.
An alignment object does not record the actual query sequence and subject sequence that were aligned. The alignment object does record an ID associated with the query sequence and an ID associated with the subject sequence. For example, the ID could be the index of a sequence in a ProteinDatabase.
Class Alignment implements interface Comparable and so has a natural ordering. The comparison order depends on the alignment scores and the subject sequence IDs. An alignment with a higher score comes before an alignment with a lower score. If the scores are equal, an alignment with a lower subject sequence ID comes before an alignment with a higher subject sequence ID.
| Field Summary | |
|---|---|
static int |
QUERY_ALIGNED_WITH_GAP
State of an alignment position: character in query sequence aligned with gap in subject sequence. |
static int |
QUERY_ALIGNED_WITH_SUBJECT
State of an alignment position: character in query sequence aligned with character in subject sequence. |
static int |
SUBJECT_ALIGNED_WITH_GAP
State of an alignment position: character in subject sequence aligned with gap in query sequence. |
| Constructor Summary | |
|---|---|
Alignment()
Construct a new, uninitialized alignment object. |
|
| Method Summary | |
|---|---|
int |
compareTo(Alignment alignment)
Compare this alignment object to the given alignment object. |
int |
getAlignment(int i)
Get the state of the given position in the alignment. |
int |
getAlignmentLength()
Get the number of positions in the alignment. |
int |
getQueryFinish()
Get the index of the last aligned character in the query sequence. |
long |
getQueryId()
Get the ID associated with the query sequence. |
int |
getQueryLength()
Get the length of the query sequence. |
int |
getQueryStart()
Get the index of the first aligned character in the query sequence. |
int |
getSubjectFinish()
Get the index of the last aligned character in the subject sequence. |
long |
getSubjectId()
Get the ID associated with the subject sequence. |
int |
getSubjectLength()
Get the length of the subject sequence. |
int |
getSubjectStart()
Get the index of the first aligned character in the subject sequence. |
void |
readExternal(ObjectInput in)
Read this alignment object from the given object input stream. |
String |
toString()
Returns a string version of this alignment object. |
void |
writeExternal(ObjectOutput out)
Write this alignment object to the given object output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int QUERY_ALIGNED_WITH_SUBJECT
public static final int QUERY_ALIGNED_WITH_GAP
public static final int SUBJECT_ALIGNED_WITH_GAP
| Constructor Detail |
|---|
public Alignment()
| Method Detail |
|---|
public long getQueryId()
public long getSubjectId()
public int getQueryLength()
public int getSubjectLength()
public int getQueryStart()
public int getQueryFinish()
public int getSubjectStart()
public int getSubjectFinish()
public int getAlignmentLength()
public int getAlignment(int i)
i - Position in the alignment.
public int compareTo(Alignment alignment)
compareTo in interface Comparable<Alignment>alignment - Alignment to compare to.
public String toString()
toString in class Object
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface Externalizableout - Object output stream.
IOException - Thrown if an I/O error occurred.
public void readExternal(ObjectInput in)
throws IOException
readExternal in interface Externalizablein - Object input stream.
IOException - Thrown if an I/O error occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||