mailr11589 - in /branches/bieri_gui: ./ auto_analyses/ test_suite/shared_data/relaxation_data/13259_bug_reproducing_data/ test_s...


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

Header


Content

Posted by edward on September 16, 2010 - 18:27:
Author: bugman
Date: Thu Sep 16 18:27:04 2010
New Revision: 11589

URL: http://svn.gna.org/viewcvs/relax?rev=11589&view=rev
Log:
Merged revisions 11587-11588 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r11587 | bugman | 2010-09-16 18:20:20 +0200 (Thu, 16 Sep 2010) | 3 lines
  
  Renamed the results_folder arg to results_dir in the NOE auto-analysis, and 
rearranged the args.
........
  r11588 | bugman | 2010-09-16 18:22:30 +0200 (Thu, 16 Sep 2010) | 5 lines
  
  Added a system test for the dauvergne_protocol auto-analysis code.
  
  The test is not yet functional.
........

Added:
    
branches/bieri_gui/test_suite/shared_data/relaxation_data/13259_bug_reproducing_data/
      - copied from r11588, 
1.3/test_suite/shared_data/relaxation_data/13259_bug_reproducing_data/
    
branches/bieri_gui/test_suite/system_tests/scripts/model_free/full_analysis_trunc.py
      - copied unchanged from r11588, 
1.3/test_suite/system_tests/scripts/model_free/full_analysis_trunc.py
Modified:
    branches/bieri_gui/   (props changed)
    branches/bieri_gui/auto_analyses/noe.py
    branches/bieri_gui/test_suite/system_tests/model_free.py

Propchange: branches/bieri_gui/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Sep 16 18:27:04 2010
@@ -1,1 +1,1 @@
-/1.3:1-11575
+/1.3:1-11588

Modified: branches/bieri_gui/auto_analyses/noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/auto_analyses/noe.py?rev=11589&r1=11588&r2=11589&view=diff
==============================================================================
--- branches/bieri_gui/auto_analyses/noe.py (original)
+++ branches/bieri_gui/auto_analyses/noe.py Thu Sep 16 18:27:04 2010
@@ -35,11 +35,9 @@
 
 
 class NOE_calc:
-    def __init__(self, output_file='noe.out', seq_args=None, 
pipe_name='noe', noe_ref=None, noe_ref_rmsd=None, noe_sat=None, 
noe_sat_rmsd=None, unresolved=None, pdb_file=None, results_folder=None, 
int_method='height', heteronuc='N', proton='H', heteronuc_pdb='N'):
+    def __init__(self, seq_args=None, pipe_name='noe', noe_ref=None, 
noe_ref_rmsd=None, noe_sat=None, noe_sat_rmsd=None, unresolved=None, 
pdb_file=None, output_file='noe.out', results_dir=None, int_method='height', 
heteronuc='N', proton='H', heteronuc_pdb='N'):
         """Perform relaxation curve fitting.
 
-        @keyword output_file:   Name of the output file.
-        @type output_file:      str
         @keyword seq_args:      The sequence data (file name, dir, 
mol_name_col, res_num_col, res_name_col, spin_num_col, spin_name_col, sep).  
These are the arguments to the  sequence.read() user function, for more 
information please see the documentation for that function.
         @type seq_args:         list of lists of [str, None or str, None or 
int, None or int, None or int, None or int, None or int, None or int, None or 
int, None or str]
         @keyword pipe_name:     The name of the data pipe to create.
@@ -56,8 +54,10 @@
         @type unresolved:       str
         @keyword pdb_file:      Structure file in pdb format.
         @type pdb_file:         str
-        @keyword results_folder:Folder where results files are placed in.
-        @type results_folder:   str
+        @keyword output_file:   Name of the output file.
+        @type output_file:      str
+        @keyword results_dir:   Folder where results files are placed in.
+        @type results_dir:      str
         @keyword int_method:    The integration method, one of 'height', 
'point sum' or 'other'.
         @type int_method:       str
         @keyword heteronuc:     Name of heteronucleus of peak list.
@@ -70,16 +70,16 @@
 
         # Store the args.
         self.pipe_name = pipe_name
-        self.output_file = output_file
         self.noe_sat = noe_sat
         self.noe_sat_rmsd = noe_sat_rmsd
         self.noe_ref = noe_ref
         self.noe_ref_rmsd =noe_ref_rmsd
         self.unresolved = unresolved
         self.pdb_file = pdb_file
-        self.results_folder = results_folder
-        if results_folder:
-            self.grace_dir = results_folder+sep+'grace'
+        self.output_file = output_file
+        self.results_dir = results_dir
+        if results_dir:
+            self.grace_dir = results_dir+sep+'grace'
         else:
             self.grace_dir = None
         self.int_method = int_method
@@ -135,7 +135,7 @@
         self.interpreter.calc()
 
         # Save the NOEs.
-        self.interpreter.value.write(param='noe', file=self.output_file, dir 
= self.results_folder, force=True)
+        self.interpreter.value.write(param='noe', file=self.output_file, dir 
= self.results_dir, force=True)
 
         # Create grace files.
         self.interpreter.grace.write(y_data_type='ref', file='ref.agr', 
dir=self.grace_dir, force=True)
@@ -143,10 +143,10 @@
         self.interpreter.grace.write(y_data_type='noe', file='noe.agr', 
dir=self.grace_dir, force=True)
 
         # Write the results.
-        self.interpreter.results.write(file='results', 
dir=self.results_folder, force=True)
+        self.interpreter.results.write(file='results', dir=self.results_dir, 
force=True)
 
         # Save the program state.
-        self.interpreter.state.save(state = 'save', dir=self.results_folder, 
force=True)
+        self.interpreter.state.save(state = 'save', dir=self.results_dir, 
force=True)
 
 
     def check_vars(self):

Modified: branches/bieri_gui/test_suite/system_tests/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/test_suite/system_tests/model_free.py?rev=11589&r1=11588&r2=11589&view=diff
==============================================================================
--- branches/bieri_gui/test_suite/system_tests/model_free.py (original)
+++ branches/bieri_gui/test_suite/system_tests/model_free.py Thu Sep 16 
18:27:04 2010
@@ -25,8 +25,10 @@
 from math import pi
 import platform
 import numpy
+from os import sep
 from re import search
-from os import sep
+from shutil import copytree, rmtree
+from tempfile import mkdtemp
 
 # relax module imports.
 from base_classes import SystemTestCase
@@ -69,6 +71,11 @@
     def tearDown(self):
         """Reset the relax data storage object."""
 
+        # Remove temporary directories.
+        if hasattr(ds, 'tmpdir'):
+            rmtree(ds.tmpdir)
+
+        # Reset the relax data storage object.
         ds.__reset__()
 
 
@@ -199,6 +206,21 @@
         # Test the model.
         self.assertEqual(cdp.mol[0].res[1].spin[0].model, 'm4')
         self.assertEqual(cdp.mol[0].res[1].spin[0].params, ['S2', 'te', 
'Rex'])
+
+
+    # FIXME!
+    def xxx_test_dauvergne_protocol(self):
+        """Check the execution of auto_analyses.dauvergne_protocol."""
+
+        # Create a temporary directory for dumping files.
+        ds.tmpdir = mkdtemp()
+
+        # Copy the files into the temporary directory.
+        path = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'relaxation_data'+sep+'13259_bug_reproducing_data'
+        copytree(path, ds.tmpdir + sep + 'data')
+
+        # Execute the script.
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'full_analysis_trunc.py')
 
 
     def test_generate_ri(self):




Related Messages


Powered by MHonArc, Updated Thu Sep 16 18:40:02 2010