On Tue, 25 Jun 2019 at 16:16, Yulian Gavrilov <[email protected]> wrote:
>
> Dear Edward,
>
> Thank you for your reply!
> I checked my input and my script. Probably I am missing something but 
> unfortunately, I cannot understand the reason for the error.
> If I keep only the volumes in my Sparky input file (and remove the hights) 
> relax does not load any intensities at all.
> Yulian
>
> On Sat, Jun 22, 2019, 09:21 Edward d'Auvergne <[email protected]> wrote:
>>
>> On Thursday, 20 June 2019, Yulian Gavrilov <[email protected]> wrote:
>>>
>>> Dear all,
>>>
>>> Please can you suggest me a working version of noe.py with Sparky input 
>>> with volume based intensities?
>>> The script works for me with hight based intensities but not with volume 
>>> based intensities.
>>> In my case (relax-4.0.3):
>>> - the script loads into relax hight intensities instead of volume 
>>> intensities;
>>> - the script returns this error: RelaxError: This has not yet been 
>>> implemented for the current data pipe.
>>>
>>> Thank you!
>>>
>>> My Sparky input:
>>>
>>>       Assignment         w1         w2       Height       Volume
>>>
>>>        F50N-F50HN    122.783      9.077   5.17E+08   2.58E+09
>>>
>>>        V13N-V13HN    121.553      8.506   7.24E+08   3.20E+09
>>>
>>> ....
>>>
>>>
>>> My noe.py:
>>>
>>> # Create the NOE data pipe.
>>>
>>> pipe.create('NOE', 'noe')
>>>
>>>
>>> # Load the backbone amide 15N spins from a PDB file.
>>>
>>> structure.read_pdb('test.pdb')
>>>
>>> structure.load_spins(spin_id='@N')
>>>
>>> #structure.load_spins(spin_id='@NE1')
>>>
>>>
>>> # Load the reference spectrum and saturated spectrum peak intensities.
>>>
>>> spectrum.read_intensities(file='NOE1_750_hight_vol1.list', 
>>> spectrum_id='ref_ave', int_method='point sum', int_col=4)
>>>
>>> spectrum.read_intensities(file='NOE2_750_hight_vol1.list', 
>>> spectrum_id='sat_ave', int_method='point sum', int_col=4)
>>>
>>> #spectrum.read_intensities(file='NOE1_750_hight', spectrum_id='ref_ave')
>>>
>>> #spectrum.read_intensities(file='NOE2_750_hight', spectrum_id='sat_ave')
>>>
>>>
>>> # Set the spectrum types.
>>>
>>> noe.spectrum_type('ref', 'ref_ave')
>>>
>>> noe.spectrum_type('sat', 'sat_ave')
>>>
>>>
>>> # Set the errors.
>>>
>>> spectrum.baseplane_rmsd(error=2.768E+06, spectrum_id='ref_ave')
>>>
>>> spectrum.baseplane_rmsd(error=8.963E+06, spectrum_id='sat_ave')
>>>
>>>
>>> # Individual residue errors.
>>>
>>> #spectrum.baseplane_rmsd(error=122000, spectrum_id='ref_ave', 
>>> spin_id=":114")
>>>
>>> #spectrum.baseplane_rmsd(error=8500, spectrum_id='sat_ave', spin_id=":114")
>>>
>>>
>>> # Peak intensity error analysis.
>>>
>>> spectrum.integration_points(N=9, spectrum_id='ref_ave')
>>>
>>> spectrum.integration_points(N=9, spectrum_id='sat_ave')
>>>
>>> spectrum.error_analysis()
>>>
>>>
>>> # Deselect unresolved residues.
>>>
>>> #deselect.read(file='unresolved', mol_name_col=1, res_num_col=2, 
>>> res_name_col=3, spin_num_col=4, spin_name_col=5)
>>>
>>>
>>> # Calculate the NOEs.
>>>
>>> minimise.calculate()
>>>
>>>
>>> # Save the NOEs.
>>>
>>> value.write(param='noe', file='noe.out', force=True)
>>>
>>>
>>> # Create grace files.
>>>
>>> grace.write(y_data_type='peak_intensity', file='intensities.agr', 
>>> force=True)
>>>
>>> grace.write(y_data_type='noe', file='noe.agr', force=True)
>>>
>>>
>>> # View the grace files.
>>>
>>> grace.view(file='intensities.agr')
>>>
>>> grace.view(file='noe.agr')
>>>
>>>
>>> # Write the results.
>>>
>>> results.write(file='results', dir=None, force=True)
>>>
>>>
>>> # Save the program state.
>>>
>>> state.save('save', force=True)
>>
>>
>> Hi Yulian,
>>
>> Welcome to the relax mailing lists!   As your question is frequently asked, 
>> I have extensively documented this area of analysis with the different 
>> combinations of peak height vs. volume to  RMSD baseplane vs. replicated 
>> spectra:
>>
>>     https://www.nmr-relax.com/manual/spectrum_error_analysis.html
>>
>> Please have a careful read.  If this doesn't help,  please ask again here.

Hi Yulian,

I'll copy the relevant text from the above link:

"""
Peak volumes with baseplane noise RMSD

The method of error analysis when no spectra have been replicated and
peak volumes are used is highly dependent on the integration method.
Many methods simply sum the number of points within a fixed region,
either a box or oval object. The number of points used, N, must be
specified by another user function in this class. Then the error is
simply given by the sum of variances:

 sigma_vol^2 = sigma_i^2 * N,

where sigma_vol is the standard deviation of the volume, sigma_i is
the standard deviation of a single point assumed to be equal to the
RMSD of the baseplane noise, and N is the total number of points used
in the summation integration method. For a box integration method,
this converts to the Nicholson, Kay, Baldisseri, Arango, Young, Bax,
and Torchia (1992) Biochemistry, 31: 5253-5263 equation:

 sigma_vol = sigma_i * sqrt(n*m),

where n and m are the dimensions of the box. Note that a number of
programs, for example peakint
(http://hugin.ethz.ch/wuthrich/software/xeasy/xeasy_m15.html) does not
use all points within the box. And if the number N can not be
determined, this category of error analysis is not possible.

Also note that non-point summation methods, for example when line
shape fitting is used to determine peak volumes, the equations above
cannot be used. Hence again this category of error analysis cannot be
used. This is the case for one of the three integration methods used
by Sparky (http://www.cgl.ucsf.edu/home/sparky/manual/peaks.html#Integration).
And if fancy techniques are used, for example as Cara does to
deconvolute overlapping peaks
(http://www.cara.ethz.ch/Wiki/Integration), this again makes this
error analysis impossible.
"""

What is the integration method have you used?  You mentioned Sparky, where:

"""
Integration Methods

You can do two types of integration. The preferred method is to fit
peaks to Gaussian or Lorentzian functions and get the volume from the
fit height and linewidths. In cases where this doesn't work you can
sum up the data heights at each point in a box or ellipse surrounding
the peak. You choose the box or ellipse by dragging out the region
with the mouse while in the "integrate" pointer mode. For the fitting
method you can also use the "integrate" pointer mode and drag a region
around the peaks to integrate or you can select the peaks and use the
"peak integrate" command (pi). You set the method of integration using
the integration dialog (it). In rare cases you might want to set the
peak volume by hand. For instance, if you have a doublet peak and one
component is overlapped you could integrate the unoverlapped part and
manually double the volume. You type in the volume value by selecting
the peak and using the ornament properties dialog (ot).
"""

So all Sparky volume measurement methods are incompatible with current
NMR theory for error propagation!  Well, replicated spectra allows for
volume-based error propagation (note that this is the same averaged
error for all peaks).

In summary:  What you would like to do simply cannot be done.  At
least not until someone develops the fundamental theories needed.
Note that this problem, which looks easy, is incredibly difficult to
solve.  Hence why no one has ever come close to solving it.

Regards,

Edward


_______________________________________________
nmr-relax-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nmr-relax-users

Reply via email to