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

Class FastaAlignmentReader

object --+
         |
        FastaAlignmentReader

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]
ProteinAlignment
read(cls, file_name)
Loads a sequence file in FASTA format, creates sequences and appends them to alignment.
ProteinAlignment
readFromText(cls, lines, AlnClass=<class 'schrodinger.application.msv.domain.alignment.ProteinAl...)
Read sequences from FASTA-formatted text, creates sequences and appends them to alignment.
 
readFromStringList(cls, strings)
Return an alignment object created from an iterable of sequence strings
Static Methods [hide private]
tuple of str
_parseHeader(header)
Parses a FASTA header into a split_name and a chain_id, where possible
Tuple of (str, list of ints)
_parseCodes(codes)
Parses string of single-letter amino acid codes, optionally interleaved with residue numbers.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_parseHeader(header)
Static Method

 

Parses a FASTA header into a split_name and a chain_id, where possible

split_name is just the first part of the header before the first separator character

Parameters:
  • header (str) - The header for a single entry in a fasta file
Returns: tuple of str

_parseCodes(codes)
Static Method

 

Parses string of single-letter amino acid codes, optionally interleaved with residue numbers. Converts the codes to uppercase and filters out all characters except for A-Z and gap codes.

Parameters:
  • codes (str) - String to parse.
Returns: Tuple of (str, list of ints)
Parsed sequence elements string and list of residue numbers.

read(cls, file_name)
Class Method

 

Loads a sequence file in FASTA format, creates sequences and appends them to alignment. Splits sequence name from the FASTA header.

Parameters:
  • file_name (str) - name of input FASTA file
Returns: ProteinAlignment
Read alignment.

readFromText(cls, lines, AlnClass=<class 'schrodinger.application.msv.domain.alignment.ProteinAl...)
Class Method

 

Read sequences from FASTA-formatted text, creates sequences and appends them to alignment. Splits sequence name from the FASTA header.

Parameters:
  • lines (list of str) - list of strings representing FASTA file
Returns: ProteinAlignment
The alignment

readFromStringList(cls, strings)
Class Method

 

Return an alignment object created from an iterable of sequence strings

Parameters:
  • strings (Iterable of strings) - Sequences as iterable of strings (1D codes)