sspa
Single sample pathway analysis tools for omics data
Full walkthrough notebook available on Google Colab:
Documentation is available on our Read the Docs page
Quickstart
pip install sspa
Load Reactome pathways
reactome_pathways = sspa.process_reactome(organism="Homo sapiens")
Load some example metabolomics data in the form of a pandas DataFrame:
covid_data_processed = sspa.load_example_data(omicstype="metabolomics", processed=True)
Generate pathway scores using kPCA method
kpca_scores = sspa.sspa_kpca(covid_data_processed, reactome_pathways)
Loading pathways
# Pre-loaded pathways
# Reactome v78
reactome_pathways = sspa.process_reactome(organism="Homo sapiens")
# KEGG v98
kegg_human_pathways = sspa.process_kegg(organism="hsa")
Load a custom GMT file (extension .gmt or .csv)
custom_pathways = sspa.process_gmt("wikipathways-20220310-gmt-Homo_sapiens.gmt")
Download latest version of pathways
# download KEGG latest
kegg_mouse_latest = sspa.process_kegg("mmu", download_latest=True, filepath=".")
# download Reactome latest
reactome_mouse_latest = sspa.process_reactome("Mus musculus", download_latest=True, filepath=".")
Identifier harmonization
# download the conversion table
compound_names = processed_data.columns.tolist()
conversion_table = sspa.identifier_conversion(input_type="name", compound_list=compound_names)
# map the identifiers to your dataset
processed_data_mapped = sspa.map_identifiers(conversion_table, output_id_type="ChEBI", matrix=processed_data)
Conventional pathway analysis
ORA
ora = sspa.sspa_ora(processed_data_mapped, covid_data["Group"], reactome_pathways, 0.05, custom_background=None)
# perform ORA
ora_res = ora.over_representation_analysis()
# get t-test results
ora.ttest_res
# obtain list of differential molecules input to ORA
ora.DA_molecules
GSEA
sspa.sspa_fgsea(processed_data_mapped, covid_data['Group'], reactome_pathways)
Single sample pathway analysis methods
# ssclustPA
ssclustpa_proj_res = sspa.sspa_cluster(processed_data_mapped, reactome_pathways)
# kPCA
kpca_scores = sspa.sspa_kpca(processed_data_mapped, reactome_pathways)
# z-score
zscore_res = sspa.sspa_zscore(processed_data_mapped, reactome_pathways)
# SVD (PLAGE)
svd_res = sspa.sspa_svd(processed_data_mapped, reactome_pathways)
# GSVA
gsva_res = sspa.sspa_gsva(processed_data_mapped, reactome_pathways)
License
GNU GPL 3.0
Citing us
If you found this package useful, please consider citing us:
ssPA package
@article{Wieder22a,
author = {Cecilia Wieder and Nathalie Poupin and Clément Frainay and Florence Vinson and Juliette Cooke and Rachel PJ Lai and Jacob G Bundy and Fabien Jourdan and Timothy MD Ebbels},
doi = {10.5281/ZENODO.6959120},
month = {8},
title = {cwieder/py-ssPA: v1.0.4},
url = {https://zenodo.org/record/6959120},
year = {2022},
}
Single-sample pathway analysis in metabolomics
@article{Wieder2022,
author = {Cecilia Wieder and Rachel P J Lai and Timothy Ebbels},
doi = {10.1101/2022.04.11.487976},
journal = {bioRxiv},
month = {4},
pages = {2022.04.11.487976},
publisher = {Cold Spring Harbor Laboratory},
title = {Single sample pathway analysis in metabolomics : performance evaluation and application},
url = {https://www.biorxiv.org/content/10.1101/2022.04.11.487976v1 https://www.biorxiv.org/content/10.1101/2022.04.11.487976v1.abstract},
year = {2022},
}
Metadata
Release files for sspa 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sspa-0.1.4.tar.gz | 8.0 MB | Without provenance | Details for sspa-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sspa-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for sspa-0.1.4-py3-none-any.whl |
Total release size: 16.0 MB
Release files / sspa-0.1.4.tar.gz
| Download URL | sspa-0.1.4.tar.gz |
|---|---|
| Size | 8.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2bbbd7ccad1b3c44da6a71b62c32fda947068c785a5d96d3941d5903c47fd6e
|
|
BLAKE2b-256 checksum How to use checksums |
0638cf8a4422b3d925bac9691eb407a51f004d12aa9829f100632772b31bdf96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.5
|
Release files / sspa-0.1.4-py3-none-any.whl
| Download URL | sspa-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c6de53b1b710946b436f5c87a77326129ea6ee52566f84c60f90c1c499caf51
|
|
BLAKE2b-256 checksum How to use checksums |
7a92d8633951f4cbb88ecdccfaab19c2658537ec3276f8e3ed97511f7aed0bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.5
|
Security for sspa 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.