lingress
========
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**
------------------
.. code:: bash
pip install lingress
**UI Peak Picking**
-------------------
.. code:: python
#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()
.. figure:: ./src/img/UI_peak_picking.png
:alt: img1
img1
**Linear Regression model**
---------------------------
.. code:: python
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()
.. code:: python
mod.spec_uniplot()
.. figure:: ./src/img/spec_uniplot.png
:alt: spec uniplot
spec uniplot
.. code:: python
mod.volcano_plot()
.. figure:: ./src/img/volcano.png
:alt: volcano
volcano
.. code:: python
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
Raw data
{
"_id": null,
"home_page": "https://github.com/aeiwz/lingress.git",
"name": "lingress",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Omics, Chemometrics, Visualization, Data Analysis, Univariate, Linear Regression",
"author": "aeiwz",
"author_email": "theerayut_aeiw_123@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/a9/b0/5e75967bfaa83ff0975efa99a3cd049a01c209a061b1d5de4600103b9ff6/lingress-3.0.7.tar.gz",
"platform": null,
"description": "lingress\n========\n\nThe Lingress project is an initiative aimed at developing a streamlined\npipeline for the analysis of Nuclear Magnetic Resonance (NMR) datasets,\nutilizing a univariate linear regression model. This package encompasses\nthe execution of linear regression analysis via the Ordinary Least\nSquares (OLS) method and provides visual interpretations of the\nresultant data. Notably, it includes the p-values of all NMR peaks in\nits analytical scope.\n\nFunctionally, this program strives to fit a model of metabolic profiles\nthrough the application of linear regression. Its design and\ncapabilities present a robust tool for in-depth and nuanced data\nanalysis in the realm of metabolic studies.\n\n**How to install**\n------------------\n\n.. code:: bash\n\n pip install lingress\n\n**UI Peak Picking**\n-------------------\n\n.. code:: python\n\n #Example data\n import numpy as np\n from lingress import pickie_peak\n import pandas as pd\n\n\n df = pd.read_csv(\"https://raw.githubusercontent.com/aeiwz/example_data/main/dataset/Example_NMR_data.csv\")\n spectra = df.iloc[:,1:]\n ppm = spectra.columns.astype(float).to_list()\n\n\n #defind plot data and run UI\n pickie_peak(spectra=spectra, ppm=ppm).run_ui()\n\n.. figure:: ./src/img/UI_peak_picking.png\n :alt: img1\n\n img1\n\n**Linear Regression model**\n---------------------------\n\n.. code:: python\n\n import pandas as pd\n from lingress import lin_regression\n\n\n df = pd.read_csv(\"https://raw.githubusercontent.com/aeiwz/example_data/main/dataset/Example_NMR_data.csv\")\n X = df.iloc[:,1:]\n ppm = spectra.columns.astype(float).to_list()\n y = df['Group']\n\n\n mod = lin_regression(x=X, target=y, label=y, features_name=ppm, adj_method='fdr_bh')\n mod.create_dataset()\n mod.fit_model()\n\n.. code:: python\n\n mod.spec_uniplot()\n\n.. figure:: ./src/img/spec_uniplot.png\n :alt: spec uniplot\n\n spec uniplot\n\n.. code:: python\n\n mod.volcano_plot()\n\n.. figure:: ./src/img/volcano.png\n :alt: volcano\n\n volcano\n\n.. code:: python\n\n mod.resampling(n_jobs=-1, n_boots=100, adj_method='fdr_bh')\n\n::\n\n [Parallel(n_jobs=-1)]: Using backend LokyBackend with 8 concurrent workers.\n [Parallel(n_jobs=-1)]: Done 6 tasks | elapsed: 3.7s\n [Parallel(n_jobs=-1)]: Done 60 tasks | elapsed: 6.7s\n [Parallel(n_jobs=-1)]: Done 150 tasks | elapsed: 11.2s\n [Parallel(n_jobs=-1)]: Done 276 tasks | elapsed: 17.8s\n ...\n [Parallel(n_jobs=-1)]: Done 6486 tasks | elapsed: 5.6min\n [Parallel(n_jobs=-1)]: Done 7188 tasks | elapsed: 6.1min\n [Parallel(n_jobs=-1)]: Done 7211 out of 7211 | elapsed: 6.1min finished\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Metabolomics data analysis with univariate (linear regression) and visualization tools.",
"version": "3.0.7",
"project_urls": {
"Download": "https://github.com/aeiwz/lingress/archive/refs/tags/v3.0.7.tar.gz",
"Homepage": "https://github.com/aeiwz/lingress.git"
},
"split_keywords": [
"omics",
" chemometrics",
" visualization",
" data analysis",
" univariate",
" linear regression"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a9b05e75967bfaa83ff0975efa99a3cd049a01c209a061b1d5de4600103b9ff6",
"md5": "3336af21b30fdd4bd8a3d254839c4720",
"sha256": "56df6a837c88ab72f1120645af96bb774c1d4b7889e748f0780b6718c6f6b183"
},
"downloads": -1,
"filename": "lingress-3.0.7.tar.gz",
"has_sig": false,
"md5_digest": "3336af21b30fdd4bd8a3d254839c4720",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17717,
"upload_time": "2024-12-09T07:57:33",
"upload_time_iso_8601": "2024-12-09T07:57:33.318020Z",
"url": "https://files.pythonhosted.org/packages/a9/b0/5e75967bfaa83ff0975efa99a3cd049a01c209a061b1d5de4600103b9ff6/lingress-3.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 07:57:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aeiwz",
"github_project": "lingress",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "lingress"
}