FastaAlign.py
Code to deal with alignments written in Fasta format.
This mostly just uses the regular Fasta parsing stuff written by Jeff
to deal with all of the input and output formats.
functions:
o parse_file()
classes:
FastaAlignment
Imported modules
|
|
from Bio import Alphabet, Fasta
from Bio.Align.Generic import Alignment
from Bio.Alphabet import IUPAC
import string
|
Functions
|
|
parse_file
|
|
parse_file
|
parse_file ( file_name, type='DNA' )
Parse the given file into a FastaAlignment object.
Arguments:
o file_name - The location of the file to parse.
o type - The type of information contained in the file.
Exceptions
|
|
ValueError( "Invalid type %s passed. Need DNA, RNA or PROTEIN" % type )
|
|
Classes
|
|
|
|