Difference between revisions of "Deernet.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Created page)
 
Line 1: Line 1:
 
{{DISPLAYTITLE:deernet.m}}
 
{{DISPLAYTITLE:deernet.m}}
−
Extracts a distance distribution from primary DEER data using a supplied ensemble of trained neural networks. The experimental DEER trace is first reshaped to match the data expected by the neural networks. This involves normalising the trace to decay from a maximum of 1 to 0, between t=0 and t=t<sub>max</sub>; and then resampling so that the DEER trace is discretised to a grid matching the dimensions defined by the network input layer (see: [[deer_resample.m]]).
+
Use pre-trained neural networks to extract distance distributions from DEER data. See our paper (https://dx.doi.org/10.1126/sciadv.aat5218) for further details.
−
 
 
−
The DEER trace is then presented to each network in the supplied ensemble to obtain the individual responses. The ensemble output is found as the mean response for each point in the distribution; and 95% confidence bounds are computed using the standard deviation of the individual responses. A detailed description of the use of the ensemble responses as an uncertainty estimate is provided in Section 2.6 of our paper (https://dx.doi.org/10.1126/sciadv.aat5218).
 
−
 
 
  
 
==Syntax==
 
==Syntax==
−
 
−
    deernet(deer_trace,time_axis,net_dir)
 
  
 
     [dist_axis,outcomes]=deernet(deer_trace,time_axis,net_dir)
 
     [dist_axis,outcomes]=deernet(deer_trace,time_axis,net_dir)
Line 13: Line 8:
 
==Arguments==
 
==Arguments==
  
−
    deer_trace   - the real experimental DEER trace, as a column  
+
    deer_trace - experimental DEER trace, a column vector
−
    vector.
 
 
   
 
   
−
    time_axis     - experimental time axis, a column vector in  
+
    time_axis - experimental time axis, a column vector in  
−
    microseconds, must start at zero and have
+
                microseconds, must start at zero and have
−
    a uniform time step.
+
                a uniform time step
 
   
 
   
−
    net_dir       - directory containing a curated network ensemble,
+
    net_dir   - directory containing the network ensemble
−
    as multiple *.mat files and the supporting files.
+
                as *.m files generated by [[train_one_net.m]]
−
    (see: [[Neural network module#Netset folder structure|Netset folder structure]])
+
                and the corresponding netset_params.m and
 +
                good_nets.mat files.
  
 
==Outputs==
 
==Outputs==
−
If no output is requested then the function produces a plot as in the example below. The function may also be called with the following output arguments specified:
 
  
−
    dist_axis     - the distance axis, as a column vector in
+
    dist_axis - distance axis, a column vector (Angstrom)
−
    Angstroms.
 
 
   
 
   
−
    outcomes     - output distance distributions, a horizontal
+
    outcomes   - distance distributions, a horizontal array
−
    array of column vectors. Where each column is the
+
                of column vectors. The number of column
−
    response of a single network from the ensemble.
+
                vectors is equal to the number of networks
 +
                in the ensemble.
  
−
If the outputs are requested then in-built plotting is suppressed.
+
If no output parameters are specified, the function produces a plot.
 
       
 
       
 
==Examples==
 
==Examples==

Revision as of 15:42, 22 August 2018

Use pre-trained neural networks to extract distance distributions from DEER data. See our paper (https://dx.doi.org/10.1126/sciadv.aat5218) for further details.

Syntax

    [dist_axis,outcomes]=deernet(deer_trace,time_axis,net_dir)

Arguments

   deer_trace - experimental DEER trace, a column vector

   time_axis  - experimental time axis, a column vector in 
                microseconds, must start at zero and have
                a uniform time step

   net_dir    - directory containing the network ensemble
                as *.m files generated by train_one_net.m
                and the corresponding netset_params.m and 
                good_nets.mat files.

Outputs

   dist_axis  - distance axis, a column vector (Angstrom)

   outcomes   - distance distributions, a horizontal array
                of column vectors. The number of column
                vectors is equal to the number of networks
                in the ensemble.

If no output parameters are specified, the function produces a plot.

Examples

The example below shows the use of DEERNet to extract a distance distribution for Sample V (as described in our paper on the subject). This example may be run from within examples/deernet/. First the network ensemble optimized for processing any width of distribution is selected:

    % Select the network ensemble to use in analysis
    netset_location='net_set_any_peaks';

The experimental data is loaded, and the time axis is converted to microseconds:

    % Load experimental data
    expt_data=load('sample_set_paper/sample_V_DEERNet_input.dat','-ASCII');
    deer_trace=expt_data(:,2);
    time_axis=expt_data(:,1)*1e-6;

The data is then presented to the selected network ensemble:

    % Run deernet analysis
    deernet(deer_trace,time_axis,netset_location);

With no output arguments requested in the call to DEERNet, the following plot is produced.

Deernet sampleV.png


Further examples are available under examples/deernet/

  • example_set_paper.m - The six examples used in the paper on DEERNet.
  • example_set_deeran.m - Selection of the examples included with the DeerAnalysis package.
  • example_set_exchange.m - Examples of DEER traces in the presence of significant exchange interaction. Data provided by Sabine Richert et al., from the supplementary information of their paper available here.

Notes

Data pre-processing

Deernet preprocess.png

The provided neural networks are trained using libraries of simulated DEER traces uniformly scaled to decay from the maximum at time zero. This means that experimental data may need to be shifted accordingly before presenting to the network, demonstrated in the figure above.

This is the only pre-processing required by DEERNet; scaling and resampling of the data are performed internally and the networks have been trained to compensate for background contributions and instrumental noise.

(This processing is performed within the elexsys2deernet.m function for standard Bruker datasets)

See also

Functions used

deer_resample.m, netset_params.m, process_using.m

Other related functions

deer_lib_gen.m, netset_curate.m, train_one_net.m


Version 2.2, authors: Ilya Kuprov, Steve Worswick, Gunnar Jeschke