[Chimera-users] associating multiple structures and sequences
pett at cgl.ucsf.edu
Tue Feb 7 11:45:57 PST 2012
On Feb 6, 2012, at 7:01 PM, Uppal, Karan wrote:
> I am writing a custom extension based on MultiAlign Viewer that
> highlights regions in a multiple sequence alignment based on
> numerical values stored in an external file. I modified the
> RegionBrowser.py script, and added a function that works just like
There may be ways to accomplish what you modification does without
changing the MAV code. Just using an imported MAV rather than your
custom mod has the advantage of gaining any additional functionality
and bug fixes that MAV gets in later releases.
One possibility is for you to use "sequence coloring files" that MAV
already reads (they can also optionally color associated structures).
The format is documented here:
JEvTrace File Formats
Such files can be read programatically with the MAViewer.loadScfFile
Another possibility is to directly create the new regions you want
with the MAViewer.newRegion method. The 'blocks' argument to that
method is a series of 4-tuples describing the rectangles composing the
region: (top-seq, bottom-seq, left, right) where left/right are zero-
based sequence indices.
> It works fine for one structure and sequence combination. However, I
> am trying to associate multiple copies of the same protein structure
> and its sequence. So, the structures are identical and so are the
> sequences in the sequence alignment, but each copy represents
> different information. My problem is that the sequences in the
> alignment viewer dialog box are highlighted in a random fashion.
> And, I want the sequences to be highlighted in an ordered fashion
> starting from first sequence to last sequence since we want to be
> able to map the highlighted regions back to the external file.
> Is there a way to control the order in which the sequences are
> highlighted in the alignment viewer dialog? Or is there a way to get
> the model # associated with a particular sequence and using the
> model # to highlight the alignment viewer?
I'm not 100% sure what "highlighted" means here, but I presume the
problem is that your first structure isn't necessarily associating
with your first sequence, since the structure and alignment sequences
are all identical? If that's the issue, then you need to explicitly
control the structure association rather than allowing automatic
association to occur. You do that by providing the argument
'autoAssociate=False' to the MAViewer constructor. Then you need to
call the MAViewer's 'associate' method for every structure association
you want to set up. Now, there's a big doc string for that method,
but briefly you want to call associate like so:
where mseq is the Sequence from the structure you want to associate
and aseq is the Sequence in alignment you want to associate with. You
get the Sequences from a model with:
or, if you know the chain ID you want (e.g. 'A'):
P.S. I cc'ed this to chimera-dev and set replies to go there since
this seems like much more a developer topic than a user topic.
UCSF Computer Graphics Lab
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users