Skip to content

Deep Neural Networks for Analysing NMR time domain data

License

Notifications You must be signed in to change notification settings

gogulan-k/FID-Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

71 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

FID-Net

Deep Neural Networks for Analysing NMR time domain data. See:

Table of Contents

Quick Start

This is the short version of this README. For more details, see more detailed explanations below.

git clone https://github.com/gogulan-k/FID-Net.git
cd FID-Net
# Following two command only if you don't have NMRPipe installed:
chmod +x install_nmrpipe.sh
install_nmrpipe.sh
mamba env update -f environment.yml
mamba activate fidnet
fidnet run-examples

Installation

Conda/Mamba environment

First, clone the repository:

git clone https://github.com/gogulan-k/FID-Net.git

The easiest way get a working environment with all packages that FID-Net needs, use conda or mamba and the provided environment.yml file:

cd FID-Net
mamba env update -f environment.yml

and activate the environment:

mamba activate fidnet

Installing the environment also installs the "fidnet" package, making the fidnet command line tool available (see below).

Weights of the Neural Networks

The weights of the neural networks are not included in this python package, but will be downloaded on the fly when needed.

If you want to manually trigger downloading the weights for all different models at once, type:

fidnet download-weights

The weights are downloaded by default to the gitignored directory:

<REPOSITORY ROOT>/data/weights

You can change settings like these by adding a .env file or setting environment variables specifying the FIDNET_DATA_DIR or FIDNET_WEIGHTS_DIR:

# .env
FIDNET_WEIGHTS_DIR=/path/to/directory/with/weights.hd5

To take a look at all such settings type:

fidnet settings

Verify whether things are working on example data

If you have a working environment (and NMRPipe installed, if not see next section), you can test whether things are working by running all examples at once:

fidnet run-examples

This will download example data, run all the different FID-Net functions (except the 3D HNCA decoupler, which takes a lot longer to run). If you just want to download the example data, without doing the processing by the models:

fidnet download-example-data

NMRPipe

NMRPipe can not be installed using conda. If you don't have it installed yet, you can use the provided script to install it.

chmod +x install_nmrpipe.sh
install_nmrpipe.sh

NMRPipe gives some instructions about how to edit your .cshrc. It will look something like this:

 if (-e <REPO_DIR>/bin/NMRPipe/com/nmrInit.linux212_64.com) then
    source <REPO_DIR>/bin/NMRPipe/com/nmrInit.linux212_64.com
 endif

Follow those instructions, so that the NMRPipe command can be found.

Usage

Please refer to the --help in the command line tool. Each individual command has its own help, explaining what the input arguments are.

(fidnet) โžœ  ~ fidnet --help

 Usage: fidnet [OPTIONS] COMMAND [ARGS]...

Deep Neural Networks for Analysing NMR time domain data.

https://github.com/gogulan-k/FID-Net

โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --install-completion          Install completion for the current shell.     โ”‚
โ”‚ --show-completion             Show completion for the current shell, to     โ”‚
โ”‚                               copy it or customize the installation.        โ”‚
โ”‚ --help                        Show this message and exit.                   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Commands โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ca_detect              FID-Net 2D CA detect                                 โ”‚
โ”‚ con_decouple           FID-Net 2D CON decoupling                            โ”‚
โ”‚ ctcp_decouple          FID-Net 2D CTCP decoupling                           โ”‚
โ”‚ methyl                 FID-Net Decouple and improve resolution              โ”‚
โ”‚                        of spectra for uniformly 13C-1H labelled             โ”‚
โ”‚                        proteins.                                            โ”‚
โ”‚ hnca                   FID-Net 3D HNCA decoupling.                          โ”‚
โ”‚ reconstruct            FID-Net 2D Non-Uniform Sampling (NUS) reconstruction โ”‚
โ”‚ run-examples           Run all the examples in one go.                      โ”‚
โ”‚ download-example-data  Download example data to try out the different       โ”‚
โ”‚                        FID-Net functions.                                   โ”‚
โ”‚ download-weights       Download the weights for all FID-Net models. Running โ”‚
โ”‚                        this is not strictly necessary as the weights are    โ”‚
โ”‚                        downloaded on the fly for individual models when     โ”‚
โ”‚                        they are not present yet.                            โ”‚
โ”‚ settings                                                                    โ”‚
โ”‚ version                Show the version of the nucleotides library.         โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

 Thanks!

README's for the individual experiments

FID-Net 2D CA detect

(fidnet) โžœ  ~ fidnet ca_detect --help

 Usage: fidnet ca_detect [OPTIONS]

 FID-Net 2D CA detect

โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *  --infile         PATH  Help text in the original was the same as for         โ”‚
โ”‚                           con_decouple                                          โ”‚
โ”‚                           [default: None]                                       โ”‚
โ”‚                           [required]                                            โ”‚
โ”‚    --outfile        PATH  Path to the output file.                              โ”‚
โ”‚                           [default: fidnet_ca_detect.ft1]                       โ”‚
โ”‚    --help                 Show this message and exit.                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Note: the decoupler can only work with up to 512 complex points in the 13C dimension. Spectra containing more points than this will be truncated at 512 complex points.

An example antiphase, in-phase (AP-IP) spectrum of T4L99A (test.ft1) is provided in the example folder.

Preparing Data

The input to the DNN must be in nmrPipe format. If using a Bruker spectrometer, the raw FID file (ser) must be converted to nmrpipe format using the DMX flag for FID-Net decoupling to perform correctly.

Prior to input into FID-Net, the direct dimension of the spectrum is phased but the imaginary part is not deleted. The spectrum is then transposed, apodized, zero-filled, phased and Fourier transformed in the indirect dimension. For best results excessive zero-filling in the indirect dimension should be avoided. Typically we would just use 'ZF -auto' in nmrPipe. The spectrum should then be transposed before entry into FID-Net.

The input to the DNN must be a 2D in-phase interferogram (i.e. processed in the indirect dimension but not the direct dimension as described above).

The output of the DNN can then be processed (apodized, zero-filled, Fourier transformed and the imaginary part deleted) to give the final result. An example (final_proc.com) is provided in the example folder.

FID-Net 2D CON decoupling

(fidnet) โžœ  ~ fidnet con_decouple --help

 Usage: fidnet con_decouple [OPTIONS]

 FID-Net 2D CON decoupling

โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *  --infile         PATH  Input spectra. This is a 2D in phase CON spectra with โ”‚
โ”‚                           the 13C dimension in the time domain. The 13C         โ”‚
โ”‚                           dimension should be phased but the imaginary part     โ”‚
โ”‚                           retained and should not be apodized, zero-filled or   โ”‚
โ”‚                           Fourier transformed. The 15N dimension should be      โ”‚
โ”‚                           apodized, zero-filled, phased (the imaginary part     โ”‚
โ”‚                           deleted) then Fourier transformed. The order of the   โ”‚
โ”‚                           input dimensions must be 15N, 13C.                    โ”‚
โ”‚                           [default: None]                                       โ”‚
โ”‚                           [required]                                            โ”‚
โ”‚    --outfile        PATH  Path to the output file.                              โ”‚
โ”‚                           [default: fidnet_con_decoupled.ft1]                   โ”‚
โ”‚    --help                 Show this message and exit.                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Note: the 2D CON decoupler can only work with up to 512 complex points in the 13C dimension. Spectra containing more points than this will be truncated at 512 complex points.

An example in-phase spectrum of ubiquitin (test001.ft1) is provided in the example folder.

Preparing Data

The input to the DNN must be in nmrPipe format. If using a Bruker spectrometer, the raw FID file (ser) must be converted to nmrpipe format using the DMX flag for FID-Net decoupling to perform correctly.

Prior to input into FID-Net, the direct dimension of the spectrum is phased but the imaginary part is not deleted. The spectrum is then transposed, apodized, zero-filled, phased and Fourier transformed in the indirect dimension. For best results excessive zero-filling in the indirect dimension should be avoided. Typically we would just use 'ZF -auto' in nmrPipe. The spectrum should then be transposed before entry into FID-Net.

The input to the DNN must be a 2D in-phase interferogram (ie. processed in the indirect dimension but not the direct dimension as described above). If the data is 3D it must be converted to a set of 2D planes using the pipe2xyz utility or similar. An exemplar input is provided in the example folder (test001.ft1).

The output of the DNN can then be processed (apodized, zero-filled, Fourier transformed and the imaginary part deleted) to give the final result. An example (final_proc.com) is provided in the example folder.

FID-Net 2D CTCP decoupling

(fidnet) โžœ  ~ fidnet ctcp_decouple --help

 Usage: fidnet ctcp_decouple [OPTIONS]

 FID-Net 2D CTCP decoupling

โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *  --infile         PATH  Input  spectra. This is a 2D in-phase Ct-Cp spectra   โ”‚
โ”‚                           with the 13Ct dimension in the time domain. The 13Ct  โ”‚
โ”‚                           dimension should be phased but the imaginary part     โ”‚
โ”‚                           retained and should not be apodized, zero-filled or   โ”‚
โ”‚                           Fourier transformed. The 13Cp dimension should be     โ”‚
โ”‚                           apodized, zero-filled, phased (the imaginary part     โ”‚
โ”‚                           deleted) then Fourier transformed. The order of the   โ”‚
โ”‚                           input dimensions must be 13Cp, 13Ct.                  โ”‚
โ”‚                           [default: None]                                       โ”‚
โ”‚                           [required]                                            โ”‚
โ”‚    --outfile        PATH  Path to the output file.                              โ”‚
โ”‚                           [default: fidnet_ctcp_decoupled.ft1]                  โ”‚
โ”‚    --help                 Show this message and exit.                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Note: the 2D 13Ct-13Cp decoupler can only work with up to 512 complex points in the 13C dimension. Spectra containing more points than this will be truncated at 512 complex points.

An example in-phase spectrum of ubiquitin (test001.ft1) is provided in the example folder.

Preparing Data

The input to the DNN must be in nmrPipe format. If using a Bruker spectrometer, the raw FID file (ser) must be converted to nmrpipe format using the DMX flag for FID-Net decoupling to perform correctly.

Prior to input into FID-Net, the direct dimension of the spectrum is phased but the imaginary part is not deleted. The spectrum is then transposed, apodized, zero-filled, phased and Fourier transformed in the indirect dimension. For best results excessive zero-filling in the indirect dimension should be avoided. Typically we would just use 'ZF -auto' in nmrPipe. The spectrum should then be transposed before entry into FID-Net.

The input to the DNN must be a 2D in-phase interferogram (ie. processed in the indirect dimension but not the direct dimension as described above). If the data is 3D it must be converted to a set of 2D planes using the pipe2xyz utility or similar. An exemplar input is provided in the example folder (test001.ft1).

The output of the DNN can then be processed (apodized, zero-filled, Fourier transformed and the imaginary part deleted) to give the final result. An example (final_proc.com) is provided in the example folder.

FID-Net 2D NUS reconstruction

(fidnet) โžœ  ~ fidnet reconstruct --help

 Usage: fidnet reconstruct [OPTIONS]

 FID-Net 2D Non-Uniform Sampling (NUS) reconstruction

โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *  --infile                             PATH     this is the measured 2D        โ”‚
โ”‚                                                  non-uniformly sampled spectra. โ”‚
โ”‚                                                  It should be processed in the  โ”‚
โ”‚                                                  direct dimension, phased and   โ”‚
โ”‚                                                  transposed. The indirect       โ”‚
โ”‚                                                  dimension should not be        โ”‚
โ”‚                                                  processed in any way. The      โ”‚
โ”‚                                                  unsampled points in the        โ”‚
โ”‚                                                  indirect dimension should not  โ”‚
โ”‚                                                  be replaced with zeros (for    โ”‚
โ”‚                                                  example by using the nusExpand โ”‚
โ”‚                                                  tool) this is taken care of by โ”‚
โ”‚                                                  the program itself. The        โ”‚
โ”‚                                                  maximum number of complex      โ”‚
โ”‚                                                  points in the indirect         โ”‚
โ”‚                                                  dimension that can be included โ”‚
โ”‚                                                  in the network is 256.         โ”‚
โ”‚                                                  Thespectrum will be truncated  โ”‚
โ”‚                                                  after this.                    โ”‚
โ”‚                                                  [default: None]                โ”‚
โ”‚                                                  [required]                     โ”‚
โ”‚ *  --sampling-schedule                  PATH     this is the sampling schedule  โ”‚
โ”‚                                                  used. This is simply a list    โ”‚
โ”‚                                                  ofintegers (oneinteger per     โ”‚
โ”‚                                                  line) giving the complex       โ”‚
โ”‚                                                  points that are measured in    โ”‚
โ”‚                                                  the NUS experiment.            โ”‚
โ”‚                                                  [default: None]                โ”‚
โ”‚                                                  [required]                     โ”‚
โ”‚ *  --max-points                         INTEGER  this is the number of complex  โ”‚
โ”‚                                                  points in the final output.    โ”‚
โ”‚                                                  I.e.the sparsity is given by   โ”‚
โ”‚                                                  the number of values in the    โ”‚
โ”‚                                                  samplingschedule divided by    โ”‚
โ”‚                                                  this value.                    โ”‚
โ”‚                                                  [default: None]                โ”‚
โ”‚                                                  [required]                     โ”‚
โ”‚    --outfile                            PATH     name of the output file        โ”‚
โ”‚                                                  [default:                      โ”‚
โ”‚                                                  fidnet_nus_reconstructed.ft1]  โ”‚
โ”‚    --f1180                --no-f1180             f1180 flag (y/n) only          โ”‚
โ”‚                                                  important for matplotlib       โ”‚
โ”‚                                                  output and                     โ”‚
โ”‚                                                  fidnet_reconstructed.ft2       โ”‚
โ”‚                                                  [default: f1180]               โ”‚
โ”‚    --shift                --no-shift             frequency shift flag (y/n)     โ”‚
โ”‚                                                  only important for matplotlib  โ”‚
โ”‚                                                  output and std.ft2             โ”‚
โ”‚                                                  [default: no-shift]            โ”‚
โ”‚    --help                                        Show this message and exit.    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

