Skip to main content

Metabolomics data analysis with univariate (linear regression) and visualization tools.

Project description

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

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

lingress-3.0.8.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

lingress-3.0.8-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file lingress-3.0.8.tar.gz.

File metadata

  • Download URL: lingress-3.0.8.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lingress-3.0.8.tar.gz
Algorithm Hash digest
SHA256 25ad5b1a02d37dbfc312763c4bf7623d0d3ab0e6b2d792c2ceb7bc7ceefd8381
MD5 1142045ba0158e007c6ac99b2de2d9ad
BLAKE2b-256 029c1cb45fd61bb4d1d40297da7e3f204f8fa59a4513b6324f650fa2d435fa82

See more details on using hashes here.

Provenance

The following attestation bundles were made for lingress-3.0.8.tar.gz:

Publisher: python-publish.yml on aeiwz/lingress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lingress-3.0.8-py3-none-any.whl.

File metadata

  • Download URL: lingress-3.0.8-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lingress-3.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3af9228c5415c28828a04cb3a574f8b12e0e12f054fddd6b09021abc7626a4f8
MD5 e37c8c8e07c952a7b121bfd3cf653f68
BLAKE2b-256 4a8eaef1727aba04237cd2c88c3895f24577be0921478e09e0b62f614aa21348

See more details on using hashes here.

Provenance

The following attestation bundles were made for lingress-3.0.8-py3-none-any.whl:

Publisher: python-publish.yml on aeiwz/lingress

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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