Package schrodinger :: Package application :: Package msv :: Package domain :: Module alignment :: Class ProteinAlignment
[hide private]
[frames] | no frames]

Class ProteinAlignment

   object --+    
            |    
BaseAlignment --+
                |
               ProteinAlignment

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
 
toClustalFile(self, file_name, use_unique_names=True)
Writes aln to a Clustal alignment file.
 
toFastaString(self, use_unique_names=True, maxl=50)
Convert ProteinAlignment object to list of sequence strings
list
toFastaStringList(self)
Convert self to list of fasta sequence strings
 
toFastaFile(self, file_name, use_unique_names=True, maxl=50)
Write self to specified FASTA file

Inherited from BaseAlignment: __add__, __contains__, __deepcopy__, __getitem__, __iter__, __len__, __repr__, __str__, addGaps, addOrReplaceSeqs, addResidues, addSeq, addSeqs, addSeqsByIndices, alignmentLocked, appendSubalignment, calculateMatrix, columnHasAllSameResidues, columns, findPattern, getAlignedBlocks, getColumn, getEntropy, getFrequencies, getGapIndicesByKeyFunc, getGaps, getGapsByKeyFunc, getGlobalAnnotationData, getHiddenSeqIndices, getIdentities, getQuerySeq, getRedundantSequences, getResidueData, getResidueIndices, getSeqIndex, getSimilarityScore, getSubalignment, getTerminalGaps, getVisibleSeqIndices, insertSubalignment, isQuerySeq, iterResidues, lockedColumns, makeResidueSelection, minimizeAlignment, mutateResidues, notifyResDisplayChanged, notifyResidueSelection, notifySequenceVisibilityChanged, removeAllGaps, removeAllSeqs, removeGaps, removeResidues, removeSeq, removeSeqByIndex, removeSeqs, removeSubalignment, removeTerminalGaps, reorderSequences, replaceResiduesWithGaps, replaceSeq, replaceSubalignment, resMatchesQueryRes, setAllLocks, setGaps, setLockedColumns, setQuerySeq

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

Class Methods [hide private]

Inherited from BaseAlignment: mergePairwiseAlignments

Inherited from BaseAlignment (private): _insertGaps

Static Methods [hide private]
ProteinAlignment
fromClustalFile(file_name)
Returns alignment read from file in Clustal *.aln format preserving order of sequences.
ProteinAlignment
fromFastaFile(file_name)
Returns alignment read from file in Clustal *.aln format preserving order of sequences.
ProteinAlignment
fromFastaString(lines)
Read sequences from FASTA-formatted text, creates sequences and appends them to alignment.
 
fromFastaStringList(strings)
Return an alignment object created from an iterable of sequence strings

Inherited from BaseAlignment: getReversedSequenceOrdering, padAlignment

Properties [hide private]
  global_annotations
Returns the alignment-level annotations available for the alignment
  seq_annotations
Returns the sequence-level annotations available for sequences held in the alignment

Inherited from BaseAlignment: all_annotations, max_length

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • sequences - An optional iterable of sequences
Overrides: object.__init__
(inherited documentation)

fromClustalFile(file_name)
Static Method

 

Returns alignment read from file in Clustal *.aln format preserving order of sequences.

Parameters:
  • file_name (str) - Source file name.
Returns: ProteinAlignment
An alignment
Raises:
  • IOError - If output file cannot be read.

Note: The alignment can be empty if no sequence was present in the input file.

toClustalFile(self, file_name, use_unique_names=True)

 

Writes aln to a Clustal alignment file.

Parameters:
  • file_name (str) - Destination file name.
  • use_unique_names (bool) - If True, write unique name for each sequence.
Decorators:
  • @msv_utils.const
Raises:
  • IOError - If output file cannot be written.

fromFastaFile(file_name)
Static Method

 

Returns alignment read from file in Clustal *.aln format preserving order of sequences.

Returns: ProteinAlignment
Read alignment. The alignment can be empty if no sequence was present in the input file.
Raises:
  • IOError - If the input file cannot be read.

fromFastaString(lines)
Static 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

fromFastaStringList(strings)
Static Method

 

Return an alignment object created from an iterable of sequence strings

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

toFastaString(self, use_unique_names=True, maxl=50)

 

Convert ProteinAlignment object to list of sequence strings

Parameters:
Decorators:
  • @msv_utils.const

toFastaStringList(self)

 

Convert self to list of fasta sequence strings

Returns: list
list of str
Decorators:
  • @msv_utils.const

toFastaFile(self, file_name, use_unique_names=True, maxl=50)

 

Write self to specified FASTA file

Decorators:
  • @msv_utils.const
Raises:
  • IOError - If output file cannot be written.

Property Details [hide private]

global_annotations

Returns the alignment-level annotations available for the alignment

Get Method:
unreachable.global_annotations(self)

seq_annotations

Returns the sequence-level annotations available for sequences held in the alignment

Get Method:
unreachable.seq_annotations(self)