Hi Michael, Maybe it would be good if the script threw out a warning if data is missing, rather than an error, and then just continue with the data extraction? I would suggest using the RelaxWarning system. I suggest we have good warnings where the text clearly describes what the user is missing and why.
Cheers, Edward On 27 May 2011 03:50, Michael Bieri <[email protected]> wrote: > Hi Lalit > > What kind of results do you want to extract. The script works for the > results obtained after your final run (after calculation of models I - V). I > am guessing you are trying to extract local tm data. This is why there are > no errors in the results file as well as no diffusion tensor. > > Edward. I think we could manipulate the script so it detects whether MC > simulations were performed or not and errors are expected. The same for the > diffusion tensor. If local tm model was selected (e.g. in case for small > peptides), it would just skip this extraction. > > Cheers > Michael > > > Am 27.05.2011 01:13, schrieb Edward d'Auvergne: >> >> Hi, >> >> Commenting out the lines might fix the problem. Could you >> nevertheless copy and paste the sequence information printed out by >> relax via the sequence.display() command. The missing diffusion >> tensor is interesting. How have you used relax? Have you used the >> new protocol of my paper >> http://www.nmr-relax.com/refs.html#dAuvergneGooley08b ? If so, maybe >> the local tm global model has been selected over the sphere, >> spheroids, and ellipsoid tensors. Can you see such a result from the >> relax printouts? Michael maybe able to better help out with these >> errors. >> >> Cheers, >> >> Edward >> >> >> On 26 May 2011 16:31, Deshmukh, Lalit (NIH/NIDDK) [F] >> <[email protected]> wrote: >>> >>> Hi, >>> >>> Thanks for the reply. I've added "sequence.display()" and ran the script >>> again. Attached is the error file. >>> I also tried to modify the script (albeit crudely). Here are the >>> modifications: >>> >>> ------------------------------------------------------------------------------------------------------------------------ >>> # spin_no = spin_id[spin_id.index(':')+1:spin_id.index('&')] >>> # spin_res = spin_id[spin_id.index('&')+2:spin_id.index('@')] >>> spin_no = spin_id[spin_id.index(':')+1:spin_id.index('@')] >>> spin_res = spin_no >>> print "spin_id is: X", spin_id, "X" >>> print "spin_no is: X", spin_no, "X" >>> self.file.write((spin_res) + " " + (spin_no)) >>> >>> ------------------------------------------------------------------------------------------------------------------------- >>> # S2. >>> if hasattr(spin, 's2'): >>> s2 = str(spin.s2) >>> # s2_err = str(spin.s2_err) >>> if spin.s2 == None: >>> self.file.write("") >>> else: >>> # self.file.write(" " + s2[0:5]+ " +/- " + >>> s2_err[0:4]) >>> self.file.write(" " + s2[0:5]+ " +/- 0.00") >>> >>> ------------------------------------------------------------------------------------------------------------------------ >>> # Rex. >>> if hasattr(spin, 'rex'): >>> rex = str(spin.rex) >>> # rex_err = str(spin.rex_err) >>> if spin.rex == None: >>> self.file.write("") >>> else: >>> # self.file.write(" " + rex[0:5]+ " >>> +/- " + rex_err[0:4]) >>> self.file.write(" " + rex[0:5]+ " >>> +/- 0.00") >>> >>> -------------------------------------------------------------------------------------------------------------------------- >>> After these modifications, the script does create new directories >>> (final_results, grace, s2final_results) and writes all the files in it. >>> However, then fails with following message: >>> >>> --------------------------------------------------------------------------------------------------------------------------- >>> relax> diffusion_tensor.display() >>> RelaxError: No diffusion tensor data exists. >>> >>> ---------------------------------------------------------------------------------------------------------------------------- >>> >>> Thanks in advance, >>> >>> Regards, >>> Lalit >>> ________________________________________ >>> From: [email protected] [[email protected]] On Behalf >>> Of Edward d'Auvergne [[email protected]] >>> Sent: Thursday, May 26, 2011 4:30 AM >>> To: Deshmukh, Lalit (NIH/NIDDK) [F]; Michael Bieri >>> Cc: [email protected] >>> Subject: Re: problems with final_data_extraction.py >>> >>> Dear Lalit and Michael, >>> >>> Welcome to the relax mailing lists. I've looked into this and it >>> appears to be a problem in the script with the nomenclature of one of >>> your spin systems. Michael, would you be able to look into this? The >>> problem appear to be in the script. Lalit, it would help >>> significantly if you could provide some more information. With the >>> current information, we can see it is a problem with spin names. >>> However there is not enough info to pinpoint the problem. Would you >>> be able to give some more information? For example if you execute >>> "sequence.display()" prior to line 36 in the script, this will display >>> the sequence which might help with the debugging. >>> >>> Cheers, >>> >>> Edward >>> >>> >>> >>> ---------- Forwarded message ---------- >>> From: Deshmukh, Lalit (NIH/NIDDK) [F]<[email protected]> >>> Date: 23 May 2011 18:23 >>> Subject: problems with final_data_extraction.py >>> To: "[email protected]"<[email protected]> >>> >>> >>> Hi, >>> >>> I am having some trouble with final_data_extraction.py script. Here >>> is the error. >>> >>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >>> relax> results.read(file='results', dir=None) >>> Opening the file 'results.bz2' for reading. >>> Traceback (most recent call last): >>> File "/usr/local/bin/relax", line 381, in<module> >>> Relax() >>> File "/usr/local/bin/relax", line 117, in __init__ >>> self.interpreter.run(self.script_file) >>> File "/usr/local/relax-1.3.10/prompt/interpreter.py", line 294, in run >>> return run_script(intro=self.__intro_string, local=locals(), >>> script_file=script_file, quit=self.__quit_flag, >>> show_script=self.__show_script, >>> raise_relax_error=self.__raise_relax_error) >>> File "/usr/local/relax-1.3.10/prompt/interpreter.py", line 597, in >>> run_script >>> return console.interact(intro, local, script_file, quit, >>> show_script=show_script, raise_relax_error=raise_relax_error) >>> File "/usr/local/relax-1.3.10/prompt/interpreter.py", line 483, in >>> interact_script >>> exec_script(script_file, local) >>> File "/usr/local/relax-1.3.10/prompt/interpreter.py", line 376, in >>> exec_script >>> runpy.run_module(module, globals) >>> File "/usr/lib/python2.6/runpy.py", line 140, in run_module >>> fname, loader, pkg_name) >>> File "/usr/lib/python2.6/runpy.py", line 34, in _run_code >>> exec code in run_globals >>> File >>> "/u/deshmukhl/Capsid/T1T1p_NOE/Relax/Calc/local_tm/aic/final_data_extraction.py", >>> line 36, in<module> >>> spin_no = spin_id[spin_id.index(':')+1:spin_id.index('&')] >>> ValueError: substring not found >>> >>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- >>> >>> Thanks in advance, >>> >>> Regards, >>> Lalit >>> >>> _______________________________________________ >>> relax (http://nmr-relax.com) >>> >>> This is the relax-users mailing list >>> [email protected] >>> >>> To unsubscribe from this list, get a password >>> reminder, or change your subscription options, >>> visit the list information page at >>> https://mail.gna.org/listinfo/relax-users >>> >>> _______________________________________________ >>> relax (http://nmr-relax.com) >>> >>> This is the relax-users mailing list >>> [email protected] >>> >>> To unsubscribe from this list, get a password >>> reminder, or change your subscription options, >>> visit the list information page at >>> https://mail.gna.org/listinfo/relax-users >>> >>> >> > > _______________________________________________ > relax (http://nmr-relax.com) > > This is the relax-users mailing list > [email protected] > > To unsubscribe from this list, get a password > reminder, or change your subscription options, > visit the list information page at > https://mail.gna.org/listinfo/relax-users > _______________________________________________ relax (http://nmr-relax.com) This is the relax-users mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-users

