That will work. So the question now is how to assign the Multialign Viewer to a variable when opening a file with pre-aligned sequences.  Eg after running  the following command

 

runCommand('open myseqalignment.fas')

 

the multialign window opens and the sequence-structure associations are made. How can I access this Multialign viewer instance? Is there something equivalent to

 

mav =  the_multialign_viewer_created_when_opening_a_file

 

Thanks again

 

Hernando

 

From: Eric Pettersen [mailto:pett@cgl.ucsf.edu]
Sent: Tuesday, May 07, 2019 1:04 PM
To: Hernando J Sosa
Cc: Chimera
Subject: Re: [Chimera-users] Association info

 

Ah, in that case if your Multalign Viewer instance is in a variable named ‘mav', call:

 

mav.saveAssocInfo(“save-file-path”)

 

—Eric



On May 7, 2019, at 8:00 AM, Hernando J Sosa <hernando.sosa@einstein.yu.edu> wrote:

 

Hi Eric,  

 

I need that but also the residue number at  each alignment position for  the  associated structures . All this info is in the 'association file' that is produced from the Multialign Viewer menu (MultiAlignViewer->File->Sava Association Info...).  I would like to be able to produce this file or retrieve the relevant info within a python script as I want to do this with many structures/alignments. So far the only way to produce this 'association file' that i know of  is through the GUI menus.  My plan was to produce this file(s) and then read  and parse the info in my python script.

 

Here is sample of an association file produced by the Multialign viewer

 

struct1 associates with seq1 chain K

  1 - GLU 390.K

  2 - ASN 391.K

  3 - SER 392.K

  4 - GLN 393.K

  5 - VAL 394.K

..

..

..

struct2  associates with seq2 chain K

  1 - ALA 5.K

  2 - GLU 6.K

  3 - SER 7.K

  4 - ASN 8.K

  5 - ILE 9.K

  6 - LYS 10.K

  7 - VAL 11.K

  8 - MET 12.K

  9 - CYS 13.K

  10 - ARG 14.K

..

..

..

 

The  file tells me which sequence is associated with which structure and also  the corresponding residues according to the alignment.  e.g  S7 in struct 2 corresponds with  S392 in struct1). This is the info I need.

 

Thanks

 

Hernando

 

 

From: Eric Pettersen [mailto:pett@cgl.ucsf.edu] 
Sent: Monday, May 06, 2019 5:39 PM
To: Hernando J Sosa
Cc: Chimera
Subject: Re: [Chimera-users] Association info

 

Hi Hernando,

            If all you need to know is what structure associated with which sequence, the Multalign Viewer instance has an ‘associations’ attribute that is a dictionary of Molecule objects to Sequence objects.  Both of those objects have ’name’ attributes which could be printed out.  You don’t really describe what precise ‘association info’ you want to save, so I’m not sure if this meets your needs or not.  If not, let me know exactly what you want to save.

 

—Eric


                Eric Pettersen

                UCSF Computer Graphics Lab

 

 




On May 6, 2019, at 11:43 AM, Hernando J Sosa <hernando.sosa@einstein.yu.edu> wrote:

 

Dear Chimera,

How can I save the Multialign viewer 'association info' to a file from a python script (I saw  a script  to save the sequence alignment in different formats but haven't seen how to save the association info).

Thanks

Hernando


_______________________________________________
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu
Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

 

_______________________________________________
Chimera-users mailing list: 
Chimera-users@cgl.ucsf.edu
Manage subscription: 
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users