MSA File
This module defines functions and classes for parsing, manipulating, and analyzing multiple sequence alignments.
- class prody.sequence.msafile.MSAFile(msa, mode='r', format=None, aligned=True, **kwargs)[source]
Handle MSA files in FASTA, SELEX, CLUSTAL and Stockholm formats.
- property closed
True for closed file.
- property format
Format of the MSA file.
- setFilter(filter, filter_full=False)[source]
Set function used for filtering sequences. filter will be applied to split sequence label, by default. If filter_full is True, filter will be applied to the full label.
- prody.sequence.msafile.parseMSA(filename, **kwargs)[source]
Returns an
MSAinstance that stores multiple sequence alignment and sequence labels parsed from Stockholm, SELEX, CLUSTAL, PIR, or FASTA format filename file, which may be a compressed file. Uncompressed MSA files are parsed using C code at a fraction of the time it would take to parse compressed files in Python.
- prody.sequence.msafile.splitSeqLabel(label)[source]
Returns label, starting residue number, and ending residue number parsed from sequence label.
- prody.sequence.msafile.writeMSA(filename, msa, **kwargs)[source]
Returns filename containing msa, a
MSAorMSAFileinstance, in the specified format, which can be SELEX, Stockholm, or FASTA. If compressed is True or filename ends with.gz, a compressed file will be written.MSAinstances will be written using C function into uncompressed files.Can also write CLUSTAL or PIR format files using Python functions.