Skip to main content

Salamander is a non-negative matrix factorization framework for signature analysis

Project description

Salamander

Python versions supported License Code style

Salamander is a non-negative matrix factorization (NMF) framework for signature analysis build on top of AnnData and MuData. It implements multiple NMF algorithms, common visualizations, and can be easily customized & expanded.


Installation

PyPI:

pip install salamander-learn

Usage

The following example illustrates the basic syntax:

import anndata as ad
import salamander as sal

# initialize data
adata = ad.AnnData(...)

# NMF with Poisson noise
model = sal.models.KLNMF(n_signatures=5)
model.fit(adata)

# barplot
model.plot_signatures()

# stacked barplot
model.plot_exposures()

# signature correlation
model.plot_correlation()

# sample_correlation
model.plot_correlation(data="samples")

# dimensionality reduction of the exposures
model.plot_embeddings(method="umap")

For examples of how to customize any NMF algorithm and the plots, check out the tutorial. The following algorithms are currently available:

License

MIT

Changelog

Consult the CHANGELOG file for enhancements and fixes of each version.

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

salamander_learn-0.4.1.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

salamander_learn-0.4.1-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file salamander_learn-0.4.1.tar.gz.

File metadata

  • Download URL: salamander_learn-0.4.1.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-107-generic

File hashes

Hashes for salamander_learn-0.4.1.tar.gz
Algorithm Hash digest
SHA256 c2c08c785bfbcd0352dc50273583e907d66839b22f1fa9136623fe3a6f229fa9
MD5 4a10f549826fdb53380cf74e7e239615
BLAKE2b-256 732e65eb3468756e5339891a293d513e139bc11eb646cb4f6a0bf3149e4f01d6

See more details on using hashes here.

File details

Details for the file salamander_learn-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: salamander_learn-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Linux/5.15.0-107-generic

File hashes

Hashes for salamander_learn-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a0fce0de2b35dc0dbc7e585e6c945337db20d69bb89a1a2bb1db7c0f9b544662
MD5 99bfa33c4e7edeea753637c06d977873
BLAKE2b-256 b7931f0e63ca6e468e94c96e253a08eddc7b999b4f85681574f64db2b072078d

See more details on using hashes here.

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