mailRe: Data set format


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on August 30, 2007 - 10:55:
Hi,

Those are some very strange errors!  For the relaxation data format of
'res_number, value, error', relax should have failed at the
relax_data.read() user function.  From the error messages, I would
guess that the reduced spectral density mapping calculation has
already occurred (and maybe MC sims).  I don't see how that is
possible?  Would you be able to attach the script you used?  Did you
specify the columns in the relax_data.read() user function?

For the error message 'RelaxError: The file contains no data.', this
is also incorrect.  The file contains data but just not in the
expected format.

The error message 'RelaxError: The relaxation data is invalid (num=1,
name=0.798308, data=0.00729703, error=trp).' is fairly informative.
Maybe this message could be improved though?

For the last data format, again you are getting to the end of the
script and then an error occurs.  The script used to generate this
error would again be very useful to work out what is happening.

Cheers,

Edward


On 8/29/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:

 Hi,

 I just made different tests with badly formated datasets.


 With a dataset of this format :

 res_number    value    error

 running the jw_mapping using the sample script (slightly modified), I get
the following error :


 Traceback (most recent call last):
   File "/home/semor/packages/relax-1.2/relax", line 454, in ?
     Relax()
   File "/home/semor/packages/relax-1.2/relax", line 166, in __init__
     self.interpreter.run()
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 213, in
run
     run_script(intro=self.relax.intro_string, local=self.local,
script_file=self.relax.script_file, quit=1)
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 388, in
run_script
     console.interact(intro, local, script_file, quit)
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 340, in
interact_script
     execfile(script_file, local)
   File "./jw_mapping_600.py", line 35, in ?
     grace.write(name, y_data_type='j0', file='j0_600.agr', force=1)
   File "/home/semor/packages/relax-1.2/prompt/grace.py", line 252, in write
     self.__relax__.generic.grace.write(run=run,
x_data_type=x_data_type, y_data_type=y_data_type, res_num=res_num,
res_name=res_name, plot_data=plot_data, norm=norm, file=file, dir=dir,
force=force)
   File "/home/semor/packages/relax-1.2/generic_fns/grace.py", line 256, in
write
     len(self.data[0][2])
 IndexError: list index out of range


 The following error message arises if I turn off the options related to
grace plotting...


 Traceback (most recent call last):
   File "/home/semor/packages/relax-1.2/relax", line 454, in ?
     Relax()
   File "/home/semor/packages/relax-1.2/relax", line 166, in __init__
     self.interpreter.run()
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 213, in
run
     run_script(intro=self.relax.intro_string, local=self.local,
script_file=self.relax.script_file, quit=1)
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 388, in
run_script
     console.interact(intro, local, script_file, quit)
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 340, in
interact_script
     execfile(script_file, local)
   File "./jw_mapping_600.py", line 45, in ?
     results.write(run=name, file='results_600', force=1)
   File "/home/semor/packages/relax-1.2/prompt/results.py", line 201, in
write
     self.__relax__.generic.results.write(run=run,
file=file, directory=dir, force=force, format=format,
compress_type=compress_type)
   File "/home/semor/packages/relax-1.2/generic_fns/results.py", line 166,
in write
     self.write_function(results_file, run)
   File "/home/semor/packages/relax-1.2/specific_fns/jw_mapping.py", line
661, in write_columnar_results
     for j in xrange(data.num_ri):
 AttributeError: Element instance has no attribute 'num_ri'


 As you can see, I don't get any RelaxError, but harder-to-fix error
messages...


 However, if a dataset of the following format is used :

 res_type    value    error

 the following error message arises :


 RelaxError: The file contains no data.


 which is what one should get.


 With a dataset of the following format :

 res_number    value   error    res_type

 the error message is again correct :


 RelaxError: The relaxation data is invalid (num=1, name=0.798308,
data=0.00729703, error=trp).


 Finally, with a dataset of the format :

 res_number   res_type   value

 the user still gets a strange error message :


 Traceback (most recent call last):
   File "/home/semor/packages/relax-1.2/relax", line 454, in ?
     Relax()
   File "/home/semor/packages/relax-1.2/relax", line 166, in __init__
     self.interpreter.run()
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 213, in
run
     run_script(intro=self.relax.intro_string, local=self.local,
script_file=self.relax.script_file, quit=1)
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 388, in
run_script
     console.interact(intro, local, script_file, quit)
   File "/home/semor/packages/relax-1.2/prompt/interpreter.py", line 340, in
