mailRe: [bug #21959] cpmg_analysis


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

Header


Content

Posted by Edward d'Auvergne on April 23, 2014 - 15:04:
Hi,

Could you list the entire contents of the '500_MHz' folder?  I must
absolutely contain that file!  You can do this by running "dir > log"
and opening the 'log' text file.  I have done this on a virtual
machine and see:

    Directory: 
C:\Users\edward\relax\tags\3.1.7\test_suite\shared_data\dispersion\Hansen\500_MHz


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---        17/03/2014   3:11 PM       2038 1000.in
-a---        17/03/2014   3:11 PM       3143 1000.in_sparky
-a---        17/03/2014   3:11 PM        188 1000.in_trunc
-a---        17/03/2014   3:11 PM       2038 133.33.in
-a---        17/03/2014   3:11 PM       2038 133.33.in.bis
-a---        17/03/2014   3:11 PM       3141 133.33.in.bis_sparky
-a---        17/03/2014   3:11 PM        186 133.33.in.bis_trunc
-a---        17/03/2014   3:11 PM       3141 133.33.in_sparky
-a---        17/03/2014   3:11 PM        186 133.33.in_trunc
-a---        17/03/2014   3:11 PM       2038 200.in
-a---        17/03/2014   3:11 PM       3141 200.in_sparky
-a---        17/03/2014   3:11 PM        186 200.in_trunc
-a---        17/03/2014   3:11 PM       2038 266.67.in
-a---        17/03/2014   3:11 PM       3141 266.67.in_sparky
-a---        17/03/2014   3:11 PM        186 266.67.in_trunc
-a---        17/03/2014   3:11 PM       2038 333.33.in
-a---        17/03/2014   3:11 PM       3141 333.33.in_sparky
-a---        17/03/2014   3:11 PM        186 333.33.in_trunc
-a---        17/03/2014   3:11 PM       2038 400.in
-a---        17/03/2014   3:11 PM       3141 400.in_sparky
-a---        17/03/2014   3:11 PM        186 400.in_trunc
-a---        17/03/2014   3:11 PM       2038 466.67.in
-a---        17/03/2014   3:11 PM       3141 466.67.in_sparky
-a---        17/03/2014   3:11 PM        186 466.67.in_trunc
-a---        17/03/2014   3:11 PM       2038 533.33.in
-a---        17/03/2014   3:11 PM       2038 533.33.in.bis
-a---        17/03/2014   3:11 PM       3141 533.33.in.bis_sparky
-a---        17/03/2014   3:11 PM        186 533.33.in.bis_trunc
-a---        17/03/2014   3:11 PM       3141 533.33.in_sparky
-a---        17/03/2014   3:11 PM        186 533.33.in_trunc
-a---        17/03/2014   3:11 PM       2038 600.in
-a---        17/03/2014   3:11 PM       3141 600.in_sparky
-a---        17/03/2014   3:11 PM        186 600.in_trunc
-a---        17/03/2014   3:11 PM       2038 66.667.in
-a---        17/03/2014   3:11 PM       3141 66.667.in_sparky
-a---        17/03/2014   3:11 PM        186 66.667.in_trunc
-a---        17/03/2014   3:11 PM       2038 666.67.in
-a---        17/03/2014   3:11 PM       3141 666.67.in_sparky
-a---        17/03/2014   3:11 PM        186 666.67.in_trunc
-a---        17/03/2014   3:11 PM       2038 733.33.in
-a---        17/03/2014   3:11 PM       3141 733.33.in_sparky
-a---        17/03/2014   3:11 PM        186 733.33.in_trunc
-a---        17/03/2014   3:11 PM       2038 800.in
-a---        17/03/2014   3:11 PM       3141 800.in_sparky
-a---        17/03/2014   3:11 PM        186 800.in_trunc
-a---        17/03/2014   3:11 PM       2038 866.67.in
-a---        17/03/2014   3:11 PM       3141 866.67.in_sparky
-a---        17/03/2014   3:11 PM        186 866.67.in_trunc
-a---        17/03/2014   3:11 PM       2038 933.33.in
-a---        17/03/2014   3:11 PM       2038 933.33.in.bis
-a---        17/03/2014   3:11 PM       3141 933.33.in.bis_sparky
-a---        17/03/2014   3:11 PM        186 933.33.in.bis_trunc
-a---        17/03/2014   3:11 PM       3141 933.33.in_sparky
-a---        17/03/2014   3:11 PM        186 933.33.in_trunc
-a---        23/04/2014   2:00 PM      13766 log
-a---        17/03/2014   3:11 PM       2038 reference.in
-a---        17/03/2014   3:11 PM       3141 reference.in_sparky
-a---        17/03/2014   3:11 PM        186 reference.in_trunc
-a---        17/03/2014   3:11 PM         20 unresolved

You must see the same files!  If not, could you check your relax
installation file to see if it is complete?  There are a number of
md5sum programs which can be downloaded and installed for Windows, and
then you can check that the relax distribution archive you have used
is correct.  Maybe your download was interrupted and the zip file only
extracted a portion of all of the relax files.

Regards,

Edward



On 23 April 2014 14:47,  <mengjun.xue@xxxxxxxxxxxxxxxxxxxx> wrote:
Hi Edward,

Thank you so much for the detailed information about setting data path, as
you suggested I have set data path in cpmg_analysis.py to:

DATA_PATH = 'C:\Program
files\Relax-3.1.7\\test_suite\shared_data\dispersion\Hansen' or

DATA_PATH = 'C:\Program
files\Relax-3.1.7\test_suite\shared_data\dispersion\Hansen'

and copy cpmg_analysis.py to the base relax directory, and then run the
cpmg_analysis.py under cmd, C:\program files\relax-3.1.7\relax
cpmg_analysis.py, still there are errors:

spectrum.read_intensities(file='500_MHz\\reference.in_sparky',
dir='C:\\Program
files\\Relax-3.1.7\\test_suite\\shared_data\\dispersion\\Hansen',
spectrum_id='500_reference.in', dim=1, int_method='height', int_col=None,
spin_id_col=None, mol_name_col=None, res_num_col=None, res_name_col=None,
spin_num_col=None, spin_name_col=None, sep=None, spin_id=None, ncproc=None)

RelaxError: The sequence data does not exist.

relax> spectrum.read_intensities(file='500_MHz\\reference.in_sparky',
dir='C:\\Program
files\\Relax-3.1.7\test_suite\\shared_data\\dispersion\\Hansen',
spectrum_id='500_reference.in', dim=1, int_method='height', int_col=None,
spin_id_col=None, mol_name_col=None, res_num_col=None, res_name_col=None,
spin_num_col=None, spin_name_col=None, sep=None, spin_id=None, ncproc=None)

RelaxError: The sequence data does not exist.


In the folder of '500_MHz', I can not find reference.in_sparky and
500_reference.in, I can find the sequence file 'fake_sequence.in'.


Thank you.

Best regards,

Mengjun




Quoting Edward d'Auvergne <edward@xxxxxxxxxxxxx>:

Hi Mengjun,

This is a simple case of handling file system paths and directories
correctly and understanding what the current directory is.  When you
run a relax script, the current working directory (CWD) will be set to
the directory that contains the script.  As you copied the script into
the base relax directory, the base directory will be the CWD.

If you have a look at the DATA_PATH variable, that is what is called a
relative path.  There is no root directory at the start ('C:\' in
Windows, "/" in Linux and Macs) so it is not an absolute path.  A
relative path will then be relative to the CWD.  That means that
DATA_PATH is added to CWD.  So if CWD is "C:\Program files\relax" and
DATA_PATH is "..\..\test_suite\shared_data\dispersion\Hansen", then
the absolute path used to find the file will be "C:\Program
files\relax\..\..\test_suite\shared_data\dispersion\Hansen".

Now, the '..' directory has a special meaning - it is the parent
directory.  This is the same on Windows, Linux and Mac.  It is present
in the absolute path twice.  So the absolute path says to first walk
into the "Program files" directory ("C:\Program files"), then into the
"relax" directory ("C:\Program files\relax"), then back up into the
parent directory (which is "C:\Program files"), and once more back up
into the parent directory.  So you will now be at "C:\".  Therefore
the absolute path collapses to
"C:\test_suite\shared_data\dispersion\Hansen", which is a directory
that most like does not exist on your system.

So to get the script to run, you need to take all of this into account
and change DATA_PATH to be relative to the directory the script is in,
or change DATA_PATH to be the absolute path.  I hope this explains the
issue.

Regards,

Edward




On 23 April 2014 11:43, anonymous <NO-REPLY.INVALID-ADDRESS@xxxxxxx>
wrote:

URL:
  <http://gna.org/bugs/?21959>

                 Summary: cpmg_analysis
                 Project: relax
            Submitted by: None
            Submitted on: Wed 23 Apr 2014 09:43:15 AM UTC
                Category: relax sample scripts
Specific analysis category: None
                Priority: 5 - Normal
                Severity: 3 - Normal
                  Status: None
             Assigned to: None
         Originator Name:
        Originator Email: mengjun.xue@xxxxxxxxxxxxxxxxxxxx
             Open/Closed: Open
                 Release: 3.1.7
         Discussion Lock: Any
        Operating System: 32-bit MS Windows

    _______________________________________________________

Details:

Dear Edward and Troels,

Thank you so much for your response. I have tried the script again as you
suggested, but it does not work on my computer, I have attached the log
file.

log_cpmg_analysis_04222014: I set the DATA_PATH =
'..\..\test_suite\shared_data\dispersion\Hansen' in cpmg_analysis.py,  I
copy
the cpmg_analysis.py to the base relax directory, and then run the
cpmg_analysis.py under cmd,C:\program files\relax-3.1.7\relax
cpmg_analysis.py

log_cpmg_analysis_04232014a: I set the DATA_PATH =
'..\\..\\test_suite\\shared_data\\dispersion\\Hansen' in
cpmg_analysis.py,  I
copy the cpmg_analysis.py to the base relax directory, and then run the
cpmg_analysis.py under cmd, C:\program files\relax-3.1.7\relax
cpmg_analysis.py

log_cpmg_analysis_04232014b: I set the DATA_PATH =
'..\..\test_suite\shared_data\dispersion\Hansen' in cpmg_analysis.py, and
run
the cpmg_analysis.py under cmd, C:\program files\relax-3.1.7\relax
sample_scripts\relax_disp\cpmg_analysis.py

Thank you.

Best regards,

Mengjun


Hi,

There's no need to separate them now.  I've fixed both in relax.  For
the error you see now, if I run:

$ ./relax sample_scripts/relax_disp/cpmg_analysis.py

from the base relax directory, then it will find the data in the test
suite directories and perform the test analysis.  Also in the Windows
PowerShell:
.\relax sample_scripts\relax_disp\cpmg_analysis.py
Both work for me.  But Troels' response
(http://thread.gmane.org/gmane.science.nmr.relax.devel/5296/focus=5326)
is exactly correct.  The '\t' is the Python tab character, so the
missing '\' will really cause problems.  Python gets around such
problems by using the os.sep and os.pardir variables, as I have used
in the updated scripts

(http://svn.gna.org/viewcvs/*checkout*/relax/trunk/sample_scripts/relax_disp/cpmg_analysis.py?content-type=text%2Fplain).

Regards,

Edward


Hi Mengjun.

There is missing a \
.\\..\test_suite

should be
.\\..\\test_suite

2014-04-23 10:23 GMT+02:00 <mengjun.xue@xxxxxxxxxxxxxxxxxxxx>:
Hi Edward,

Thank you very much for your suggestions. Should I separate the the
questions
about test suite and cmpg_analysis.py and resubmit them ? For the
cpmy_analysis.py, I have change it to
'..\..\test_suite\shared_data\dispersion\Hansen' as your suggestion, and
try
to run the script again, but there are following relaxerror,

relax> spectrum.read_intensities(file='500_MHz\\reference.in_sparky',
dir='..\\..\test_suite\\shared_data\\dispersion\\Hansen',
spectrum_id='500_reference.in', dim=1, int_method='height', int_col=None,
spin_id_col=None, mol_name_col=None, res_num_col=None, res_name_col=None,
spin_num_col=None, spin_name_col=None, sep=None, spin_id=None,
ncproc=None)
RelaxError: The sequence data does not exist.

Thank you.

Best regards,

Mengjun




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 23 Apr 2014 09:43:15 AM UTC  Name: log_cpmg_analyis_04232014
Size:
11kB   By: None

<http://gna.org/bugs/download.php?file_id=20565>
-------------------------------------------------------
Date: Wed 23 Apr 2014 09:43:15 AM UTC  Name: log_cpmg_analysis_04232014a
Size: 11kB   By: None

<http://gna.org/bugs/download.php?file_id=20566>
-------------------------------------------------------
Date: Wed 23 Apr 2014 09:43:15 AM UTC  Name: log_cpmg_analysis_04232014b
Size: 11kB   By: None

<http://gna.org/bugs/download.php?file_id=20567>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21959>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

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









Related Messages


Powered by MHonArc, Updated Wed Apr 23 15:20:17 2014