mailr20100 - /branches/relax_disp/sample_scripts/relax_disp/cpmg_analysis.py


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

Header


Content

Posted by edward on June 13, 2013 - 21:12:
Author: bugman
Date: Thu Jun 13 21:12:46 2013
New Revision: 20100

URL: http://svn.gna.org/viewcvs/relax?rev=20100&view=rev
Log:
Added a sample script for the relaxation dispersion analysis of CPMG-type 
data.


Added:
    branches/relax_disp/sample_scripts/relax_disp/cpmg_analysis.py
      - copied, changed from r20098, 
branches/relax_disp/test_suite/shared_data/dispersion/Hansen/relax_disp.py

Copied: branches/relax_disp/sample_scripts/relax_disp/cpmg_analysis.py (from 
r20098, 
branches/relax_disp/test_suite/shared_data/dispersion/Hansen/relax_disp.py)
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/sample_scripts/relax_disp/cpmg_analysis.py?p2=branches/relax_disp/sample_scripts/relax_disp/cpmg_analysis.py&p1=branches/relax_disp/test_suite/shared_data/dispersion/Hansen/relax_disp.py&r1=20098&r2=20100&rev=20100&view=diff
==============================================================================
--- 
branches/relax_disp/test_suite/shared_data/dispersion/Hansen/relax_disp.py 
(original)
+++ branches/relax_disp/sample_scripts/relax_disp/cpmg_analysis.py Thu Jun 13 
21:12:46 2013
@@ -1,4 +1,26 @@
-# Script for CPMG relaxation dispersion curve fitting using Dr. Flemming 
Hansen's data from http://dx.doi.org/10.1021/jp074793o.
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2013 Edward d'Auvergne                                       
 #
+#                                                                            
 #
+# This file is part of the program relax (http://www.nmr-relax.com).         
 #
+#                                                                            
 #
+# This program is free software: you can redistribute it and/or modify       
 #
+# it under the terms of the GNU General Public License as published by       
 #
+# the Free Software Foundation, either version 3 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# This program is distributed in the hope that it will be useful,            
 #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of             
 #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
 #
+# GNU General Public License for more details.                               
 #
+#                                                                            
 #
+# You should have received a copy of the GNU General Public License          
 #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.      
 #
+#                                                                            
 #
+###############################################################################
+
+"""Script for performing a full relaxation dispersion analysis using 
CPMG-type data."""
+
 
 # Python module imports.
 from os import sep
@@ -13,16 +35,16 @@
 #####################
 
 # The dispersion models.
-MODELS = ['R2eff', 'No Rex', 'LM63', 'CR72']
+MODELS = ['R2eff', 'No Rex', 'LM63', 'CR72', 'IT99']
 
 # The grid search size (the number of increments per dimension).
-GRID_INC = 5
+GRID_INC = 21
 
 # The number of Monte Carlo simulations to be used for error analysis at the 
end of the analysis.
-MC_NUM = 3
+MC_NUM = 500
 
-# The results directory.
-RESULTS_DIR = 'temp'
+# The model selection technique to use.
+MODSEL = 'AIC'
 
 
 # Set up the data pipe.
@@ -33,11 +55,8 @@
 pipe_bundle = 'relax_disp'
 pipe.create(pipe_name=pipe_name, bundle=pipe_bundle, pipe_type='relax_disp')
 
-# The path to the data files.
-data_path = status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'Hansen'
-
 # Load the sequence.
-sequence.read('fake_sequence.in', dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'Hansen', 
res_num_col=1, res_name_col=2)
+sequence.read('fake_sequence.in', res_num_col=1, res_name_col=2)
 
 # Name the spins so they can be matched to the assignments, and the isotope 
for field strength scaling.
 spin.name(name='N')
@@ -91,7 +110,7 @@
 # Loop over the spectra.
 for id, file, cpmg_frq, H_frq in data:
     # Load the peak intensities.
-    spectrum.read_intensities(file=file, dir=data_path, spectrum_id=id, 
int_method='height')
+    spectrum.read_intensities(file=file, spectrum_id=id, int_method='height')
 
     # Set the relaxation dispersion CPMG frequencies.
     relax_disp.cpmg_frq(spectrum_id=id, cpmg_frq=cpmg_frq)
@@ -115,12 +134,13 @@
 spectrum.error_analysis(subset=['800_reference.in', '800_66.667.in', 
'800_133.33.in', '800_133.33.in.bis', '800_200.in', '800_266.67.in', 
'800_333.33.in', '800_400.in', '800_466.67.in', '800_533.33.in', 
'800_533.33.in.bis', '800_600.in', '800_666.67.in', '800_733.33.in', 
'800_800.in', '800_866.67.in', '800_933.33.in', '800_933.33.in.bis', 
'800_1000.in'])
 
 # Deselect unresolved spins.
-deselect.read(file='unresolved', dir=data_path+sep+'500_MHz', res_num_col=1)
-deselect.read(file='unresolved', dir=data_path+sep+'800_MHz', res_num_col=1)
+deselect.read(file='unresolved', dir='500_MHz', res_num_col=1)
+deselect.read(file='unresolved', dir='800_MHz', res_num_col=1)
+
 
 
 # Auto-analysis execution.
 ##########################
 
 # Do not change!
-Relax_disp(pipe_name=pipe_name, pipe_bundle=pipe_bundle, 
results_dir=RESULTS_DIR, models=MODELS, grid_inc=GRID_INC, mc_sim_num=MC_NUM)
+Relax_disp(pipe_name=pipe_name, pipe_bundle=pipe_bundle, models=MODELS, 
grid_inc=GRID_INC, mc_sim_num=MC_NUM, modsel=MODSEL)




Related Messages


Powered by MHonArc, Updated Thu Jun 13 22:00:02 2013