bugrelax - Bugs: bug #20873, Custom Peak intensity reading...

 
 
Show feedback again

bug #20873: Custom Peak intensity reading cannot read a list of spectrum_id

Submitted by:  Troels E. Linnet <tlinnet>
Submitted on:  Thu 06 Jun 2013 02:58:58 PM UTC  
 
Category: relax's source codeSpecific analysis category: None
Priority: 5 - NormalSeverity: 3 - Normal
Status: FixedAssigned to: Edward d Auvergne <bugman>
Originator Name: Open/Closed: Closed
Release: Repository: trunkOperating System: All systems

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 10 Jun 2013 12:39:49 PM UTC, comment #13:

Comment #12 is actually a different bug affecting only the GUI. Could you please create a new bug report for this issue? Thank you. You could use links to the files attached here in the new report, for example https://gna.org/support/download.php?file_id=18067, rather than attaching them again.

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Mon 10 Jun 2013 11:52:38 AM UTC, comment #12:

The latest change made the importing possible of several intensity columns, from the generic file.

But only to make the following GUI steps not working.
After loading intensities, the GUI continues with:
1) Spectrometer_frequency_setup
2) Relaxation_delay_time_setting
3) CPMG_frequency_setting

These GUI'a are now not working, since they by default use the spectrum name which was least imported.
And for a list of names, it then make a full string name:
spectrum_id=['0_2', '1_0'] -> spectrometer.frequency(id="['0_2', '1_0']"

One would be able to SKIP: 1) Spectrometer_frequency_setup and 2) Relaxation_delay_time_setting. But it is not possible to skip 3) CPMG_frequency_setting, and so no import will be possible.

It is further not possible to set time=None in CPMG_frequency_setting. "None" is marking the pulse scheme without 180 refocus pulse, and is used as a reference for intensity proportionality.

------
relax> relax_disp.cpmg_frq(spectrum_id='3_0', cpmg_frq=u'None')
File "/sbinlab2/software/NMR-relax/relax_disp/specific_analyses/relax_disp/disp_data.py", line 152, in cpmg_frq
cdp.cpmg_frqs[spectrum_id] = float(cpmg_frq)
ValueError: could not convert string to float: None
------

Screenshots and log errors are provided.

I suggest that step 1+2+3 is skipped during importing of intensity columns. A following call to step 1+2+3, it should be possible to assign and propagate the settings to all loaded intensity columns, since they would highly likely be the same.

