Skip to content

Commit ebf6a64

Browse files
author
MJS-708
committed
Add documentation
1 parent 27dfcf8 commit ebf6a64

13 files changed

+373
-0
lines changed

.readthedocs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/source/conf.py
11+
12+
# Optionally build your docs in additional formats such as PDF and ePub
13+
formats: all
14+
15+
conda:
16+
environment: environment.yml
17+
18+
python:
19+
version: 3.7
20+
install:
21+
- method: pip
22+
path: .

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/source/amimspy.process.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
process
2+
=======
3+
4+
.. automodule:: amimspy.process
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
:member-order: bysource

docs/source/api-reference.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
API reference
2+
=============
3+
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
amimspy.process
9+
10+
AMIMSpy builds on top of `DIMSpy <https://github.com/computational-metabolomics/dimspy>`__. Documentation and the API reference for DIMSpy modules and functions are available from `here <https://dimspy.readthedocs.io/en/latest/api-reference.html>`__.
11+

docs/source/bugs-and-issues.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Bugs and Issues
2+
===============
3+
4+
Please report any bugs that you find `here <https://github.com/computational-metabolomics/amimspy/issues>`_.
5+
Or fork the repository on `GitHub <https://github.com/computational-metabolomics/amimspy/>`_
6+
and create a pull request (PR). We welcome all contributions, and we will help you to make
7+
the PR if you are new to `git`.

docs/source/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Changelog
2+
=========
3+
4+
All notable changes to this project will be documented here. For more details changes please refer to `github <https://github.com/computational-metabolomics/amimspy>`_ commit history

docs/source/citation.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Citation
2+
========
3+
4+
To cite AMIMSpy please use the following publication:
5+

docs/source/cli.rst

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
Command Line Interface
2+
======================
3+
4+
.. code-block:: console
5+
6+
$ amimspy --help
7+
8+
Executing amimspy version 0.1.0
9+
usage: __main__.py [-h]
10+
{process-scans,process-samples,hdf5-pm-to-txt,hdf5-pls-to-txt}
11+
...
12+
13+
Python package for processing acoustic mist ionisation-mass spectrometry
14+
-based metabolomics and lipidomics data
15+
16+
positional arguments:
17+
{process-scans,process-samples,hdf5-pm-to-txt,hdf5-pls-to-txt}
18+
process-scans Process and align scans within samples.
19+
process-samples Process and align samples.
20+
hdf5-pm-to-txt Write HDF5 output (peak matrix) to text format.
21+
hdf5-pls-to-txt Write HDF5 output (peak lists) to text format.
22+
23+
optional arguments:
24+
-h, --help show this help message and exit
25+
26+
27+
.. code-block:: console
28+
29+
$ amimspy process-scans --help
30+
31+
Executing amimspy version 0.1.0
32+
usage: __main__.py process-scans [-h] -i source [source ...] -ms source
33+
[source ...] -o OUTPUT -f FAILED_WELLS -pr
34+
PROCESSED_SCANS
35+
[-m {all_scans,on_scans,off_scans,on_scan_no_edge}]
36+
[-d ID_SNR] [-t ID_TOL] [-s SNR_THRESHOLD]
37+
[-n MIN_SCANS] [-r RSD_THRESHOLD]
38+
[-fr MIN_FRACTION] -p PPM [-l METALIST]
39+
40+
optional arguments:
41+
-h, --help show this help message and exit
42+
-i source [source ...], --input source [source ...]
43+
Absolute or relative path to the *.mzml file(s). Must
44+
be in same order as 'metascans *txt files'
45+
-ms source [source ...], --metascans source [source ...]
46+
Absolute or relative path to the comma-delimited *.txt
47+
metadata file. Must be in same order and 'input' *mzml
48+
files. Header names must contain and be in the
49+
following order names =['barcode', 'date/time', 'row',
50+
'col', 'scan', 'ejection time', 'NA'] as output by MS-
51+
Parser tool
52+
-o OUTPUT, --output OUTPUT
53+
Absolute or relative path to the output file
54+
-f FAILED_WELLS, --failed-wells FAILED_WELLS
55+
Absolute or relative path to the *.txt output of which
56+
well failed
57+
-pr PROCESSED_SCANS, --processed_scans PROCESSED_SCANS
58+
Absolute or relative path to the *.txt output of which
59+
well failed
60+
-m {all_scans,on_scans,off_scans,on_scan_no_edge}, --method {all_scans,on_scans,off_scans,on_scan_no_edge}
61+
Method to define which scans to extract data from.
62+
DEFAULT = on_scans_no_edge
63+
-d ID_SNR, --id-snr ID_SNR
64+
For identifying on/off scans: Hard SNR threshold for
65+
differentiating between on/off scans. DEFAULT = 15
66+
-t ID_TOL, --id-tol ID_TOL
67+
For identifying on/off scans: Number of features with
68+
SNR > threshold to tolerate in off scans. DEFAULT = 3
69+
-s SNR_THRESHOLD, --snr-threshold SNR_THRESHOLD
70+
SNR threshold to remove noise features. DEFAULT = 2
71+
-n MIN_SCANS, --min-scans MIN_SCANS
72+
Minimum number of scans required to be labelled on
73+
within a well for sample to be taken forward. DEFAULT
74+
= 0
75+
-r RSD_THRESHOLD, --rsd-threshold RSD_THRESHOLD
76+
RSD filter (scan level): Threshold of RSD of features
77+
across scans in sample for it to be retained. DEFAULT
78+
= None
79+
-fr MIN_FRACTION, --min-fraction MIN_FRACTION
80+
Minimum fraction a peak has to be present. Use 0.0 to
81+
not apply this filter.
82+
-p PPM, --ppm PPM Aligning scans: m/z precision (ppm) to align scans in
83+
sample - REQUIRED PARAMETER!
84+
-l METALIST, --metalist METALIST
85+
Absolute or relative path to the tab-delimited *.txt
86+
file that include the name of the data files (*.mzml)
87+
and meta data. Column names: filename, replicate,
88+
batch, injectionOrder, classLabel.