This code is for reconstructing 2D NUS NMR spectra using the FID-Net architecture. To use the code, the file containing the weights for the trained network must be downloaded.

The output of the network is an nmrPipe file with the indirect dimension reconstructed in the time domain. The indirect dimension can now be processed (apodized, zero-filled, phased and Fourier transformed) to yield the final reconstructed spectrum. The analysis also outputs std.ft2, providing a measure of confidence in the outputs. This is also in nmrPipe format and is pre-processed and Fourier transformed according to default parameters. If these are incorrect a Hilbert transform and inverse Fourier transform can be applied to put this back into the time domain before reprocessing.

There is an example file for HDAC in the example folder, together with the sampling schedule.

3D HNCA Decoupling

(fidnet) โžœ  ~ fidnet hnca --help

 Usage: fidnet hnca [OPTIONS]

 FID-Net 3D HNCA decoupling.

โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *  --infile         PATH  Input  spectra. This is a 3D HNCA orHN(CO)CA spectra  โ”‚
โ”‚                           with the 13C dimension in the time domain.The 15N and โ”‚
โ”‚                           1H dimensions should be phased and Fourier            โ”‚
โ”‚                           transformed.The order of the input dimensions must be โ”‚
โ”‚                           1H,15N, 13C.                                          โ”‚
โ”‚                           [default: None]                                       โ”‚
โ”‚                           [required]                                            โ”‚
โ”‚    --outfile        PATH  out file [default: fidnet_hnca_decoupled.ft2]         โ”‚
โ”‚    --help                 Show this message and exit.                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

This code is for decoupling 3D HNCA and HN(COCA) spectra using the FID-Net architecture. Note: the 3D HNCA decoupler can only work with up to 256 complex points in the 13C dimension. Spectra containing more points than this will be truncated at 256 complex points.

Methyl Decoupling

(fidnet) โžœ  ~ fidnet methyl --help

 Usage: fidnet methyl [OPTIONS]

 FID-Net Decouple and improve resolution of spectra for uniformly 13C-1H labelled
 proteins.

โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *  --infile                 PATH   Input spectra. This is a 2D 13C-1Hspectra    โ”‚
โ”‚                                    (time domain data) fora uniformly labelled   โ”‚
โ”‚                                    13C-1H labelled protein.If using literally   โ”‚
โ”‚                                    'example',an example file is used            โ”‚
โ”‚                                    [default: None]                              โ”‚
โ”‚                                    [required]                                   โ”‚
โ”‚    --outdir                 PATH   folder where resultswill be saved.           โ”‚
โ”‚                                    [default: fidnet_out]                        โ”‚
โ”‚    --outfile                PATH   filename for finalprocessed spectrum.        โ”‚
โ”‚                                    [default: fidnet_methyl_CH.ft2]              โ”‚
โ”‚    --min-1h                 FLOAT  minimum 1H ppm [default: -1.0]               โ”‚
โ”‚    --max-1h                 FLOAT  maximum 1H ppm [default: 2.5]                โ”‚
โ”‚    --p0                     FLOAT  1H phase correction [default: 0.0]           โ”‚
โ”‚    --alt        --no-alt           NMRPipe: dimension is left/right swapped     โ”‚
โ”‚                                    [default: no-alt]                            โ”‚
โ”‚    --neg        --no-neg           NMRPipe: dimension is reversed               โ”‚
โ”‚                                    [default: no-neg]                            โ”‚
โ”‚    --help                          Show this message and exit.                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

This code is for improving the resolution of protein spectra from uniformly 13C-1H proteins. The code requires two DNNs based on FID-Net architecture. The first network removes one 13C-13C scalar coupling and sharpens peaks in the 13C dimension. The second network sharpens peaks in the 1H dimension.

The example folder contains data for uniformly 13C-1H labelled HDAC8.

Development

You can install pre-commit hooks that do some checks before you commit your code:

pip install -e ".[dev]"
pre-commit install