A Python implementation of the NPC toolchain for the import, quality-control, and preprocessing of metabolic profiling datasets.
Imports:
- Peak-picked LC-MS data (XCMS, Progenesis QI, & Metaboscape)
- Raw NMR spectra (Bruker format)
- Targeted datasets (TargetLynx, Bruker BI-LISA & BI-Quant-Ur)
Provides:
- Batch & drift correction for LC-MS datasets
- Feature filtering by RSD and linearity of response
- Calculation of spectral line-width in NMR
- PCA of datasets
- Visualisation of datasets
Exports:
- Basic tabular csv
- ISA-TAB
To install via pip, run:
pip install nPYc
To install from a local copy of the source, simply navigate to the main package folder and run:
python setup.py install
Alternatively, using pip and a local copy of the source:
pip install /nPYC-toolboxDirectory/
Installation with pip allows the usage of the uninstall command
pip uninstall nPYc
Documentation is hosted on Read the Docs.
Documentation is generated via Sphinx Autodoc, documentation markup is in reStructuredText.
To build the documentation locally, cd into the docs
directory and run:
make html
To clear the current documentation in order to rebuild after making changes, run:
make clean
Source management is git-flow-like - no development in the master branch! When making a change, create a fork based on develop, and issue a pull request when ready.
When merging into the develop branch, all new code must include unit-tests, all tests should pass, and overall code-coverage for the toolbox should not drop.
When merging from develop (or hotfix branches) into release, ensure:
- All references to the debugger are removed
- All paths are relative and platform agnostic
- All tests pass
Unit testing is managed via the unittest
framework. Test coverage can be found on codecov.io.
To run all tests, cd into the Tests
directory and run:
python -m unittest discover -v
Individual test modules can be run with:
python -m `test_filename` -v
When stored internally, and unless explicitly overriden, variables should conform to the units laid out in the Nomenclature of the documentation.