docs/source/conf.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# http://www.sphinx-doc.org/en/master/config
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
sys.path.insert(0, os.path.abspath('..'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
project = u'AMIMSpy'
20+
copyright = u'2021, Matthew Smith, Ralf Weber'
21+
author = u'Matthew Smith, Ralf Weber'
22+
23+
# The full version, including alpha/beta/rc tags
24+
release = '0.1.0'
25+
26+
27+
# -- General configuration ---------------------------------------------------
28+
29+
# Add any Sphinx extension module names here, as strings. They can be
30+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31+
# ones.
32+
extensions = [
33+
'sphinx.ext.autodoc',
34+
'sphinx.ext.doctest',
35+
'sphinx.ext.viewcode',
36+
'sphinx.ext.napoleon',
37+
'sphinx.ext.todo',
38+
'sphinx.ext.mathjax'
39+
]
40+
41+
# Add any paths that contain templates here, relative to this directory.
42+
templates_path = ['_templates']
43+
44+
# The master toctree document.
45+
master_doc = 'index'
46+
47+
# List of patterns, relative to source directory, that match files and
48+
# directories to ignore when looking for source files.
49+
# This pattern also affects html_static_path and html_extra_path.
50+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
51+
52+
53+
# -- Options for HTML output -------------------------------------------------
54+
55+
# The theme to use for HTML and HTML Help pages. See the documentation for
56+
# a list of builtin themes.
57+
#
58+
html_theme = 'sphinx_rtd_theme'
59+
60+
# Add any paths that contain custom static files (such as style sheets) here,
61+
# relative to this directory. They are copied after the builtin static files,
62+
# so a file named "default.css" will overwrite the builtin "default.css".
63+
html_static_path = ['_static']

docs/source/credits.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Credits
2+
=======
3+
4+
Developers & Contributors
5+
-------------------------
6+
- Matthew Smith ([email protected]) - `University of Birmingham (UK) <https://www.birmingham.ac.uk/>`__
7+
- Ralf J. M. Weber ([email protected]) - `University of Birmingham (UK) <https://www.birmingham.ac.uk/staff/profiles/biosciences/weber-ralf.aspx>`__
8+
9+
Funding
10+
-------
11+
AMIMSpy acknowledges support from the following funders:
12+
- BBSRC and Waters Corporation for an iCASE PhD studentship.
13+

0 commit comments

Comments
 (0)