Changes between Version 1 and Version 2 of MussaPython

12/05/2006 06:43:18 PM (18 years ago)



  • MussaPython

    v1 v2  
    11= Python Embedded into Mussa =
     3This quite a new feature, and is only available as of [493].
    35There are two ways to interact with mussa via python. One is via the embedded interpreter, the other by a python extension module. The advantage to the embedded interpreter is that it is possible to launch a Mussa GUI window to view an analysis that was created via python. The advantage to the extension module is that it doesn't replace your interpreter and that its easier to run scripts from the shell. (There's also the problem that the embedded interpreter probably wont work under Microsoft Windows).
    911The result of this is a mussa executable which has a python interpreter embedded in it.
    11 [http://mussagl-universal-b494.dmg OS X Universal Binary of Mussa with Python]
     13[http://mussagl-universal-b493.dmg OS X Universal Binary of Mussa with Python]
     15(Note there's a problem that only shows up when shipping mussa that causes thread error messages to pop-up,
     16they probably need to be fixed, but as a quick hack this'll probably still work.)
    1318=== Running ===
    5863  m.analyze()
     66If you're running the embedded version of mussa python, you can view that analysis with
     69  mussaqui.MussaWindow(m)
     72Since this functionality is so new, the window doesn't necessarily render with all the paths displayed on it, so you'll need to change the threshold in order to update the display.
     74Also since the GUI and interpreter are implemented in separate threads changing the mussa analysis while the GUI is viewing it is not safe.
     76Alternatively if one wants to examine the results of running a mussa analysis...
     77{{{ paths = m.paths() }}}
     78will return an object that holds the Nway Paths.
     80From there, you can do {{{ len(paths) }}} to see how many paths were found.
     82The interface to this part of the code is a bit clunky so actually viewing the nway offsets are a bit clunky.
     85conserved_paths = [ x for x in paths.pathz] # (pathz is only available as an iterable)
     88Conserved paths have 3 useful variables, a score, a window size, and the indices into the sequences. Unfortunately the indices are also only available as an interable.
     91print [ x for x in conserved_paths[0].track_indices
     94Negative values indicate that the match is to the reverse strand.