mailSTAR format file writer and parser - generating output for BMRB submission and reading the data out of the Palmer's Modefree mfout file.


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

Header


Content

Posted by Edward d'Auvergne on April 03, 2008 - 17:44:
Hi,

This post starts a new thread, but it follows on from the post at
https://mail.gna.org/public/relax-users/2008-04/msg00005.html.  The
parent of the previous thread is located at
https://mail.gna.org/public/relax-users/2008-04/msg00001.html.


On Wed, Apr 2, 2008 at 7:11 PM, Sébastien Morin
<sebastien.morin.1@xxxxxxxxx> wrote:

 Hi,

 I tried to use the palmer.extract() function, with no real success...

I have to admit that my Modelfree star format parser is not of very
high quality.  It woks if you use the palmer.py sample script, but
obviously not in this situation.  Nothing that's not fixable though.


 I had several error message during my first tries and manage to get rid of
them with a script like :

 =======================================

 runs = ['m1', 'm2', 'm3', 'm4', 'm5']
 diff_tensor_Phi = 22.4
 diff_tensor_Theta = -3.49
 diff_tensor_Dratio = 1.22
 diff_tensor_tm = 1.242e-08

 for name in runs:
     run.create(name, 'mf')
     sequence.read(name, 'sequence')
     diffusion_tensor.init(name, (diff_tensor_tm, diff_tensor_Dratio,
diff_tensor_Theta, diff_tensor_Phi), param_types=2, spheroid_type='prolate',
fixed=1)
     palmer.extract(run=name)

 name = 'aic'
 run.create(name, 'mf')
 sequence.read(name, 'sequence')
 relax_data.read(name, 'R1', '800', 799.812 * 1e6,
'800_R1.dat_plus_sequence')
 relax_data.read(name, 'R2', '800', 799.812 * 1e6,
'800_R2.dat_plus_sequence')
 relax_data.read(name, 'R1', '600', 599.739 * 1e6,
'600_R1.dat_plus_sequence')
 relax_data.read(name, 'R2', '600', 599.739 * 1e6,
'600_R2.dat_plus_sequence')
 relax_data.read(name, 'NOE', '600', 599.739 * 1e6,
'600_NOE.dat_plus_sequence')
 relax_data.read(name, 'R1', '500', 499.827 * 1e6,
'500_R1.dat_plus_sequence')
 relax_data.read(name, 'R2', '500', 499.827 * 1e6,
'500_R2.dat_plus_sequence')
 relax_data.read(name, 'NOE', '500', 499.827 * 1e6,
'500_NOE.dat_plus_sequence')
 diffusion_tensor.init(name, (diff_tensor_tm, diff_tensor_Dratio,
diff_tensor_Theta, diff_tensor_Phi), param_types=2, spheroid_type='prolate',
fixed=1)
 model_selection(method='AIC', modsel_run=name)
 results.write(run=name, file='results', force=1)

 =======================================

It is a little strange that you need to read in the sequence and the
relaxation data for the 'aic' run.  If you look at the palmer.py
sample script in the exec_stage_2() function, you'll see that none of
this is done.  The following should also work:


=======================================

runs = ['m1', 'm2', 'm3', 'm4', 'm5']
diff_tensor_Phi = 22.4
diff_tensor_Theta = -3.49
diff_tensor_Dratio = 1.22
diff_tensor_tm = 1.242e-08

for name in runs:
    run.create(name, 'mf')
    sequence.read(name, 'sequence')
    diffusion_tensor.init(name, (diff_tensor_tm, diff_tensor_Dratio,
diff_tensor_Theta, diff_tensor_Phi), param_types=2,
spheroid_type='prolate', fixed=1)
    palmer.extract(run=name)

name = 'aic'
run.create(name, 'mf')
model_selection(method='AIC', modsel_run=name)
results.write(run=name, file='results', force=1)

=======================================

 However, there is one problem still present : no model is chosen during AIC
selection... Here is what I get after the command
"model_selection(method='AIC', modsel_run=name)" :

 =======================================

 ...

 Instance 261.

 Run                  Num_params_(k)       Num_data_sets_(n)    Chi2
Criterion

 The model from the run None has been selected.

 ...

 =======================================

Is this for all spins?  Maybe running relax with the --debug flag will
give more information.


 It seems the mfout (which are all located in their respective folder : m1,
m2 , m3, m4 and m5) are not loaded properly...

 Do you have any clue about this issue ?

Sorry, I don't have any idea.  This will require investigation of the
relax data storage object to see what data is loaded from the mfout
file, and quite likely a little bit of coding, if you wish to do so.
I think the 1.3 line would be best for any changes in this code.
Almost all of the user functions you've used here have been updated to
the new relax design and the rest should simply involve the removal of
the run object from the relevant functions.


 Also, is there a way of extracting information from a mfout with relax
without inputing any sequence, diffusion tensor, or data..? I thought it
would be possible to use palmer.extract() in a short script like this :

As of yet, no.  The parser behind palmer.extract() will need to be
significantly improved.  The mfout file is STAR (Self Defining Text
Archival and Retrieval) formatted.  But the parser for this is very
basic and hacky.  If the mfout file is not as expected,
palmer.extract() will fail.

The star format is used in a number of other places as well.  For
example I plan to better incorporate relax with the BRMB
(http://www.bmrb.wisc.edu) which uses the STAR format.  And CIF files
are also STAR formatted.  So, ideally in the end I would like to
create a STAR format writer and parser for relax.  Or, if there is a
STAR format reader already that is open source and can easily be
imported into relax, then bundle that with relax.  As far as I can
tell, there is no official python package for reading and writing this
format.

But this will take time and will be very incremental.  So if you would
like to update the current code to read more of the mfout file
details, please feel free.  This STAR parser part in
generic_fns/palmer.py


 =======================================

 runs = ['m1', 'm2', 'm3', 'm4', 'm5']

 for name in runs:
     palmer.extract(run=name)

 name = 'aic'
 run.create(name, 'mf')
 model_selection(method='AIC', modsel_run=name)
 results.write(run=name, file='results', force=1)

 =======================================


 Do you see anything I do wrong ?

 Thanks !


 Séb  :)







 Edward d'Auvergne wrote:
 Hi,

This is simple enough to do. The user function palmer.extract() will
extract all the data (well that used by relax) out of Modelfree's
mfout files.

Regards,

Edward


On Tue, Apr 1, 2008 at 11:41 PM, Sébastien Morin
<sebastien.morin.1@xxxxxxxxx> wrote:


 Hi,

 I have different model-free analysis that originated from the program
 ModelFree (with results in a 'mfout' file).

 I would like to know if there is a way of loading these data to proceed
 to model selection by AIC using relax.

 I there ain't any way of doing this, I'll turn to the palmer.py script
 and start from the beginning...

 Thanks !


 Sébastien


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

 This is the relax-users mailing list
 relax-users@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-users








Related Messages


Powered by MHonArc, Updated Wed Apr 09 16:02:18 2008