Skip to main content

Single Sample GSEA

Project description

Single Sample GSEA analysis

Single-sample geneset enrichment analysis (ssGSEA) is a single-sample extension of the GSEA algorithm. It calculates a separate enrichment score for each sample and gene set pairing [1].

Install the latest version

pip install single_sample_gsea

Usage

>>> from single_sample_gsea import ss_gsea

>>> gene_sets = {
    "gs1": {"gene2", "gene3"},
    "gs2": {"gene1", "gene4"},
    }

>>> data = {
    "gene": ["gene1", "gene2", "gene3", "gene4", "gene5"],
    "sample-1": [1, 3, 4, 7, 32],
    "sample-2": [25, 4, 6, 18, 1],
    }
>>> data = pd.DataFrame(data).set_index("gene")

>>> ss_gsea(data, gene_sets)
               gs1       gs2
sample-1 -1.333333 -0.962974
sample-2 -1.333333  2.543214

References

[1] Barbie, D., Tamayo, P., Boehm, J. et al. Systematic RNA interference reveals that oncogenic KRAS-driven cancers require TBK1. Nature 462, 108–112 (2009). https://doi.org/10.1038/nature08460

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

single_sample_gsea-0.2.0.tar.gz (11.6 kB view hashes)

Uploaded Source

Built Distribution

single_sample_gsea-0.2.0-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page