Trees | Indices | Help |
---|
|
Represent a set of alignments.
This is a base class to represent alignments, which can be subclassed to deal with an alignment in a specific format.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Initialize a new Alignment object. Arguments: o alphabet - The alphabet to use for the sequence objects that are created. This alphabet must be a gapped type. |
Iterate over alignment rows as SeqRecord objects e.g. for record in align : print record.id print record.seq |
Returns a representation of the object for debugging. The representation cannot be used with eval() to recreate the object, which is usually possible with simple python ojects. For example: <Bio.Align.Generic.Alignment instance (2 records of length 14, SingleLetterAlphabet()) at a3c184c> The hex string is the memory address of the object, see help(id). This provides a simple way to visually distinguish alignments of the same size. |
Returns a multi-line string summary of the alignment. This output is intended to be readable, but large alignments are shown truncated. A maximum of 20 rows (sequences) and 50 columns are shown, with the record identifiers. This should fit nicely on a single screen. e.g. DNAAlphabet() alignment with 3 rows and 14 columns ACGATCAGCTAGCT Alpha CCGATCAGCTAGCT Beta ACGATGAGCTAGCT Gamma |
Returns a truncated string representation of a SeqRecord. This is a PRIVATE function used by the __str__ method. |
Add a sequence to the alignment. This doesn't do any kind of alignment, it just adds in the sequence object, which is assumed to be prealigned with the existing sequences. Arguments: o descriptor - The descriptive id of the sequence being added. This will be used as the resulting SeqRecord's .id property (and, for historical compatibility, also the .description property) o sequence - A string with sequence info. o start - You can explicitly set the start point of the sequence. This is useful (at least) for BLAST alignments, which can just be partial alignments of sequences. o end - Specify the end of the sequence, which is important for the same reason as the start. o weight - The weight to place on the sequence in the alignment. By default, all sequences have the same weight. (0.0 => no weight, 1.0 => highest weight) |
Return the maximum length of the alignment. All objects in the alignment should (hopefully) have the same length. This function will go through and find this length by finding the maximum length of sequences in the alignment. |
Return all of the sequences involved in the alignment. The return value is a list of SeqRecord objects. |
Retrieve a sequence by row number. Returns: o A Seq object for the requested sequence. Raises: o IndexError - If the specified number is out of range. |
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Sep 15 09:26:30 2008 | http://epydoc.sourceforge.net |