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
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
mod.volcano_plot()
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25ad5b1a02d37dbfc312763c4bf7623d0d3ab0e6b2d792c2ceb7bc7ceefd8381
|
|
| MD5 |
1142045ba0158e007c6ac99b2de2d9ad
|
|
| BLAKE2b-256 |
029c1cb45fd61bb4d1d40297da7e3f204f8fa59a4513b6324f650fa2d435fa82
|
Provenance
The following attestation bundles were made for lingress-3.0.8.tar.gz:
Publisher:
python-publish.yml on aeiwz/lingress
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lingress-3.0.8.tar.gz -
Subject digest:
25ad5b1a02d37dbfc312763c4bf7623d0d3ab0e6b2d792c2ceb7bc7ceefd8381 - Sigstore transparency entry: 190749098
- Sigstore integration time:
-
Permalink:
aeiwz/lingress@22038bfec748712fc9bd42c9103527e79d525bdf -
Branch / Tag:
refs/tags/v3.0.8 - Owner: https://github.com/aeiwz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@22038bfec748712fc9bd42c9103527e79d525bdf -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3af9228c5415c28828a04cb3a574f8b12e0e12f054fddd6b09021abc7626a4f8
|
|
| MD5 |
e37c8c8e07c952a7b121bfd3cf653f68
|
|
| BLAKE2b-256 |
4a8eaef1727aba04237cd2c88c3895f24577be0921478e09e0b62f614aa21348
|
Provenance
The following attestation bundles were made for lingress-3.0.8-py3-none-any.whl:
Publisher:
python-publish.yml on aeiwz/lingress
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lingress-3.0.8-py3-none-any.whl -
Subject digest:
3af9228c5415c28828a04cb3a574f8b12e0e12f054fddd6b09021abc7626a4f8 - Sigstore transparency entry: 190749100
- Sigstore integration time:
-
Permalink:
aeiwz/lingress@22038bfec748712fc9bd42c9103527e79d525bdf -
Branch / Tag:
refs/tags/v3.0.8 - Owner: https://github.com/aeiwz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@22038bfec748712fc9bd42c9103527e79d525bdf -
Trigger Event:
release
-
Statement type: