HappyDoc Generated Documentation Class: MAViewer

. / MultAlignViewer / MAViewer.py / MAViewer 

MAViewer displays a multiple alignment

Base Classes   

MAViewer
  ModelessDialog

Methods   
  Quit 
Quit ( self )
  saveHeader 
saveHeader (
        self,
        fileName,
        header,
        omitNoValue=True,
        )
  Hide 
Hide ( self )
  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.

  useTree 
useTree ( self,  tree )
  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\n(tree: %s; alignment: %d)" %(phylogenyFile, ",".join([ str(t.countNodes( "leaf" ) ) for t in fileTrees ] ), len( self.seqs ) ) )
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 )

  newRegion 
newRegion ( self,  **kw )
  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,
        numberingDisplay=None,
        )
  updateNumberings 
updateNumberings ( self )
  setRulerDisplay 
setRulerDisplay ( self,  showRuler=None )
  emHide 
emHide ( self )

Extension manager method

  setLeftNumberingDisplay 
setLeftNumberingDisplay ( self,  showNumbering=None )
  useColoringFile 
useColoringFile (
        self,
        colorFileName,
        makeDefault=False,
        )
  extractSubalignment 
extractSubalignment ( self )
  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

  setRightNumberingDisplay 
setRightNumberingDisplay ( self,  showNumbering=None )
  fillInUI 
fillInUI ( self,  parent )
  setResidueAttrs 
setResidueAttrs ( self )
  expandSelectionByColumns 
expandSelectionByColumns ( self )
Exceptions   

UserError( "No selection to expand" )

  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",
        hideNodes=True,
        )
  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=None,
        showErrors=None,
        )

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. Values of None indicate that the user preference should be used.

  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 )

This document was automatically generated Thu Nov 15 14:11:14 2007 by HappyDoc version 3.0.a1