interact_script
     execfile(script_file, local)
   File "./jw_mapping_600.py", line 35, in ?
     grace.write(name, y_data_type='j0', file='j0_600.agr', force=1)
   File "/home/semor/packages/relax-1.2/prompt/grace.py", line 252, in write
     self.__relax__.generic.grace.write(run=run,
x_data_type=x_data_type, y_data_type=y_data_type, res_num=res_num,
res_name=res_name, plot_data=plot_data, norm=norm, file=file, dir=dir,
force=force)
   File "/home/semor/packages/relax-1.2/generic_fns/grace.py", line 256, in
write
     len(self.data[0][2])
 IndexError: list index out of range


 So, the problem seems to arise only in certain circumstances when a field
is missing in the dataset.

 Maybe some error definitions should be added. This could be especially
useful for people used with ModelFree where input files are formatted as :

 res_number   value   error


 Cheers !


 Sébastien  :)






 Edward d'Auvergne wrote:
 Hi,

For the reading in of data, such as the R1 relaxation rates, the only
requirement for the format is that the data is in a column formatted
text file. The different columns can be changed by the num_col=0,
name_col=1, data_col=2, and error_col=3 arguments. The column
separator changed by the 'sep' argument. In the future, even more
diverse formats will be accepted as these arise and are reported on
the mailing lists.

With this in mind, coming up with a more descriptive error message
would be worthwhile. Currently you will get something such as:

RelaxError: "The relaxation data is invalid (num=" +
file_data[i][num_col] + ", name=" + file_data[i][name_col] + ", data="
+ file_data[i][data_col] + ", error=" + file_data[i][error_col] + ")."

This could probably be broken into simpler messages for different
types of error. The checks are currently for the residue number being
an integer, and the data and error being floating point numbers.
Would anyone have any suggestions or ideas for how this could be
better reported to the user? What tests and what types of messages
would you use? The system has to be flexible enough to handle
absolutely all rubbish thrown at it by a user ;)

Cheers,

Edward



On 8/21/07, Sebastien Morin <sebastien.morin.1@xxxxxxxxx> wrote:


 Hi all !

I am now analysing data using relax (line 1.2, branch consistency-tests,
revision 3354).

I realized (when using the consistency tests function) that it could be
nice to check data set format and output a error message when the format
isn't like the one requested.

For example, a data set of the following format wouldn't work :

1 0.90 0.05
2 0.79 0.05
3 0.6 0.1

neither would it work with the following format :

Gly 1 0.90 0.05
Gly 2 0.79 0.05
Gly 3 0.6 0.1


However, a dataset of the following format would work as it is the
format required :

1 Gly 0.90 0.05
2 Gly 0.79 0.05
3 Gly 0.6 0.1


This type of error is long to find out for a standard user as the error
messages yielded are not very helpful.

So, would it be a good idea to add a kind of test for the data set
format ? Maybe this has been already proposed for the 1.3 line. If so,
sorry for the duplicate request...

Cheers !


Sébastien :)

--
 ______________________________________
 _______________________________________________
 | |
 || Sebastien Morin ||
 ||| Etudiant au PhD en biochimie |||
 |||| Laboratoire de resonance magnetique nucleaire ||||
||||| Dr Stephane Gagne |||||
 |||| CREFSIP (Universite Laval, Quebec, CANADA) ||||
 ||| 1-418-656-2131 #4530 |||
 || ||
 |_______________________________________________|
 ______________________________________



_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

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-devel




 --
 ______________________________________
 _______________________________________________
 | |
 || Sebastien Morin ||
 ||| Etudiant au PhD en biochimie |||
 |||| Laboratoire de resonance magnetique nucleaire ||||
||||| Dr Stephane Gagne |||||
 |||| CREFSIP (Universite Laval, Quebec, CANADA) ||||
 ||| 1-418-656-2131 #4530 |||
 || ||
 |_______________________________________________|
 ______________________________________





Related Messages


Powered by MHonArc, Updated Thu Aug 30 12:02:11 2007