mailr11811 - in /1.3/test_suite: shared_data/peak_lists/bug_17276/ system_tests/ system_tests/scripts/


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

Header


Content

Posted by edward on December 14, 2010 - 11:11:
Author: bugman
Date: Tue Dec 14 11:11:03 2010
New Revision: 11811

URL: http://svn.gna.org/viewcvs/relax?rev=11811&view=rev
Log:
Added a system test for bug #17276.

This bug (https://gna.org/bugs/index.php?17276) was reported by Leanne Minall 
<lm7902 att bristol
dot ac dott uk>.

The test passes though as the problem is not in this test data.


Added:
    1.3/test_suite/shared_data/peak_lists/bug_17276/
    1.3/test_suite/shared_data/peak_lists/bug_17276/T10102Ed.txt   (with 
props)
    1.3/test_suite/shared_data/peak_lists/bug_17276/T1010Ed.txt   (with props)
    1.3/test_suite/shared_data/peak_lists/bug_17276/T112002Ed.txt   (with 
props)
    1.3/test_suite/shared_data/peak_lists/bug_17276/T11200Ed.txt   (with 
props)
    1.3/test_suite/shared_data/peak_lists/bug_17276/sequence.out
    1.3/test_suite/system_tests/scripts/bug_17276_peak_lists.py
Modified:
    1.3/test_suite/system_tests/peak_lists.py

Added: 1.3/test_suite/shared_data/peak_lists/bug_17276/T10102Ed.txt
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/peak_lists/bug_17276/T10102Ed.txt?rev=11811&view=auto
==============================================================================
--- 1.3/test_suite/shared_data/peak_lists/bug_17276/T10102Ed.txt (added)
+++ 1.3/test_suite/shared_data/peak_lists/bug_17276/T10102Ed.txt Tue Dec 14 
11:11:03 2010
@@ -1,0 +1,5 @@
+      Assignment         w1         w2       Intensity
+
+                       A1649N-HN                               130.724       
                                  7.934                   1.69E+07            
                                                                              
                                                                              
+                       R1615N-HN                               131.144       
                                  7.235                   1.23E+06            
                                                                              
                      
+                       

Propchange: 1.3/test_suite/shared_data/peak_lists/bug_17276/T10102Ed.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 1.3/test_suite/shared_data/peak_lists/bug_17276/T1010Ed.txt
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/peak_lists/bug_17276/T1010Ed.txt?rev=11811&view=auto
==============================================================================
--- 1.3/test_suite/shared_data/peak_lists/bug_17276/T1010Ed.txt (added)
+++ 1.3/test_suite/shared_data/peak_lists/bug_17276/T1010Ed.txt Tue Dec 14 
11:11:03 2010
@@ -1,0 +1,4 @@
+      Assignment         w1         w2       Intensity         
+
+                       A1649N-HN                               130.724       
                                  7.934                   1.69E+07
+            R1615N-HN                          131.141                       
                  7.233                   1.23E+06                            
    

Propchange: 1.3/test_suite/shared_data/peak_lists/bug_17276/T1010Ed.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 1.3/test_suite/shared_data/peak_lists/bug_17276/T112002Ed.txt
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/peak_lists/bug_17276/T112002Ed.txt?rev=11811&view=auto
==============================================================================
--- 1.3/test_suite/shared_data/peak_lists/bug_17276/T112002Ed.txt (added)
+++ 1.3/test_suite/shared_data/peak_lists/bug_17276/T112002Ed.txt Tue Dec 14 
11:11:03 2010
@@ -1,0 +1,5 @@
+      Assignment         w1         w2       Intensity
+
+                       A1649N-HN                               130.724       
                                  7.934                   4.69E+06            
                                                                              
                                                                              
                                                        
+                       R1615N-HN                               120.372       
                                  8.206                   3.23E+05            
                                                                              
                      
+                       

Propchange: 1.3/test_suite/shared_data/peak_lists/bug_17276/T112002Ed.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 1.3/test_suite/shared_data/peak_lists/bug_17276/T11200Ed.txt
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/peak_lists/bug_17276/T11200Ed.txt?rev=11811&view=auto
==============================================================================
--- 1.3/test_suite/shared_data/peak_lists/bug_17276/T11200Ed.txt (added)
+++ 1.3/test_suite/shared_data/peak_lists/bug_17276/T11200Ed.txt Tue Dec 14 
11:11:03 2010
@@ -1,0 +1,4 @@
+      Assignment         w1         w2       Intensity                 
+               
+                       A1649N-HN                               130.724       
                                  7.934                   4.69E+06            
                                                                              
                      
+                       R1615N-HN                               131.136       
                                  7.235                   2.23E+05            
                                                                              
      

Propchange: 1.3/test_suite/shared_data/peak_lists/bug_17276/T11200Ed.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 1.3/test_suite/shared_data/peak_lists/bug_17276/sequence.out
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/shared_data/peak_lists/bug_17276/sequence.out?rev=11811&view=auto
==============================================================================
--- 1.3/test_suite/shared_data/peak_lists/bug_17276/sequence.out (added)
+++ 1.3/test_suite/shared_data/peak_lists/bug_17276/sequence.out Tue Dec 14 
11:11:03 2010
@@ -1,0 +1,148 @@
+# Res_num      Res_name        Spin_name
+1508  Met N
+1509  Lys N 
+1510   Ser     N
+1511   Asn     N
+1512   Glu     N
+1513   His     N
+1514   Asp     N
+1515   Asp     N
+1516   Cys     N
+1517   Gln     N
+1518   Val     N
+1519   Thr     N
+1520   Asn     N
+1521   Pro     N
+1522   Ser     N
+1523   Thr     N
+1524   Gly     N
+1525   His     N
+1526   Leu     N
+1527   Phe     N
+1528   Asp     N
+1529   Leu     N
+1530   Ser     N
+1531   Ser     N
+1532   Leu     N
+1533   Ser     N
+1534   Gly     N
+1535   Arg     N
+1536   Ala     N
+1537   Gly     N
+1538   Phe     N
+1539   Thr     N
+1540   Ala     N
+1541   Ala     N
+1542   Tyr     N
+1543   Ala     N
+1544   Lys     N
+1545   Gly     N
+1546   Trp     N
+1547   Gly     N
+1548   Val     N
+1549   Tyr     N
+1550   Met     N
+1551   Ser     N
+1552   Ile     N
+1553   Cys     N
+1554   Gly     N
+1555   Glu     N
+1556   Asn     N
+1557   Glu     N
+1558   Asn     N
+1559   Cys     N
+1560   Pro     N
+1561   Pro     N
+1562   Gly     N
+1563   Val     N
+1564   Gly     N
+1565   Ala     N
+1566   Cys     N
+1567   Phe     N
+1568   Gly     N
+1569   Gln     N
+1570   Thr     N
+1571   Arg     N
+1572   Ile     N
+1573   Ser     N
+1574   Val     N
+1575   Gly     N
+1576   Lys     N
+1577   Ala     N
+1578   Asn     N
+1579   Lys     N
+1580   Arg     N
+1581   Leu     N
+1582   Arg     N
+1583   Tyr     N
+1584   Val     N
+1585   Asp     N
+1586   Gln     N
+1587   Val     N
+1588   Leu     N
+1589   Gln     N
+1590   Leu     N
+1591   Val     N
+1592   Tyr     N
+1593   Lys     N
+1594   Asp     N
+1595   Gly     N
+1596   Ser     N
+1597   Pro     N
+1598   Cys     N
+1599   Pro     N
+1600   Ser     N
+1601   Lys     N
+1602   Ser     N
+1603   Gly     N
+1604   Leu     N
+1605   Ser     N
+1606   Tyr     N
+1607   Lys     N
+1608   Ser     N
+1609   Val     N
+1610   Ile     N
+1611   Ser     N
+1612   Phe     N
+1613   Val     N
+1614   Cys     N
+1615   Arg     N
+1616   Pro     N
+1617   Glu     N
+1618   Ala     N
+1619   Gly     N
+1620   Pro     N
+1621   Thr     N
+1622   Asn     N
+1623   Arg     N
+1624   Pro     N
+1625   Met     N
+1626   Leu     N
+1627   Ile     N
+1628   Ser     N
+1629   Leu     N
+1630   Asp     N
+1631   Lys     N
+1632   Gln     N
+1633   Thr     N
+1634   Cys     N
+1635   Thr     N
+1636   Leu     N
+1637   Phe     N
+1638   Phe     N
+1639   Ser     N
+1640   Trp     N
+1641   His     N
+1642   Thr     N
+1643   Pro     N
+1644   Leu     N
+1645   Ala     N
+1646   Cys     N
+1647   Glu     N
+1648   Gln     N
+1649   Ala     N
+1650   Thr     N
+1651   Lys     N
+1652   Glu     N
+1653   His     N
+1654   His     N

Modified: 1.3/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/peak_lists.py?rev=11811&r1=11810&r2=11811&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/peak_lists.py (original)
+++ 1.3/test_suite/system_tests/peak_lists.py Tue Dec 14 11:11:03 2010
@@ -45,6 +45,13 @@
         """Reset the relax data storage object."""
 
         ds.__reset__()
+
+
+    def test_bug_17276_peak_lists(self):
+        """Test catching bug #17276, the duplicated peak list reading 
failure submitted by Leanne Minall."""
+
+        # Execute the script.
+        self.interpreter.run(script_file=__main__.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'bug_17276_peak_lists.py')
 
 
     def test_read_peak_list_generic(self):

Added: 1.3/test_suite/system_tests/scripts/bug_17276_peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/bug_17276_peak_lists.py?rev=11811&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/scripts/bug_17276_peak_lists.py (added)
+++ 1.3/test_suite/system_tests/scripts/bug_17276_peak_lists.py Tue Dec 14 
11:11:03 2010
@@ -1,0 +1,118 @@
+###############################################################################
+#                                                                            
 #
+# Copyright (C) 2004-2008 Edward d'Auvergne                                  
 #
+#                                                                            
 #
+# This file is part of the program relax.                                    
 #
+#                                                                            
 #
+# relax 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 2 of the License, or          
 #
+# (at your option) any later version.                                        
 #
+#                                                                            
 #
+# relax 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 relax; if not, write to the Free Software                       
 #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  
 #
+#                                                                            
 #
+###############################################################################
+
+# Script for relaxation curve fitting.
+######################################
+
+
+# Python module imports.
+import __main__
+from os import sep
+
+
+# Path of the files.
+PATH = __main__.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'peak_lists'+sep+'bug_17276'
+
+
+# Create the 'rx' data pipe.
+pipe.create('rx', 'relax_fit')
+
+# Load the backbone amide 15N spins from a PDB file.
+sequence.read('sequence.out', dir=PATH, res_num_col=1, res_name_col=2, 
spin_name_col=3)
+
+# Spectrum names.
+names = [
+    'T1010Ed',
+    'T10102Ed',
+    'T11200Ed',
+    'T112002Ed' 
+]
+
+# Relaxation times (in seconds).
+times = [
+    0.01,
+    0.01,
+    1.2,
+    1.2
+]
+
+# Loop over the spectra.
+for i in xrange(len(names)):
+    # Load the peak intensities.
+    spectrum.read_intensities(file=names[i]+'.txt', dir=PATH, 
spectrum_id=names[i], int_method='height')
+
+    # Set the relaxation times.
+    relax_fit.relax_time(time=times[i], spectrum_id=names[i])
+
+# Specify the duplicated spectra.
+#spectrum.replicated(spectrum_ids=['T2_ncyc1_ave', 'T2_ncyc1b_ave'])
+
+# Set the errors.
+spectrum.replicated(spectrum_ids=['T1010Ed', 'T10102Ed'])
+spectrum.replicated(spectrum_ids=['T11200Ed', 'T112002Ed'])
+
+# Peak intensity error analysis.
+spectrum.error_analysis()
+
+# Deselect unresolved spins.
+#deselect.read(file='unresolved')
+
+# Set the relaxation curve type.
+relax_fit.select_model('exp')
+
+# Grid search.
+grid_search(inc=11)
+
+# The following is not functional!
+#
+## Minimise.
+#minimise('simplex', scaling=False, constraints=False)
+#
+## Monte Carlo simulations.
+#monte_carlo.setup(number=500)
+#monte_carlo.create_data()
+#monte_carlo.initial_values()
+#minimise('simplex', scaling=False, constraints=False)
+#monte_carlo.error_analysis()
+#
+## Save the relaxation rates.
+#value.write(param='rx', file='rx.out', force=True)
+#
+## Save the results.
+#results.write(file='results', force=True)
+#
+## Create Grace plots of the data.
+#grace.write(y_data_type='chi2', file='chi2.agr', force=True)    # Minimised 
chi-squared value.
+#grace.write(y_data_type='i0', file='i0.agr', force=True)    # Initial peak 
intensity.
+#grace.write(y_data_type='rx', file='rx.agr', force=True)    # Relaxation 
rate.
+#grace.write(x_data_type='relax_times', y_data_type='int', 
file='intensities.agr', force=True)    # Average peak intensities.
+#grace.write(x_data_type='relax_times', y_data_type='int', norm=True, 
file='intensities_norm.agr', force=True)    # Average peak intensities 
(normalised).
+#
+## Display the Grace plots.
+#grace.view(file='chi2.agr')
+#grace.view(file='i0.agr')
+#grace.view(file='rx.agr')
+#grace.view(file='intensities.agr')
+#grace.view(file='intensities_norm.agr')
+#
+## Save the program state.
+#state.save('rx.save', force=True)




Related Messages


Powered by MHonArc, Updated Tue Dec 14 11:40:02 2010