Skip to main content

A simple gui based application to process and analyse TRACT data from NMR spectroscopy.

Project description

pyTRACTnmr

pyTRACTnmr is a graphical user interface (GUI) application designed for the processing and analysis of TRACT (TROSY for Rotational Correlation Times) experiments in NMR spectroscopy. It provides a streamlined workflow to go from raw Bruker data to calculated rotational correlation times ($\tau_c$) with robust error estimation. All calculations are based on TRACT revisited: an algebraic solution for determining overall rotational correlation times from cross-correlated relaxation rates DOI:10.1007/s10858-021-00379-5.

Note: Currently this only supports data collected with Bruker spectrometers using pulseprogram tractf3gpphwg.

Features

  • Bruker Data Import: Directly load Bruker experiment directories.
  • Interactive Processing:
    • Phase correction (0th and 1st order).
    • Apodization (Sine Bell, Exponential) and Zero Filling.
    • Baseline correction with manual node picking.
  • Relaxation Analysis:
    • Automatic splitting of Pseudo-2D experiments into $\alpha$ (Anti-TROSY) and $\beta$ (TROSY) states.
    • Exponential decay fitting to determine relaxation rates ($R_\alpha$, $R_\beta$).
    • Calculation of $\tau_c$ with error estimation using bootstrapping.
  • Sliding Window Analysis: Perform $\tau_c$ calculation across the spectral width to identify domain dynamics.
  • Visualization: Interactive Matplotlib plots for spectra, decay fits, and sliding window results embedded in a Qt interface.
  • Export: Save results to CSV and generate Python scripts for publication-quality plotting.

Installation

Prerequisites

  • Python 3.14 or higher recommended (Though it is not tested it should run with earlier version of Python 3).
  • uv (optional, but recommended for building).

Installation

Quick Start with uv

The fastest way to try pyTRACTnmr without installation is:

uvx pyTRACTnmr

Using pip

pip install pyTRACTnmr

From Source

  1. Clone the repository:

    git clone https://github.com/debadutta-patra/pyTRACTnmr.git
    cd pyTRACTnmr
    
  2. Install the package:

    Using uv (fastest):

    uv pip install .
    

    Using standard pip:

    pip install .
    

Usage

Launching the App

After installation, you can start the application from the terminal:

pytractnmr

Or run it as a python module:

python -m pyTRACTnmr.main

Analysis Workflow

  1. Load Data: Click "Load Bruker Directory" and select your experiment folder.
  2. Process:
    • Use the Processing tab to adjust phase correction sliders.
    • Drag the green selection box on the top spectrum plot to define the integration region (Start/End ppm).
    • Select nodes for polynomial baseline correction using the Pick Nodes button.
  3. Fit:
    • Switch to the Fitting tab.
    • Input experimental parameters (Field Strength, CSA, etc.).
    • Set the number of Bootstraps (e.g., 1000).
    • Click "Calculate Tau_c".
    • (Optional) Check the sliding window analysis to calculate $\tau_c$ across the spectral width.
  4. Export:
    • Right-click the results table to Export Table to CSV.
    • Click the export options in Fitting tab to generate a CSV file and python script for publication-quality plotting.

Dependencies

  • PySide6
  • numpy
  • scipy
  • matplotlib
  • nmrglue

License

This project is licensed under the GNU General Public License v3.0 License - see the LICENSE file for details.

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

pytractnmr-1.0.0.tar.gz (69.1 kB view details)

Uploaded Source

Built Distribution

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

pytractnmr-1.0.0-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file pytractnmr-1.0.0.tar.gz.

File metadata

  • Download URL: pytractnmr-1.0.0.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pytractnmr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fcaeed3f8aabc11d88299a387d220f25910f6e0e3416cc27b7a3174a74c8c94d
MD5 ba5b10655ec64294aa49ef238b457c51
BLAKE2b-256 69f2b2da36b9092668b749e02e448f0be9e2d7068d3c92370fe2e293584a255f

See more details on using hashes here.

File details

Details for the file pytractnmr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pytractnmr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pytractnmr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 400d42217f0b73ec2bb66a349ae68626aeefcdcd63c466a5df2c0924ac38cb65
MD5 8ac06eed0fde109f655a575492c2c690
BLAKE2b-256 9d892f5c20d52faad9c349e2eda0fac3c615c48c016e90469fcfc23c8efe7329

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