-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: cbd6834f28465f1e61c88d3b52d6572b | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
Credit | ||
------ | ||
|
||
This package is primarily written by `Griffin Chure <https://gchure.github.io>`_ | ||
with contributions from `Jonas Cremer <https://cremerlab.github.io>`_ who | ||
are both at Stanford University. Griffin Chure is supported by a National Science | ||
Foundation Postdoctoral Research Fellowship under the award number 2010807. | ||
|
||
Citing `hplc-py` | ||
================ | ||
If you end up using `hplc-py` in your research, great! Please consider citing | ||
the project. The package is being actively developed and improved, so please | ||
ensure that you cite the version number you are using. | ||
|
||
.. code-block:: bibtex | ||
@misc{#10.5281/zenodo.8197910, | ||
doi = {10.5281/zenodo.8197910} | ||
url = {https://doi.org/10.5281/zenodo.8197910}, | ||
author = {Chure, Griffin and Cremer, Jonas}, | ||
keywords = {Github}, | ||
title = {cremerlab/hplc-py: Version 0.2.00}, | ||
publisher = {Zenodo}, | ||
year = {2023} | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
.. image:: _static/page_logo.svg | ||
:align: center | ||
|
||
.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg | ||
:target: https://www.gnu.org/licenses/gpl-3.0 | ||
|
||
.. image:: https://github.com/cremerlab/hplc-py/actions/workflows/pytest.yaml/badge.svg | ||
:target: https://github.com/cremerlab/hplc-py/actions/workflows/pytest.yaml | ||
|
||
.. image:: https://codecov.io/gh/cremerlab/hplc-py/branch/main/graph/badge.svg?token=WXL50JVR6C | ||
:target: https://codecov.io/gh/cremerlab/hplc-py | ||
|
||
.. image:: https://badge.fury.io/py/hplc-py.svg | ||
:target: https://pypi.org/project/hplc-py/#description | ||
|
||
.. image:: https://zenodo.org/badge/667610900.svg | ||
:target: https://zenodo.org/badge/latestdoi/667610900 | ||
|
||
|
||
---- | ||
|
||
About | ||
===== | ||
|
||
Welcome to the documentation for `hplc-py`! This package provides a limited, yet | ||
robust, interface for accurate and efficient peak detection and quantification | ||
from chromatography data, specifically from High-Performance Liquid Chromatography (HPLC). | ||
|
||
Chromatography is an analytical technique which allows for quantitative | ||
characterization of a chemical mixture. While many of the technical details of | ||
HPLC are now automated, the programmatic cleaning and processing of the | ||
resulting data can be cumbersome and often requires extensive manual labor. The | ||
goal of `hplc-py` is to reduce this manual labor and make running of the | ||
chromatographic separation the most time-consuming step in the process. | ||
|
||
Installation | ||
------------ | ||
You can install `hplc-py` using pip:: | ||
|
||
$ pip install --upgrade hplc-py | ||
|
||
Dependencies for `hplc-py` are as follows: | ||
|
||
- Python 3.9 or newer | ||
- NumPy_ | ||
- SciPy_ | ||
- Pandas_ | ||
- Seaborn_ | ||
- Tqdm_ | ||
- Termcolor_ | ||
|
||
Contributing | ||
------------ | ||
Development of `hplc-py` occurs on various feature branches which are merged and | ||
released upon approval by Griffin. | ||
|
||
Please submit issues and bug reports using the `issue tracker <https://github.com/cremerlab/hplc-py/issues>`_. When filing an issue, | ||
provide a reproducible example that demonstrates the bug or problem. Feature | ||
requests can also be made through the issue tracker, though it is up to the | ||
discretion of the maintainers what is worth implementing. | ||
|
||
.. _NumPy: http://www.numpy.org/ | ||
.. _SciPy: http://www.scipy.org/ | ||
.. _Pandas: http://pandas.pydata.org/ | ||
.. _tqdm: https://tqdm.github.io/ | ||
.. _Matplotlib: https://matplotlib.org/ | ||
.. _Seaborn: https://seaborn.pydata.org/ | ||
.. _Termcolor: https://pypi.org/project/termcolor/ | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Tutorials | ||
:hidden: | ||
|
||
tutorials/quickstart.ipynb | ||
tutorials/calibration_curve.ipynb | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: How It Works | ||
:hidden: | ||
|
||
methodology/problem.ipynb | ||
methodology/baseline.ipynb | ||
methodology/peak_detection.ipynb | ||
methodology/fitting.ipynb | ||
methodology/scoring.ipynb | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: API Documentation | ||
:hidden: | ||
|
||
quant | ||
io | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Credit & Citation | ||
:hidden: | ||
|
||
citation | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`hplc.io` | ||
===================== | ||
.. automodule:: hplc.io | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
`hplc.quant` | ||
===================== | ||
.. automodule:: hplc.quant | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/* Compatability shim for jQuery and underscores.js. | ||
* | ||
* Copyright Sphinx contributors | ||
* Released under the two clause BSD licence | ||
*/ | ||
|
||
/** | ||
* small helper function to urldecode strings | ||
* | ||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL | ||
*/ | ||
jQuery.urldecode = function(x) { | ||
if (!x) { | ||
return x | ||
} | ||
return decodeURIComponent(x.replace(/\+/g, ' ')); | ||
}; | ||
|
||
/** | ||
* small helper function to urlencode strings | ||
*/ | ||
jQuery.urlencode = encodeURIComponent; | ||
|
||
/** | ||
* This function returns the parsed url parameters of the | ||
* current request. Multiple values per key are supported, | ||
* it will always return arrays of strings for the value parts. | ||
*/ | ||
jQuery.getQueryParameters = function(s) { | ||
if (typeof s === 'undefined') | ||
s = document.location.search; | ||
var parts = s.substr(s.indexOf('?') + 1).split('&'); | ||
var result = {}; | ||
for (var i = 0; i < parts.length; i++) { | ||
var tmp = parts[i].split('=', 2); | ||
var key = jQuery.urldecode(tmp[0]); | ||
var value = jQuery.urldecode(tmp[1]); | ||
if (key in result) | ||
result[key].push(value); | ||
else | ||
result[key] = [value]; | ||
} | ||
return result; | ||
}; | ||
|
||
/** | ||
* highlight a given string on a jquery object by wrapping it in | ||
* span elements with the given class name. | ||
*/ | ||
jQuery.fn.highlightText = function(text, className) { | ||
function highlight(node, addItems) { | ||
if (node.nodeType === 3) { | ||
var val = node.nodeValue; | ||
var pos = val.toLowerCase().indexOf(text); | ||
if (pos >= 0 && | ||
!jQuery(node.parentNode).hasClass(className) && | ||
!jQuery(node.parentNode).hasClass("nohighlight")) { | ||
var span; | ||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); | ||
if (isInSVG) { | ||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); | ||
} else { | ||
span = document.createElement("span"); | ||
span.className = className; | ||
} | ||
span.appendChild(document.createTextNode(val.substr(pos, text.length))); | ||
node.parentNode.insertBefore(span, node.parentNode.insertBefore( | ||
document.createTextNode(val.substr(pos + text.length)), | ||
node.nextSibling)); | ||
node.nodeValue = val.substr(0, pos); | ||
if (isInSVG) { | ||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); | ||
var bbox = node.parentElement.getBBox(); | ||
rect.x.baseVal.value = bbox.x; | ||
rect.y.baseVal.value = bbox.y; | ||
rect.width.baseVal.value = bbox.width; | ||
rect.height.baseVal.value = bbox.height; | ||
rect.setAttribute('class', className); | ||
addItems.push({ | ||
"parent": node.parentNode, | ||
"target": rect}); | ||
} | ||
} | ||
} | ||
else if (!jQuery(node).is("button, select, textarea")) { | ||
jQuery.each(node.childNodes, function() { | ||
highlight(this, addItems); | ||
}); | ||
} | ||
} | ||
var addItems = []; | ||
var result = this.each(function() { | ||
highlight(this, addItems); | ||
}); | ||
for (var i = 0; i < addItems.length; ++i) { | ||
jQuery(addItems[i].parent).before(addItems[i].target); | ||
} | ||
return result; | ||
}; | ||
|
||
/* | ||
* backward compatibility for jQuery.browser | ||
* This will be supported until firefox bug is fixed. | ||
*/ | ||
if (!jQuery.browser) { | ||
jQuery.uaMatch = function(ua) { | ||
ua = ua.toLowerCase(); | ||
|
||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || | ||
/(webkit)[ \/]([\w.]+)/.exec(ua) || | ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || | ||
/(msie) ([\w.]+)/.exec(ua) || | ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || | ||
[]; | ||
|
||
return { | ||
browser: match[ 1 ] || "", | ||
version: match[ 2 ] || "0" | ||
}; | ||
}; | ||
jQuery.browser = {}; | ||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Step 1: Baseline Correction" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import pandas as pd \n", | ||
"import matplotlib.pyplot as plt \n", | ||
"import seaborn as sns\n", | ||
"from hplc.quant import Chromatogram\n", | ||
"sns.set()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".venv", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8.12" | ||
}, | ||
"orig_nbformat": 4 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |