[Chimera-users] More on extracting data from the reply log

Jean Didier Pie Marechal JeanDidier.Marechal at uab.cat
Sat Jul 17 06:33:00 PDT 2010


Hi everyone,

I want to write  only a part of the reply log in a file. I was trying to use the script you gave to katrina months ago but I have a problem in parsing the reply log text output.
If I understand correctly the reply log text is a raw text. I'd like to parse it in "lines" and then only write in the output file a intersting bit, like for example lines that contains "RMSD". I thought it would be enough to split text using the '\n' return character but that does not work. Could you give me a hand please? 

Best

JD

def save_reply_log(path):
   from chimera import dialogs
   r = dialogs.find('reply')
   text = r.text.get('1.0', 'end')
   f= open(path, 'w')
   i=text.split("\n")
   f.close()

save_reply_log("d:/tmplog.txt")

Dr. Jean-Didier Maréchal
Lecturer
The Computational Biotechnological Chemistry Team
Unitat de Química Física
Departament de Química
Universitat Autònoma de Barcelona
Edifici C.n.
08193 Cerdanyola (Barcelona)
Tel: +34.935814936
e-mail: JeanDidier.Marechal at uab.es
www: http://asklipio.qf.uab.es

----- Missatge original -----
De: chimera-users-request at cgl.ucsf.edu
Data: Divendres, Juliol 16, 2010 7:33 pm
Assumpte: Chimera-users Digest, Vol 87, Issue 13

> Send Chimera-users mailing list submissions to
> 	chimera-users at cgl.ucsf.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> or, via email, send a message with subject or body 'help' to
> 	chimera-users-request at cgl.ucsf.edu
> 
> You can reach the person managing the list at
> 	chimera-users-owner at cgl.ucsf.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Chimera-users digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: alignment + missing residues (Gesa Volkers)
>   2. Re: alignment + missing residues (Gesa Volkers)
>   3. Re: alignment + missing residues (Eric Pettersen)
> 
> 
> --------------------------------------------------------------------
> --
> 
> Message: 1
> Date: Fri, 16 Jul 2010 11:58:48 +0200
> From: Gesa Volkers <gesa.volkers at uni-greifswald.de>
> Subject: Re: [Chimera-users] alignment + missing residues
> To: Eric Pettersen <pett at cgl.ucsf.edu>
> Cc: chimera-dev at cgl.ucsf.edu, chimera-users at cgl.ucsf.edu
> Message-ID: <4C402D58.7090906 at uni-greifswald.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Dear Eric,
> 
> thanks for your suggestions. Unfortunately removing the SEQRES 
> record 
> did not help. I also downloaded and installed the new chimera-
> version 
> today. The false numbering in the alignment still occurs. Also when 
> I 
> remove the SEQRES record and try with the new chimera version the 
> false 
> numbering appears. Quite annoying... The pdb-file is not in the 
> protein 
> data bank yet.
> 
> Any more suggestions? Could I add "dummy atoms" in the structure?
> 
> Thanks,
> Gesa
> 
> 
> 
> Eric Pettersen schrieb:
> > On Jul 14, 2010, at 6:53 AM, Gesa Volkers wrote:
> >
> >> Dear All,
> >>
> >> I observed an issue with the alignment function of Chimera.
> >> I loaded a crystal structure where in between a loop is not 
> modelled 
> >> due to low electron density- so these residues are missing in 
> the 
> >> structure and the numbering also has this gap. When I align this 
> >> structure with others, the missing residues are not recognized 
> and 
> >> chimera just overrides the numbering so after this loop all the 
> >> numbers in the alignment do not fit anymore to the residues they 
> >> should belong to although the structure and numberings are shown 
> in 
> >> the right way in the graphics window. How can I overcome this 
> issue? 
> >> Should I change the pdb-file? In which way?
> >>
> >> Thanks for all responses!
> >
> > Hi Gesa,
> > I had a similar problem reported with 1JFF 12 days ago and 
> haven't yet 
> > worked on fixing it.  It seems to only happen for a small subset 
> of 
> > structures.  1JFF has a missing loop and also exactly one missing 
> > residue at the N terminus.  Is your structure like that?  Is it a 
> > standard PDB entry (if so, what's the ID code)? I'll add you to 
> the 
> > recipient list for the ticket we have open in our bug database 
> for 
> > this (#8585) so you will be notified when it gets fixed.  It'll 
> > probably be fairly soon.
> > Until then the only workaround that occurs to me is for you to 
> remove 
> > the SEQRES records from the PDB file before you open it.  Then 
> the 
> > Sequence viewer will depict only the residues physically present 
> in 
> > the structure -- no gaps (incorrect or otherwise) will be depicted.
> >
> > --Eric
> >
> >                         Eric Pettersen
> >
> >                         UCSF Computer Graphics Lab
> >
> >                         http://www.cgl.ucsf.edu
> >
> >
> >
> 
> 
> -- 
> Gesa Volkers
> Institut f?r Biochemie, Molekulare Strukturbiologie
> Felix-Hausdorff-Stra?e 4
> 17489 Greifswald
> Germany
> +49 (3834)-864392
> 
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Fri, 16 Jul 2010 12:06:56 +0200
> From: Gesa Volkers <gesa.volkers at uni-greifswald.de>
> Subject: Re: [Chimera-users] alignment + missing residues
> To: Eric Pettersen <pett at cgl.ucsf.edu>
> Cc: chimera-dev at cgl.ucsf.edu, chimera-users at cgl.ucsf.edu
> Message-ID: <4C402F40.2010604 at uni-greifswald.de>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Additionally I downloaded 1JFF and did an alignment with another 
> tubulin-structure. And still the numbering does not recognize this 
> gap 
> between 34 and 61.
> 
> Gesa Volkers schrieb:
> > Dear Eric,
> >
> > thanks for your suggestions. Unfortunately removing the SEQRES 
> record 
> > did not help. I also downloaded and installed the new chimera-
> version 
> > today. The false numbering in the alignment still occurs. Also 
> when I 
> > remove the SEQRES record and try with the new chimera version the 
> > false numbering appears. Quite annoying... The pdb-file is not in 
> the 
> > protein data bank yet.
> >
> > Any more suggestions? Could I add "dummy atoms" in the structure?
> >
> > Thanks,
> > Gesa
> >
> >
> >
> > Eric Pettersen schrieb:
> >> On Jul 14, 2010, at 6:53 AM, Gesa Volkers wrote:
> >>
> >>> Dear All,
> >>>
> >>> I observed an issue with the alignment function of Chimera.
> >>> I loaded a crystal structure where in between a loop is not 
> modelled 
> >>> due to low electron density- so these residues are missing in 
> the 
> >>> structure and the numbering also has this gap. When I align 
> this 
> >>> structure with others, the missing residues are not recognized 
> and 
> >>> chimera just overrides the numbering so after this loop all the 
> >>> numbers in the alignment do not fit anymore to the residues 
> they 
> >>> should belong to although the structure and numberings are 
> shown in 
> >>> the right way in the graphics window. How can I overcome this 
> issue? 
> >>> Should I change the pdb-file? In which way?
> >>>
> >>> Thanks for all responses!
> >>
> >> Hi Gesa,
> >> I had a similar problem reported with 1JFF 12 days ago and 
> haven't 
> >> yet worked on fixing it.  It seems to only happen for a small 
> subset 
> >> of structures.  1JFF has a missing loop and also exactly one 
> missing 
> >> residue at the N terminus.  Is your structure like that?  Is it 
> a 
> >> standard PDB entry (if so, what's the ID code)? I'll add you to 
> the 
> >> recipient list for the ticket we have open in our bug database 
> for 
> >> this (#8585) so you will be notified when it gets fixed.  It'll 
> >> probably be fairly soon.
> >> Until then the only workaround that occurs to me is for you to 
> remove 
> >> the SEQRES records from the PDB file before you open it.  Then 
> the 
> >> Sequence viewer will depict only the residues physically present 
> in 
> >> the structure -- no gaps (incorrect or otherwise) will be depicted.
> >>
> >> --Eric
> >>
> >>                         Eric Pettersen
> >>
> >>                         UCSF Computer Graphics Lab
> >>
> >>                         http://www.cgl.ucsf.edu
> >>
> >>
> >>
> >
> >
> 
> 
> -- 
> Gesa Volkers
> Institut f?r Biochemie, Molekulare Strukturbiologie
> Felix-Hausdorff-Stra?e 4
> 17489 Greifswald
> Germany
> +49 (3834)-864392
> 
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Fri, 16 Jul 2010 10:32:39 -0700
> From: Eric Pettersen <pett at cgl.ucsf.edu>
> Subject: Re: [Chimera-users] alignment + missing residues
> To: Gesa Volkers <gesa.volkers at uni-greifswald.de>
> Cc: chimera-dev at cgl.ucsf.edu, chimera-users at cgl.ucsf.edu
> Message-ID: <CF134751-B951-403B-B9E3-E441DB44644D at cgl.ucsf.edu>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Dear Gesa,
> 	I suspect you are using a Mac, since the daily builds failed last  
> night for the Mac platforms.  You need to get a daily build dated 
> July  
> 16 or later.  I tried opening the sequence view for 1JFF in one of 
> the  
> successful daily builds and it was correct, e.g.:
> 
> 
> 
> You can see that the interior gap is correctly recognized now.   
> Hopefully the daily builds on the Mac platforms will work tonight.
> 
> >> thanks for your suggestions. Unfortunately removing the SEQRES  
> >> record did not help. I also downloaded and installed the new  
> >> chimera-version today. The false numbering in the alignment 
> still  
> >> occurs. Also when I remove the SEQRES record and try with the 
> new  
> >> chimera version the false numbering appears. Quite annoying... 
> The  
> >> pdb-file is not in the protein data bank yet.
> 
> Ah, the "remove SEQRES records" hack will only work for the single- 
> sequence viewer, not an alignment.  I tested that in the 1.4.1 
> release  
> and it indeed worked as I expected:
> 
> 
> 
> The whole sequence is smushed together with no gaps, but the  
> correspondences are correct.  You could then align additional  
> sequences to the smushed sequence and the correspondences would 
> remain  
> correct.  Nonetheless it's probably simply better to wait for a 
> daily  
> build to succeed than to use the hack now.  So make sure you check 
> the  
> date in the download table.  If you still have problems with a 
> release  
> later than July 16, let me know.
> 
> --Eric
> 
>                         Eric Pettersen
>                         UCSF Computer Graphics Lab
>                         http://www.cgl.ucsf.edu
> 
> On Jul 16, 2010, at 3:06 AM, Gesa Volkers wrote:
> 
> > Additionally I downloaded 1JFF and did an alignment with another  
> > tubulin-structure. And still the numbering does not recognize 
> this  
> > gap between 34 and 61.
> >
> > Gesa Volkers schrieb:
> >> Dear Eric,
> >>
> >> thanks for your suggestions. Unfortunately removing the SEQRES  
> >> record did not help. I also downloaded and installed the new  
> >> chimera-version today. The false numbering in the alignment 
> still  
> >> occurs. Also when I remove the SEQRES record and try with the 
> new  
> >> chimera version the false numbering appears. Quite annoying... 
> The  
> >> pdb-file is not in the protein data bank yet.
> >>
> >> Any more suggestions? Could I add "dummy atoms" in the structure?
> >>
> >> Thanks,
> >> Gesa
> >>
> >>
> >>
> >> Eric Pettersen schrieb:
> >>> On Jul 14, 2010, at 6:53 AM, Gesa Volkers wrote:
> >>>
> >>>> Dear All,
> >>>>
> >>>> I observed an issue with the alignment function of Chimera.
> >>>> I loaded a crystal structure where in between a loop is not  
> >>>> modelled due to low electron density- so these residues are  
> >>>> missing in the structure and the numbering also has this gap.  
> >>>> When I align this structure with others, the missing residues 
> are  
> >>>> not recognized and chimera just overrides the numbering so 
> after  
> >>>> this loop all the numbers in the alignment do not fit anymore 
> to  
> >>>> the residues they should belong to although the structure and  
> >>>> numberings are shown in the right way in the graphics window. 
> How  
> >>>> can I overcome this issue? Should I change the pdb-file? In 
> which  
> >>>> way?
> >>>>
> >>>> Thanks for all responses!
> >>>
> >>> Hi Gesa,
> >>> I had a similar problem reported with 1JFF 12 days ago and 
> haven't  
> >>> yet worked on fixing it.  It seems to only happen for a small  
> >>> subset of structures.  1JFF has a missing loop and also exactly 
> 
> >>> one missing residue at the N terminus.  Is your structure like  
> >>> that?  Is it a standard PDB entry (if so, what's the ID code)?  
> >>> I'll add you to the recipient list for the ticket we have open 
> in  
> >>> our bug database for this (#8585) so you will be notified when 
> it  
> >>> gets fixed.  It'll probably be fairly soon.
> >>> Until then the only workaround that occurs to me is for you to  
> >>> remove the SEQRES records from the PDB file before you open it. 
>  
> >>> Then the Sequence viewer will depict only the residues 
> physically  
> >>> present in the structure -- no gaps (incorrect or otherwise) 
> will  
> >>> be depicted.
> >>>
> >>> --Eric
> >>>
> >>>                        Eric Pettersen
> >>>
> >>>                        UCSF Computer Graphics Lab
> >>>
> >>>                        http://www.cgl.ucsf.edu
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> > -- 
> > Gesa Volkers
> > Institut f?r Biochemie, Molekulare Strukturbiologie
> > Felix-Hausdorff-Stra?e 4
> > 17489 Greifswald
> > Germany
> > +49 (3834)-864392
> >
> >
> 
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://plato.cgl.ucsf.edu/pipermail/chimera-
> users/attachments/20100716/4847a922/attachment.html 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Picture 1.png
> Type: image/png
> Size: 67243 bytes
> Desc: not available
> Url : http://plato.cgl.ucsf.edu/pipermail/chimera-
> users/attachments/20100716/4847a922/attachment.png 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Picture 2.png
> Type: image/png
> Size: 74069 bytes
> Desc: not available
> Url : http://plato.cgl.ucsf.edu/pipermail/chimera-
> users/attachments/20100716/4847a922/attachment-0001.png 
> 
> ------------------------------
> 
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> 
> 
> End of Chimera-users Digest, Vol 87, Issue 13
> *********************************************
> 





More information about the Chimera-users mailing list