Package schrodinger :: Package application :: Package msv :: Package io :: Module seqio :: Class FastaAlignmentWriter
[hide private]
[frames] | no frames]

Class FastaAlignmentWriter

                object --+    
                         |    
BaseProteinAlignmentWriter --+
                             |
                            FastaAlignmentWriter

Class for writing FASTA .fasta files.

Format is described here: Fasta format wikipedia

Instance Methods [hide private]

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
list of str
toStringList(cls, aln)
Convert ProteinAlignment object to list of sequence strings
 
write(cls, aln, file_name, use_unique_names=True, maxl=50)
Write aln to FASTA file
Static Methods [hide private]
string
toString(aln, use_unique_names=True, maxl=50)
Converts aln to FASTA string
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

toString(aln, use_unique_names=True, maxl=50)
Static Method

 

Converts aln to FASTA string

Parameters:
  • aln (ProteinAlignment) - Structured sequences
  • use_unique_names (bool) - If True, write unique name for each sequence.
  • maxl (int) - Maximum length of a line
Returns: string
FASTA string

toStringList(cls, aln)
Class Method

 

Convert ProteinAlignment object to list of sequence strings

Parameters:
  • aln (ProteinAlignment) - Alignment data
Returns: list of str
A list of sequence strings representing the alignment

write(cls, aln, file_name, use_unique_names=True, maxl=50)
Class Method

 

Write aln to FASTA file

Parameters:
  • aln (ProteinAlignment) - Structured sequences
  • use_unique_names (bool) - If True, write unique name for each sequence.
  • maxl (int) - Maximum length of a line
  • file_name (str) - Destination file name.
Raises:
  • IOError - If output file cannot be written.
Overrides: BaseProteinAlignmentWriter.write