(file #18067, file #18068, file #18069, file #18070)

Troels E. Linnet <tlinnet>
Project Member
Fri 07 Jun 2013 01:49:25 PM UTC, comment #11:

This time hopefully this bug has been fixed!

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Fri 07 Jun 2013 01:48:57 PM UTC, SVN revision 19948:

Merged revisions 19947 via svnmerge from
svn+ssh://bugman@svn.gna.org/svn/relax/trunk

........
r19947 | bugman | 2013-06-07 15:46:37 +0200 (Fri, 07 Jun 2013) | 9 lines

Bug fix for the Sequence GUI input element.

This complete the removal of bug #20873 (https://gna.org/bugs/?20873).

The problem was that the gui_to_str() function was not failing to convert the string into a string
list, so the list was deemed as a single string. Now the first character of '[' or '(' for lists or
tuples are now searched for instead of relying on the conversion to trigger an error.
........

(Browse SVN revision 19948)

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Fri 07 Jun 2013 01:46:37 PM UTC, SVN revision 19947:

Bug fix for the Sequence GUI input element.

This complete the removal of bug #20873 (https://gna.org/bugs/?20873).

The problem was that the gui_to_str() function was not failing to convert the string into a string
list, so the list was deemed as a single string. Now the first character of '[' or '(' for lists or
tuples are now searched for instead of relying on the conversion to trigger an error.

(Browse SVN revision 19947)

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Fri 07 Jun 2013 01:33:40 PM UTC, comment #8:

I can confirm that the GUI part is still problematic.

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Fri 07 Jun 2013 01:31:19 PM UTC, comment #7:

If you use the tab: Edit values, it at least work for the intensity columns. But not for spectrum ID

Troels E. Linnet <tlinnet>
Project Member
Fri 07 Jun 2013 01:27:42 PM UTC, comment #6:

The bug still persist in the GUI:

The GUI creates this:
spectrum.read_intensities(file='/sbinlab2/tlinnet/Desktop/test.seq', dir=None, spectrum_id="'2','0'", heteronuc='N', proton='HN', int_method='height', int_col=(6, 7), spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, sep=None, spin_id=None, ncproc=None)

Both the spectrum_id and int_col is not formatted correctly.
It should be this:
spectrum.read_intensities(file='/sbinlab2/tlinnet/Desktop/test.seq', dir=None, spectrum_id=['2', '0'], heteronuc='N', proton='HN', int_method='height', int_col=[6, 7], spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, sep=None, spin_id=None, ncproc=None)

This will also not work:
spectrum.read_intensities(file='/sbinlab2/tlinnet/Desktop/test.seq', dir=None, spectrum_id=['2', '0'], heteronuc='N', proton='HN', int_method='height', int_col=(6, 7), spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, sep=None, spin_id=None, ncproc=None)


The intensity column argument '(6, 7)' must be either None, an integer, or a list of integers

Troels E. Linnet <tlinnet>
Project Member
Thu 06 Jun 2013 06:41:16 PM UTC, SVN revision 19921:

Merged revisions 19920 via svnmerge from
svn+ssh://bugman@svn.gna.org/svn/relax/trunk

........
r19920 | bugman | 2013-06-06 20:41:01 +0200 (Thu, 06 Jun 2013) | 9 lines

Fix for bug #20873 (http://gna.org/bugs/?20873).

This was reported by Troels E. Linnet (http://gna.org/users/tlinnet).

The ability to load multiple peak intensities from a single generic formatted file has been
correctly implemented. This involves added checks to make sure that the user supplies reasonable
arguments and to then loop over the intensity column argument.
........

(Browse SVN revision 19921)

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Thu 06 Jun 2013 06:41:02 PM UTC, SVN revision 19920:

Fix for bug #20873 (http://gna.org/bugs/?20873).

This was reported by Troels E. Linnet (http://gna.org/users/tlinnet).

The ability to load multiple peak intensities from a single generic formatted file has been
correctly implemented. This involves added checks to make sure that the user supplies reasonable
arguments and to then loop over the intensity column argument.

(Browse SVN revision 19920)

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Thu 06 Jun 2013 06:12:31 PM UTC, SVN revision 19913:

Merged revisions 19912 via svnmerge from
svn+ssh://bugman@svn.gna.org/svn/relax/trunk

........
r19912 | bugman | 2013-06-06 20:11:56 +0200 (Thu, 06 Jun 2013) | 8 lines

Created the Peak_lists.test_bug_20873_peak_lists system test to catch bug #20873.

This was reported by Troels E. Linnet (http://gna.org/users/tlinnet) at https://gna.org/bugs/?20873.

The test has been created by copying the user function calls from the original bug report and
slightly modifying them to suite a 'relax_fit' analysis type.
........

(Browse SVN revision 19913)

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Thu 06 Jun 2013 06:11:57 PM UTC, SVN revision 19912:

Created the Peak_lists.test_bug_20873_peak_lists system test to catch bug #20873.

This was reported by Troels E. Linnet (http://gna.org/users/tlinnet) at https://gna.org/bugs/?20873.

The test has been created by copying the user function calls from the original bug report and
slightly modifying them to suite a 'relax_fit' analysis type.

(Browse SVN revision 19912)

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Thu 06 Jun 2013 03:42:37 PM UTC, comment #1:

Changing the operating system to all systems as it is clear from the bug that this is operating system independent. I can also confirm that the bug exists. For more discussions, see the bug thread at:

http://thread.gmane.org/gmane.science.nmr.relax.devel/3903

Edward d Auvergne <bugman>
Project AdministratorIn charge of this item.
Thu 06 Jun 2013 02:58:58 PM UTC, original submission:

See: http://article.gmane.org/gmane.science.nmr.relax.user/1452
----------
Using a Generic intensity file.
The input of the spectrum id is converted to a string, and not a list or tuble.

spectrum_id='(2,6)'

is translated to a string.
This should be corrected, to do similar as the intensity columns:
int_col=(6, 7)

----------------------------------
To reproduce error
----------------------------------
Start new analysis
Relaxation dispersion analysis
Relaxation dispersion experiment type selection
CPMG, fixed time
Data pipe set up
The starting data pipe for the analysis = origin - relax_disp
The data pipe bundle = relax_disp

Spin editor
Click: Spin editor
Click: Load spins

Click: From a file containing sequence data
The file name = test.seq
The spin ID string = Leave empty
Free format
Molecule name column (mol_name_col) = 1
Residue number column (res_num_col) = 2
Residue name column (res_name_col) = 3
Spin number column (spin_num_col) = 4
Spin name column (spin_name_col) = 5

Add spectra
Click "Add"

The file name = test.seq
The Spectrum ID string: 2,0
The Intensity column: 6,7
rest is default

Error:
No corresponding data could be found within the file.

ERROR:
relax> spectrum.read_intensities(file='/sbinlab2/tlinnet/Desktop/test.seq', dir=None, spectrum_id='2,0', heteronuc='N', proton='HN', int_method='height', int_col=(6, 7), spin_id_col=None, mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, sep=None, spin_id=None, ncproc=None)
Opening the file '/sbinlab2/tlinnet/Desktop/test.seq' for reading.
Generic formatted data file.
.....
RelaxWarning: The sequence data in the line ['protein', '75', 'L', '75', 'N', '3.578841e+06', '6.352595e+06'] is invalid, the data is missing.
RelaxError: No corresponding data could be found within the file.

In prompt:
pipe.create(pipe_name='origin rx', pipe_type='relax_disp', bundle='rx')
relax_disp.exp_type(exp_type='cpmg fixed')

sequence.read(file='/sbinlab2/tlinnet/Desktop/test.seq',
dir=None, spin_id_col=None, mol_name_col=1, res_num_col=2,
res_name_col=3, spin_num_col=4, spin_name_col=5, sep=None,
spin_id=None)

spectrum.read_intensities(file='/sbinlab2/tlinnet/Desktop/test.seq',
dir=None, spectrum_id=(2,0), heteronuc='N', proton='HN',
int_method='height', int_col=(6, 7), spin_id_col=None, mol_name_col=1,
res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5,
sep=None, spin_id=None, ncproc=None)

File "<input>", line 3, in <module>
File "/sbinlab2/software/NMR-relax/relax_disp/prompt/uf_objects.py",
line 200, in _call_
lib.arg_check.is_str(value, desc_short, can_be_none=can_be_none)
File "/sbinlab2/software/NMR-relax/relax_disp/lib/arg_check.py",
line 862, in is_str
raise RelaxStrError(name, arg)
RelaxStrError: [31mRelaxError: The spectrum ID string argument '(2,0)' must be a string. [0m

Troels E. Linnet <tlinnet>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bugman (Posted a comment)
  • -unavailable- added by tlinnet (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 16 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Jun 2013 11:53:07 AM UTCtlinnetAttached File-=>Added Screenshot-Peak_intensity_loading_wizard_Spectrometer_frequency_setup.png, #18071
      Attached File-=>Added Screenshot-Peak_intensity_loading_wizard_Spectrometer_frequency_setup.log, #18072
    Mon 10 Jun 2013 11:52:38 AM UTCtlinnetAttached File-=>Added Screenshot-Peak_intensity_loading_wizard_CPMG_frequency_setting.png, #18067
      Attached File-=>Added Screenshot-Peak_intensity_loading_wizard_Relaxation_delay_time_setting.png, #18068
      Attached File-=>Added Screenshot-Peak_intensity_loading_wizard_CPMG_frequency_setting.log, #18069
      Attached File-=>Added Screenshot-Peak_intensity_loading_wizard_Relaxation_delay_time_setting.log, #18070
    Fri 07 Jun 2013 01:49:25 PM UTCbugmanStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 07 Jun 2013 01:33:40 PM UTCbugmanStatusFixed=>Confirmed
      Open/ClosedClosed=>Open
    Thu 06 Jun 2013 10:00:05 PM UTCbugmanStatusConfirmed=>Fixed
      Assigned toNone=>bugman
      Open/ClosedOpen=>Closed
    Thu 06 Jun 2013 03:42:37 PM UTCbugmanStatusNone=>Confirmed
      Operating SystemGNU/Linux=>All systems
    Thu 06 Jun 2013 02:58:58 PM UTCtlinnetAttached File-=>Added test.seq, #18054
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup