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

Class ProteinAlignment

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt5.QtCore.QObject --+    
                            |    
                BaseAlignment --+
                                |
                               ProteinAlignment
Known Subclasses:

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, alignmentLengthAboutToChange, alignmentLengthChanged, alignmentLocked, appendSubalignment, calculateMatrix, columnHasAllSameResidues, columns, createConsensusSequence, 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, querySequenceUpdated, removeAllGaps, removeAllSeqs, removeGaps, removeResidues, removeSeq, removeSeqByIndex, removeSeqs, removeSubalignment, removeTerminalGaps, reorderSequences, replaceResiduesWithGaps, replaceSeq, replaceSubalignment, residueVisibilityChanged, residuesAdded, residuesRemoved, residuesSelected, sequenceNameChanged, sequenceResiduesChanged, sequenceVisibilityChanged, sequencesAboutToBeInserted, sequencesAboutToBeRemoved, sequencesAboutToBeReordered, sequencesInserted, sequencesRemoved, sequencesReordered, setAllLocks, setGaps, setLockedColumns, setQuerySeq

Inherited from PyQt5.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, objectNameChanged, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr

Inherited from sip.simplewrapper: __new__

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

Class Methods [hide private]

Inherited from BaseAlignment: mergePairwiseAlignments, padAlignment

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

Class Variables [hide private]

Inherited from PyQt5.QtCore.QObject: staticMetaObject

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

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.
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:

toFastaStringList(self)

 

Convert self to list of fasta sequence strings

Returns: list
list of str

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

 

Write self to specified FASTA file

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)