Skip to main content

The Lingress project is an initiative aimed at developing a streamlined pipeline for the analysis of Nuclear Magnetic Resonance (NMR) datasets, utilizing a univariate linear regression model. This package encompasses the execution of linear regression analysis via the Ordinary Least Squares (OLS) method and provides visual interpretations of the resultant data. Notably, it includes the p-values of all NMR peaks in its analytical scope.

Functionally, this program strives to fit a model of metabolic profiles through the application of linear regression. Its design and capabilities present a robust tool for in-depth and nuanced data analysis in the realm of metabolic studies.

How to install

pip install lingress

UI Peak Picking

#Example data
import numpy as np
from lingress import pickie_peak
import pandas as pd


df = pd.read_csv("https://raw.githubusercontent.com/aeiwz/example_data/main/dataset/Example_NMR_data.csv")
spectra = df.iloc[:,1:]
ppm = spectra.columns.astype(float).to_list()


#defind plot data and run UI
pickie_peak(spectra=spectra, ppm=ppm).run_ui()
img1

img1

Linear Regression model

import pandas as pd
from lingress import lin_regression


df = pd.read_csv("https://raw.githubusercontent.com/aeiwz/example_data/main/dataset/Example_NMR_data.csv")
X = df.iloc[:,1:]
ppm = spectra.columns.astype(float).to_list()
y = df['Group']


mod = lin_regression(x=X, target=y, label=y, features_name=ppm, adj_method='fdr_bh')
mod.create_dataset()
mod.fit_model()
mod.spec_uniplot()
spec uniplot

spec uniplot

mod.volcano_plot()
volcano

volcano

mod.resampling(n_jobs=-1, n_boots=100, adj_method='fdr_bh')
[Parallel(n_jobs=-1)]: Using backend LokyBackend with 8 concurrent workers.
[Parallel(n_jobs=-1)]: Done   6 tasks      | elapsed:    3.7s
[Parallel(n_jobs=-1)]: Done  60 tasks      | elapsed:    6.7s
[Parallel(n_jobs=-1)]: Done 150 tasks      | elapsed:   11.2s
[Parallel(n_jobs=-1)]: Done 276 tasks      | elapsed:   17.8s
...
[Parallel(n_jobs=-1)]: Done 6486 tasks      | elapsed:  5.6min
[Parallel(n_jobs=-1)]: Done 7188 tasks      | elapsed:  6.1min
[Parallel(n_jobs=-1)]: Done 7211 out of 7211 | elapsed:  6.1min finished

Metadata

Release files for lingress 3.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lingress 3.0.8
File Size Uploaded Provenance
lingress-3.0.8.tar.gz 17.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lingress 3.0.8
File Interpreter ABI Platform
lingress-3.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 36.7 kB

Release files / lingress-3.0.8.tar.gz

Download URL lingress-3.0.8.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
25ad5b1a02d37dbfc312763c4bf7623d0d3ab0e6b2d792c2ceb7bc7ceefd8381
BLAKE2b-256 checksum
How to use checksums
029c1cb45fd61bb4d1d40297da7e3f204f8fa59a4513b6324f650fa2d435fa82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2025.

Transparency log

Release files / lingress-3.0.8-py3-none-any.whl

Download URL lingress-3.0.8-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3af9228c5415c28828a04cb3a574f8b12e0e12f054fddd6b09021abc7626a4f8
BLAKE2b-256 checksum
How to use checksums
4a8eaef1727aba04237cd2c88c3895f24577be0921478e09e0b62f614aa21348
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2025.

Transparency log

Security for lingress 3.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lingress-3.0.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page