Skip to main content

simple utility for parsing and working with NMR peak tables, including ROC analysis

Project description

nmrtoolbox

Introduction

This is a simple utility that provides modules for working with NMRPipe peak tables and performing a receiver operator characteristic (ROC) analysis to quantify the quality of the "recovered" peaks relative to a control set of "injected" peaks. The modules in this package are as follows:

  • nmrtoolbox.peak: classes for reading in peak tables (currently supports both synthetically generated and recovered peak tables from NMRPipe)
  • nmrtoolbox.roc: perform receiver operator characteristic (ROC) analysis of a recovered peak table relative to an injected peak table
  • nmrtoolbox.mask: define regions of a spectrum that contain signal or are empty
  • nmrtoolbox.util: various supporting utilities used by other modules

Applications

Example #1 - Formal Workflow

The tools in this package are utilized by the NUScon software package. You can access NUScon on the NMRbox platform (free for academic, government, and non-profit users). Running nuscon -h will provide instructions on how to run the NUScon evaluation workflow, which directly utilizes the tools presented here in the nmrtoolbox package.

Example #2 - Kick the Tires

from nmrtoolbox.roc import roc

# perform ROC analysis and specify filtering criteria for 
# cluster_type and chi2prob
my_roc = roc(
    recovered_table=<file-recovered.tab>,
    injected_table=<file-injected.tab>,
    cluster_type=1,
    chi2prob=.75,
)

# show and plot results
my_roc.print_stats()
my_roc.plot_roc()
my_roc.plot_peaks()
my_roc.plot_outliers()

The roc function supports the following filter criteria:

  • number
  • height
  • abs_height
  • roi_list
  • index
  • cluster_type
  • mask_file
  • chi2prob

Note: Filtering by mask requires the external use of NMRPipe to generate a mask file indicating where the spectrum is empty. This binary data is converted by Connjur Spectrum Translator into a "tabular" format file (i.e. plain text) which is then read in by nmrtoolbox.mask.

Changelog

v8

  • change to MIT license
  • box_radius for mask filtering is multidimensional
  • improved input options for setting carrier frequency
  • axis labels used to verify compatibility of Peak, Mask, ROI, and ROC objects

v7

  • addition of roc module
  • addition of mask module

v6

  • rename package as nmrtoolbox
  • use subclasses to handle NMRPipe peak tables coming from genSimTab or from the peak picker

v5

  • new Axis class for containing metadata from peak table header

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nmrtoolbox-8.4.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nmrtoolbox-8.4-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file nmrtoolbox-8.4.tar.gz.

File metadata

  • Download URL: nmrtoolbox-8.4.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for nmrtoolbox-8.4.tar.gz
Algorithm Hash digest
SHA256 122a45f19f00563a791c42669f28649e1710f95a671d705e6d22c52f416ac132
MD5 ccf9f46441377a06577a0fbb6a5e3eff
BLAKE2b-256 800a8361da6b396609b4113ce366c653e642017818060326888124e69725e063

See more details on using hashes here.

File details

Details for the file nmrtoolbox-8.4-py3-none-any.whl.

File metadata

  • Download URL: nmrtoolbox-8.4-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for nmrtoolbox-8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 500b3b531045e3623e2cea18b76d04077b72bbe152dd02c9067d052719b5f604
MD5 f734c9357f85aaf176534854986bbf64
BLAKE2b-256 24b7b1af84be82e8e860e5467b97469b48a91955dc864123017f5be38569fd39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page