Package schrodinger :: Package application :: Package msv :: Package domain :: Module sequence :: Class ProteinSequence
[hide private]
[frames] | no frames]

Class ProteinSequence

       object --+                    
                |                    
sip.simplewrapper --+                
                    |                
          sip.wrapper --+            
                        |            
     PyQt4.QtCore.QObject --+        
                            |        
            Qt.QtCore.QObject --+    
                                |    
                         Sequence --+
                                    |
                                   ProteinSequence

Nested Classes [hide private]
  AnnotationClass
hash(x)

Inherited from Sequence: ORIGIN, SSA_POS_TYPE

Instance Methods [hide private]
 
__init__(self, elements, name='', alphabet=residue.AMINO_ACIDS_ONE_AND_THREE_LETTER, origin=None, entry_id='', chain='', unknown_res_type=residue.UNKNOWN, gap_chars=['~', '-', '.'])
Make a sequence object from a list of strings, using a mapping of strings to element types.
list
_makeSeqElements(self, elements)
Returns: list of residues
schrodinger.application.msv.domain.residue.Residue
makeSeqElement(self, element)
Returns: residue
 
insert(self, index, elements)
Insert a list of elements or sequence element into this sequence
 
mutate(self, start, end, elements)
Mutate sequence elements starting at the given index to the provided elements
 
append(self, element)
Appends an element to the sequence
 
extend(self, elements)
Extends the sequence with elements from a list
 
sanitize(self, start=0, end=None)
Remove gaps and unknown sequence elements from sequence
 
removeStructurelessResidues(self, start=0, end=None)
Remove any structureless residues
 
removeTerminalGaps(self)
Remove gaps from the end of the sequence
 
getTerminalGaps(self)
Return indices of terminal gaps
 
getGapCount(self)
Returns: the number of gaps in the sequence

Inherited from Sequence: __add__, __contains__, __copy__, __deepcopy__, __getitem__, __iter__, __len__, __repr__, __str__, addGaps, get, getGapIndicesByKeyFunc, getGaps, getGapsByKeyFunc, getHomology, getIdentity, getNextResidue, getNextResidueIndex, getNumResidues, getPreviousResidue, getPreviousResidueIndex, getSSAPosType, getSimilarity, getSimilarityScore, getSubsequence, hasEntryID, hasVisibleResidues, index, iterNeighbors, lengthAboutToChange, lengthChanged, nameChanged, remove, removeAllGaps, removeFromSequence, removeGaps, replaceAllElements, residuesChanged, residuesDeleted, setGaps, setName

Inherited from Qt.QtCore.QObject: connect, emit

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

Inherited from sip.simplewrapper: __new__

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

Class Methods [hide private]
Tuple of (bool, set)
isValid(cls, elements, alphabet=residue.AMINO_ACIDS_ONE_LETTER, gap_chars=['~', '-', '.'])
Returns: Tuple indicating whether valid and a set of invalid characters, if any
Class Variables [hide private]

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from Sequence: annotation_types, fullname, name, origin

Inherited from Sequence (private): _origin_setter

Inherited from object: __class__

Method Details [hide private]

__init__(self, elements, name='', alphabet=residue.AMINO_ACIDS_ONE_AND_THREE_LETTER, origin=None, entry_id='', chain='', unknown_res_type=residue.UNKNOWN, gap_chars=['~', '-', '.'])
(Constructor)

 

Make a sequence object from a list of strings, using a mapping of strings to element types.

Parameters:
  • elements (list) - An iterable of string representations of elements making up the sequence
  • name (basestring) - The name of the sequence
  • alphabet (dict) - A mapping of string representations of elements to element types
  • unknown_res_type (object) - The type, if any, of an unknown residue
  • gap_chars (set of basestring) - A set of permissible gap characters in the element list, the first of which will be used in serialization
Raises:
  • ValueError - If the unknown_res_type is None and an unrecognized character is encountered in the element list
Overrides: object.__init__

_makeSeqElements(self, elements)

 

Return a list of elements converted to proper sequence items

Parameters:
  • elements (list) - list of basestring or basestring
Returns: list
list of residues
Raises:
  • ValueError - If an element is not in self.alphabet and self._unknown_res_type is not defined
Overrides: Sequence._makeSeqElements

makeSeqElement(self, element)

 
Parameters:
Returns: schrodinger.application.msv.domain.residue.Residue
residue

insert(self, index, elements)

 

Insert a list of elements or sequence element into this sequence

Parameters:
  • index - The index at which to insert elements
  • elements - A list of elements to insert
Overrides: Sequence.insert
(inherited documentation)

mutate(self, start, end, elements)

 

Mutate sequence elements starting at the given index to the provided elements

Parameters:
  • start - The index at which to start mutating
  • end - The index of the last mutated element
  • elements - The elements to which to mutate the sequence
Overrides: Sequence.mutate
(inherited documentation)

append(self, element)

 

Appends an element to the sequence

Parameters:
  • element - The element to append to this sequence
Overrides: Sequence.append
(inherited documentation)

extend(self, elements)

 

Extends the sequence with elements from a list

Parameters:
  • elements - The list containing elements with which to extend this one
Overrides: Sequence.extend
(inherited documentation)

sanitize(self, start=0, end=None)

 

Remove gaps and unknown sequence elements from sequence

Overrides: Sequence.sanitize

getGapCount(self)

 
Returns:
the number of gaps in the sequence

isValid(cls, elements, alphabet=residue.AMINO_ACIDS_ONE_LETTER, gap_chars=['~', '-', '.'])
Class Method

 
Parameters:
  • elements (list) - An iterable of string representations of elements making up the sequence
  • alphabet (dict) - A mapping of string representations of elements to element types
  • gap_chars (set of basestring) - A set of permissible gap characters in the element list
Returns: Tuple of (bool, set)
Tuple indicating whether valid and a set of invalid characters, if any
Overrides: Sequence.isValid