/ . / MultAlignViewer / MAViewer.py / MAViewer
MAViewer displays a multiple alignment
Methods
|
|
|
saveHeader
|
saveHeader (
self,
fileName,
header,
omitNoValue=True,
)
|
|
disassociate
|
disassociate ( self, mol )
|
|
customUI
|
customUI ( self, parent )
Function to allow customization of the interface
parent is the interior frame of the dialog.
It can be populated with custom widgets as desired.
A frame should be returned by this function, in which
the MAViewer UI will be placed.
|
|
usePhylogenyFile
|
usePhylogenyFile ( self, phylogenyFile )
Exceptions
|
|
UserError( "No trees in '%s' have the same number" " of leaf nodes as the number of sequences" " in the alignment" % phylogenyFile )
UserError( v )
UserError( "No tree chosen" )
UserError( "Must choose only one tree" )
|
|
|
showHeaders
|
showHeaders ( self, headers )
show previously-added header sequences
|
|
readFile
|
readFile (
self,
fileName,
fileType,
)
Exceptions
|
|
UserError( "Found no sequences in file %s" % fileName )
|
|
|
assessMatch
|
assessMatch (
self,
refMol,
evalMols,
attrName,
)
|
|
deleteAllGaps
|
deleteAllGaps ( self )
delete all-gap columns
|
|
__init__
|
__init__ (
self,
fileNameOrSeqs,
fileType=None,
autoAssociate=1,
title=None,
quitCB=None,
frame=None,
ownSeqs=None,
)
|
|
setRulerDisplay
|
setRulerDisplay ( self, showRuler=None )
|
|
emHide
|
emHide ( self )
Extension manager method
|
|
useColoringFile
|
useColoringFile (
self,
colorFileName,
makeDefault=False,
)
|
|
addSeqs
|
addSeqs (
self,
seqs,
reassociate=True,
)
|
|
realign
|
realign (
self,
input,
fileType=None,
offset=None,
startOffset=0,
markEdited=False,
)
Switch to a different alignment of the same sequences
input is list of Sequences or file name
|
|
fillInUI
|
fillInUI ( self, parent )
|
|
setResidueAttrs
|
setResidueAttrs ( self )
|
|
expandSelectionByColumns
|
expandSelectionByColumns ( self )
|
|
destroy
|
destroy ( self, *args )
|
|
molName
|
molName ( self, mol )
|
|
deleteSeqs
|
deleteSeqs ( self, delSeqs )
Exceptions
|
|
UserError( "Must leave at least two sequences in" " alignment!" )
|
|
|
saveEPS
|
saveEPS (
self,
fileName,
colorMode="color",
rotate=False,
extent="all",
)
|
|
hideHeaders
|
hideHeaders ( self, headers )
hide header sequences
|
|
match
|
match (
self,
refMol,
matchMols,
createRegion=False,
makePseudobonds=False,
matchConserved=False,
matchActive=False,
iterate=False,
iterateCutoff=5.0,
)
match models to a reference model
refMol is the reference model
matchMols is a list of models to match
createRegion indicates if a region on the alignment
should be created to indicate which residues were
involved in matching
makePseudobonds indicates if pseudobonds should be
created between matched atoms
matchConserved restricts matching to "highly" conserved
(capitalized) residues only
matchActive restricts matching to the currently active
region
iterate indicates if the matching should iterate,
pruning poorly-matching residues at each pass
iterateCutoff controls when iteration stops: it stops
when no pair exceeds the cutoff
Exceptions
|
|
ValueError, "%s not associated" " with any sequence" % matchMol.name
ValueError, "%s not associated with any sequence" % refMol.name
|
|
|
addHeaders
|
addHeaders ( self, headers )
- add header sequences
- implies show
|
|
alignSeq
|
alignSeq (
self,
newSeq,
matrix="BLOSUM-62",
gapChar='.',
**kw,
)
align in a new sequence
|
|
associate
|
associate (
self,
models,
seq=None,
force=True,
minLength=10,
showMatches=True,
showErrors=True,
)
associate models with sequences
models is normally a list of models, but it can be
a Sequence instance or None. If it's a Sequence, it
should be a Sequence of a particular chain of a model.
If None, then some or all of the alignment sequences
have residues attributes indicating their corresponding
model; set up the proper associations.
if seq is given, associate only with that sequence,
otherwise consider all sequences in alignment. If a
non-empty list of models is provided and force is
False, then it is assumed that the seq has just been
added to the alignment and that associations are being
re-evaluated.
If force is True, then if no association meets the
built-in association criteria, then use Needleman-
Wunsch to force an association with at least one
sequence.
If a chain is less than minLength residues,
ignore it.
showMatches and showErrors control whether
regions will be created indicating matches and errors.
A complete, error-free matchup will not have
regions created regardless.
|
|
emRaise
|
emRaise ( self )
Extension manager method
|
|
emQuit
|
emQuit ( self )
Extension manager method
|
|
saveString
|
saveString ( self )
returns a string that can be used by restoreMAV()
|
|
insertGap
|
insertGap (
self,
amount,
column,
gapChar='.',
)
insert a gap into the alignment
amount is the size of the gap
column is the column after which the gap is inserted
(so zero would put it in front of the alignment)
gapChar is what to fill the gap with
|
|
saveAssocInfo
|
saveAssocInfo (
self,
fileName,
namingStyle="simple",
)
|
|
save
|
save ( self, modal=False )
|
|
deleteHeaders
|
deleteHeaders ( self, headers )
delete header sequences
|
|
emName
|
emName ( self )
Extension manager method
|
|
readHeaderFile
|
readHeaderFile ( self, fileName )
Exceptions
|
|
UserError("Non-floating" " point value (%s)" " given on data line %d" %( val, ln + 1 ) )
UserError("RGB color on" " data line %d" " is not 3" " numbers" %( ln + 1 ) )
UserError( v )
UserError("Non-numeric" " color RGB" " color value" " given on data" " line %d" %( ln + 1 ) )
UserError( "No name for header line given in file" )
UserError("Unknown style (%s)." "Legal styles are: %s." %(style, ", ".join( styles ) ) )
UserError("Unknown color" " name (%s) on" " data line %d" %( color, ln + 1 ) )
UserError("RGB" " color values" " on data line" " %d not in the" " range zero to" " one" %( ln + 1 ) )
UserError("Value on data" " line %d is not a" " single character" " ('%s')" %( ln + 1, val ) )
UserError("Non-integer position" " (%s) on data line %d" %( pos, ln + 1 ) )
UserError("Position (%d) is less" " than one or greater than" " alignment length on data line" " %d" %( pos, ln + 1 ) )
UserError("Data line %d" " is neither position/" "value nor position/" "value/color" %( ln + 1 ) )
|
|
|
reorder
|
reorder ( self, seqs )
|
|
|