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.
    • 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.11 or higher recommended.
  • uv (optional, but recommended for building).

Installation

Using uv

The fastest way to try pyTRACTnmr without installation is:

uvx pyTRACTnmr

To install:

uv tool install 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., 10000).
    • 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.
    • A PDF report with all generated plots and processing parameters can be exported.

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.2.0.tar.gz (344.6 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.2.0-py3-none-any.whl (299.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytractnmr-1.2.0.tar.gz
  • Upload date:
  • Size: 344.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.2.0.tar.gz
Algorithm Hash digest
SHA256 a93305d1e7a9adc8f540d1005034722b491ca0f1c02ee0524ed5831352edde1e
MD5 6197224270b920ddaf0323face1357b0
BLAKE2b-256 47fa916324a1dfcd022f42b5e3694c55b01c6476e495fede5f700946f2a9ebfb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytractnmr-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 299.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2293dc0827e16aebe90f680bfa57504e3380096d5203764b7ab935aaf36f5f4
MD5 a7a95cc85938c24179fd0e5ba6c1454c
BLAKE2b-256 c211bb248b39aef2c27f5ede13f0c9325a2ed98f0b1f5afd99d19c48e6cc5a7b

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