A ProteinAlignment class that presents the same interface as a regular
ProteinAlignment but optionally accomplishes mutating operations via a
command stack.
If no command stack is set on the object, commands are executed but
cannot be undone.
|
__init__(self,
sequences=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
|
|
|
connectSignals(self)
Connect the signals in self.signals to the signals emitted by
self._aln |
|
|
|
__deepcopy__(self,
memo)
Copy the alignment |
|
|
|
|
|
reorderSequences(self,
seq_indices)
Reorder the sequences in the alignment using the specified list of
indices |
|
|
|
setQuerySeq(self,
seq)
Set the specified sequence as the query sequence. |
|
|
|
|
|
addSeqs(self,
seqs,
index=None)
Add multiple sequences to the alignment |
|
|
|
addSeqsByIndices(self,
seq_map)
Insert a sequences at the specified indices in the alignment. |
|
|
|
removeSeq(self,
seq)
Remove a sequence from the alignment |
|
|
|
|
|
removeSeqs(self,
seqs)
Remove multiple sequences from the alignment |
|
|
|
replaceSeq(self,
seq,
index)
Replace the sequence at the specified index with the elements in the
specified sequence |
|
|
|
addOrReplaceSeqs(self,
seqs,
identifier_func)
Given seqs and an identifier_func, replaces seqs in the alignment
matching the identifier_func and appends any additional seqs to the
alignment |
|
|
|
|
|
removeResidues(self,
residues)
Removes the specified residues from the alignment and emits the
signals.residuesRemoved signal with the selection |
|
|
|
mutateResidues(self,
mutations)
Mutate the residues at the specified locations in the alignment |
|
|
|
|
|
addResidues(self,
selection)
Adds the specified residues to the alignment |
|
|
|
addGaps(self,
gap_indices)
Adds gaps to the alignment |
|
|
|
setGaps(self,
gap_indices)
Sets gaps on the alignment |
|
|
|
|
|
removeTerminalGaps(self)
Removes the gaps from the ends of every sequence in the alignment |
|
|
|
removeAllGaps(self)
Removes all the gaps of the sequences in the alignment. |
|
|
|
_getInsertCommand(self,
aln,
start) |
|
|
|
insertSubalignment(self,
aln,
start)
Insert an alignment into the current alignment at the specified index |
|
|
|
removeSubalignment(self,
start,
end)
Remove a block of the subalignment from the start to end points,
including column locks in that region |
|
|
|
|
|
replaceSubalignment(self,
aln,
start,
end)
Replace a subsection of the alignment indicated by start and end
indices with the specified alignment |
|
|
|
setLockedColumns(self,
columns,
lock=True)
Sets the columns to the specified lock state |
|
|
|
setAllLocks(self,
lock=True)
Convenience method to set all the locks to the specified lock state
at once |
|
|
|
|
|
__add__(self,
*args,
**kwargs)
Adds another alignment to this one |
|
|
|
__contains__(self,
*args,
**kwargs)
Returns whether the sequence is present in the alignment |
|
|
|
__getitem__(self,
*args,
**kwargs)
Returns the sequence at the index in the alignment |
|
|
|
__iter__(self,
*args,
**kwargs)
Returns an iterable of the sequences held in the alignment |
|
|
|
__len__(self,
*args,
**kwargs)
Returns the number of sequences in the alignment |
|
|
str
|
__repr__(self,
*args,
**kwargs)
Returns:
A str representation of the alignment |
|
|
|
__str__(self,
*args,
**kwargs)
Returns a str representation of the alignment |
|
|
tuple of dict and list
|
_getAddOrReplaceSeqs(self,
*args,
**kwargs)
Inspect an iterable of seqs and use an identifier_func to return a
two member tuple consisting of (to_replace, to_add). |
|
|
|
_getAlignmentDescription(self,
*args,
**kwargs)
Returns a formatted description of the alignment |
|
|
list
|
_getGapOnlyColumns(self,
*args,
**kwargs)
Returns a list of lists of indices for unlocked columns that contain
only gaps |
|
|
list
|
_getRegions(self,
*args,
**kwargs)
Returns a list of _Region objects containing information of locked
and unlocked stretches of the alignment |
|
|
|
_getTextFormattedAlignment(self,
*args,
**kwargs)
Returns a formatted list of strings with detailed alignment
information |
|
|
|
_insertGaps(self,
*args,
**kwargs)
Inserts gaps represented as "gap boundaries" (indices of
residues that immediately follow the gaps) to a list of sequences. |
|
|
int or NoneType
|
_recalculateLength(self,
*args,
**kwargs)
Determine what the length of the alignment would be if we removed one
sequence. |
|
|
|
|
bool
|
alignmentLocked(self,
*args,
**kwargs)
Whether every column in the alignment is locked |
|
|
|
calculateMatrix(self,
*args,
**kwargs)
Calculates a substitution matrix based on the current alignment. |
|
|
bool
|
columnHasAllSameResidues(self,
*args,
**kwargs)
Return whether or not the column at a specified index has all the
same residues (excluding gaps). |
|
|
|
columns(self,
*args,
**kwargs)
Returns a range of alignment columns or all columns if indices are
not specified. |
|
|
list
|
findPattern(self,
*args,
**kwargs)
Finds a specified PROSITE pattern in all sequences. |
|
|
|
getAlignedBlocks(self,
*args,
**kwargs)
Returns the indices of aligned blocks (regions without gaps). |
|
|
list
|
getColumn(self,
*args,
**kwargs)
Returns single alignment column at index position. |
|
|
|
getEntropy(self,
*args,
**kwargs)
Returns an alignment length array of residue entropy scores |
|
|
|
getFrequencies(self,
*args,
**kwargs)
Returns a dict mapping residues types to the frequency in the
alignment |
|
|
list of lists of int
|
getGapIndicesByKeyFunc(self,
*args,
**kwargs)
Converts a gap_info list and key func into a list of gap indices |
|
|
list
|
getGaps(self,
*args,
**kwargs)
Returns a list of gap indices lists |
|
|
list
|
getGapsByKeyFunc(self,
*args,
**kwargs)
Given a key function to uniquely identify residues, build a list of
lists with gap information for each sequence in the alignment |
|
|
|
|
list of int
|
getHiddenSeqIndices(self,
*args,
**kwargs)
Return a list of the indices of all sequences in the alignment that
have an associated PT entry ID but are not currently visible in the
Workspace. |
|
|
|
getIdentities(self,
*args,
**kwargs)
Returns an alignment-length list of bools indicating which columns
have identical residues |
|
|
Sequence or None
|
getQuerySeq(self,
*args,
**kwargs)
Returns the sequence that has been set as query sequence or None if
there is no query sequence. |
|
|
list of int
|
getRedundantSequences(self,
*args,
**kwargs)
Returns the indices of sequences below a specified identity threshold
value. |
|
|
|
getResidueData(self,
*args,
**kwargs)
Returns residue-level data for the specified sequence at the
specified index in the alignment, or None if no data is available. |
|
|
list of (sequence index, residue index) tuples
|
getResidueIndices(self,
*args,
**kwargs)
Returns the indices (in the alignment) of the specified residues |
|
|
int
|
getSeqIndex(self,
*args,
**kwargs)
Returns:
The index of the requested sequence |
|
|
|
getSimilarityScore(self,
*args,
**kwargs)
Returns a sequence length array of similarity scores against the
query sequence |
|
|
BaseAligment
|
getSubalignment(self,
*args,
**kwargs)
Return another alignment containing the elements within the specified
start and end indices |
|
|
list
|
getTerminalGaps(self,
*args,
**kwargs)
Returns the indices of terminal gaps in all the sequences |
|
|
list of int
|
getVisibleSeqIndices(self,
*args,
**kwargs)
Return a list of the indices of all visible sequences in the
alignment. |
|
|
bool
|
isQuerySeq(self,
*args,
**kwargs)
Return whether or not a sequence is set as a query sequence. |
|
|
|
iterResidues(self,
*args,
**kwargs)
Yields a sequence of
schrodinger.application.msv.domain.residue.Residue objects in the
alignment, omitting gaps. |
|
|
set
|
lockedColumns(self,
*args,
**kwargs)
Returns a set with indices of locked columns. |
|
|
ResidueSelection
|
makeResidueSelection(self,
*args,
**kwargs)
Returns a residue selection object matching the specified residues |
|
|
|
mergePairwiseAlignments(self,
*args,
**kwargs)
Merges several pairwise alignments into one flat alignment while
preserving relative residue positions. |
|
|
|
notifyResDisplayChanged(self,
*args,
**kwargs)
Notify any listeners of a residue display change by emitting a
signal. |
|
|
|
notifyResidueSelection(self,
*args,
**kwargs)
Notify any listeners of a residue selection by emitting a
ResidueSelection. |
|
|
|
|
bool
|
resMatchesQueryRes(self,
*args,
**kwargs)
Return True if the residue of a sequence at a column in the alignment
matches the query residue. |
|
|
|
toClustalFile(self,
*args,
**kwargs)
Writes aln to a Clustal alignment file. |
|
|
|
toFastaFile(self,
*args,
**kwargs)
Write self to specified FASTA file |
|
|
|
toFastaString(self,
*args,
**kwargs)
Convert ProteinAlignment object to list of sequence strings |
|
|
list
|
toFastaStringList(self,
*args,
**kwargs)
Convert self to list of fasta sequence strings |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|