Package data_store :: Module seq_align :: Class Sequence_alignments
[hide private]
[frames] | no frames]

Class Sequence_alignments

source code


The structure for holding all sequence alignments.

Instance Methods [hide private]
new empty list
__init__(self)
Initialise some class variables.
source code
 
add(self, object_ids=None, models=None, molecules=None, sequences=None, strings=None, gaps=None, msa_algorithm=None, pairwise_algorithm=None, matrix=None, gap_open_penalty=None, gap_extend_penalty=None, end_gap_open_penalty=None, end_gap_extend_penalty=None)
Add a new sequence alignment.
source code
Alignment instance
find_alignment(self, object_ids=None, models=None, molecules=None, sequences=None, msa_algorithm=None, pairwise_algorithm=None, matrix=None, gap_open_penalty=None, gap_extend_penalty=None, end_gap_open_penalty=None, end_gap_extend_penalty=None)
Find any pre-existing sequence alignment.
source code
 
from_xml(self, sequence_alignments_node, file_version=1)
Recreate the analyses data structure from the XML analyses node.
source code

Inherited from data_classes.RelaxListType: to_xml

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initialise some class variables.

Returns: new empty list
Overrides: object.__init__

add(self, object_ids=None, models=None, molecules=None, sequences=None, strings=None, gaps=None, msa_algorithm=None, pairwise_algorithm=None, matrix=None, gap_open_penalty=None, gap_extend_penalty=None, end_gap_open_penalty=None, end_gap_extend_penalty=None)

source code 

Add a new sequence alignment.

Parameters:
  • object_ids (list of str) - The list of IDs for each structural object in the alignment. In most cases this will be the data pipe name. This will be used to retrieve alignments.
  • models (list of int) - The list of model numbers used in the alignment. This will be used to retrieve alignments.
  • molecules (list of str) - The list of molecules used in the alignment. This will be used to retrieve alignments.
  • sequences (list of str) - The list of residue sequences for the alignment as one letter codes.
  • strings (list of str) - The list of alignment strings.
  • gaps (numpy rank-2 int array) - The alignment gap matrix.
  • msa_algorithm (str) - The global multiple sequence alignment (MSA) algorithm.
  • pairwise_algorithm (str) - The pairwise sequence alignment algorithm.
  • matrix (str) - The substitution matrix
  • gap_open_penalty (float) - The penalty for introducing gaps, as a positive number.
  • gap_extend_penalty (float) - The penalty for extending a gap, as a positive number.
  • end_gap_open_penalty (float) - The optional penalty for opening a gap at the end of a sequence.
  • end_gap_extend_penalty (float) - The optional penalty for extending a gap at the end of a sequence.

find_alignment(self, object_ids=None, models=None, molecules=None, sequences=None, msa_algorithm=None, pairwise_algorithm=None, matrix=None, gap_open_penalty=None, gap_extend_penalty=None, end_gap_open_penalty=None, end_gap_extend_penalty=None)

source code 

Find any pre-existing sequence alignment.

Parameters:
  • object_ids (list of str) - The list of IDs for each structural object in the alignment. In most cases this will be the data pipe name. This will be used to retrieve alignments.
  • models (list of int) - The list of model numbers used in the alignment. This will be used to retrieve alignments.
  • molecules (list of str) - The list of molecules used in the alignment. This will be used to retrieve alignments.
  • sequences (list of str) - The list of residue sequences for the alignment as one letter codes.
  • msa_algorithm (str) - The global multiple sequence alignment (MSA) algorithm.
  • pairwise_algorithm (str) - The pairwise sequence alignment algorithm.
  • matrix (str) - The substitution matrix
  • gap_open_penalty (float) - The penalty for introducing gaps, as a positive number.
  • gap_extend_penalty (float) - The penalty for extending a gap, as a positive number.
  • end_gap_open_penalty (float) - The optional penalty for opening a gap at the end of a sequence.
  • end_gap_extend_penalty (float) - The optional penalty for extending a gap at the end of a sequence.
Returns: Alignment instance
Any matching sequence alignment object.

from_xml(self, sequence_alignments_node, file_version=1)

source code 

Recreate the analyses data structure from the XML analyses node.

Parameters:
  • sequence_alignments_node (xml.dom.minicompat.Element instance) - The sequence alignments XML node.
  • file_version (int) - The relax XML version of the XML file.
Overrides: data_classes.RelaxListType.from_xml