[prev in list] [next in list] [prev in thread] [next in thread] 

List:       relax-devel
Subject:    Re: Data set format
From:       "Edward d'Auvergne" <edward.dauvergne () domain ! hid>
Date:       2007-08-30 15:02:25
Message-ID: 7f080ed10708300802g3ef94f3y33e3957e5f71b56 () domain ! hid
[Download RAW message or body]

Hi,

Ah, that is what is happening.  If you look at line 577 of the
'specific_fns/relax_data.py' file (1.2 line, r3357), that loop is
where the script should fail.  But the first test:

if len(file_data[i]) <= min_col_num:

causes all lines with only three columns to be skipped in the check.
The reason for this test is to allow for lines which only contain the
residue number and name and nothing else, and hence have the whole
sequence in the file but without the relaxation data for certain
residues.  So an important question is, how can we have both this
check and the check for file format validity together?

Cheers,

Edward


P.S.  I think the grace and results writing functions fail as this
file is seen as containing nothing and hence there is no data or
calculations within relax.  I could be wrong though.


On 8/30/07, Sebastien Morin <sebastien.morin.1@domain.hid> wrote:
>
>  Hi all,
>
>  Here is the script I used for jw_mapping to get the strange errors about
> data format...
>
>
>  # Script for reduced spectral density mapping.
>
>  # Create the run.
>  name = 'jw_600'
>  run.create(name, 'jw')
>
>  # Nuclei type
>  nuclei('N')
>
>  # Load the sequence.
>  sequence.read(name,
> 'ready_consistent_Ambler_no_W_600_NOE_duplicata_RMSD.dat-4')
>
>  # Load the relaxation data.
>  relax_data.read(name, 'R1', '600', 600.0 * 1e6,
> 'ready_consistent_Ambler_no_W_600_R1_4.dat-4')
>  relax_data.read(name, 'R2', '600', 600.0 * 1e6,
> 'ready_consistent_Ambler_no_W_600_R2_2.dat-4')
>  relax_data.read(name, 'NOE', '600', 600.0 * 1e6,
> 'ready_consistent_Ambler_no_W_600_NOE_duplicata_RMSD.dat-4')
>
>  # Set the bond length and CSA values.
>  value.set(name, 1.02 * 1e-10, 'bond_length')
>  value.set(name, -172 * 1e-6, 'csa')
>
>  # Select the frequency.
>  jw_mapping.set_frq(name, frq=600.0 * 1e6)
>
>  # Reduced spectral density mapping.
>  calc(name)
>
>  # Monte Carlo simulations.
>  monte_carlo.setup(name, number=500)
>  monte_carlo.create_data(name)
>  calc(name)
>  monte_carlo.error_analysis(name)
>
>  # Create grace files.
>  grace.write(name, y_data_type='j0', file='j0_600.agr', force=1)
>  grace.write(name, y_data_type='jwx', file='jwx_600.agr', force=1)
>  grace.write(name, y_data_type='jwh', file='jwh_600.agr', force=1)
>
>  # View the grace files.
>  grace.view(file='j0_600.agr')
>  grace.view(file='jwx_600.agr')
>  grace.view(file='jwh_600.agr')
>
>  # Finish.
>  results.write(run=name, file='results_600', force=1)
>  state.save('save_600', force=1)
>
>
>  As Ed proposed, the MC simulations were done before the strange error
> messages. When the grace options were activated, it stopped at this place
> and when the grace options were commented out, it stopped at the result
> writing command...
>
>  Important notice, I didn't specify the columns.
>
>  For what Gary proposed (see below), I absolutely agree with everything.
>
>  Cheers
>
>
>  Sébastien  :)
>
>
>
>
>
>
>  Gary Thompson wrote:
>  Hi,
>
> Sorry, would you be able to resend your message? It was only sent to
> me and not Seb or the mailing list.
>
> Cheers,
>
> Edward
>
>
> On 8/28/07, gary thompson <garyt.and.sarahb@domain.hid> wrote:
>
>
>  Dear Seb
>
> The things (I think ;-)) that are generally needed are
> 1. we should fail quickly if something is wrong
> 2. the failure message should have
>  a. a filename with a complete path
>  b. a line number and a field number
>  c. the line itself with the error indicated
>
> error failed to read data from wobble.txt, bad data format!
> file: /wibble/wobble.txt had an integer at line 56 column 6 when it should
> be a string
> 1 2 3 b a 6 ...
>
> 3. The things to check for are
>  a. correct number of arguments
>  b. the correct type for arguments
>
> allowing comments in these files is also a good idea that i looked at at one
> point
>
> specifically this allows
>
> a. the user (or program) to record meta information abou the file
> b. would allow files such as the monte carlo outputs to have meta
> information to allow the human reader to more easily distinguish the
> sections in the file
>
> any way there are some off the cuff thoughts
>
> regards
> gary
>
>
>
>
> On 8/27/07, Edward d'Auvergne < edward.dauvergne@domain.hid> 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@domain.hid> 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@domain.hid
>
> 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
>
>
>  _______________________________________________
> relax (http://nmr-relax.com)
>
> This is the relax-devel mailing list
> relax-devel@domain.hid
>
> 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
>
>
>
>  .
>
>
> _______________________________________________
> relax (http://nmr-relax.com)
>
> This is the relax-devel mailing list
> relax-devel@domain.hid
>
> 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 |||
>  || ||
>  |_______________________________________________|
>  ______________________________________
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic