Skip to main content

Negative multinomial variational auto-encoder

Project description

scMaui is python package that implements a variational auto-encoder for multi-omics data integration. The model is capable of handling variable numbers input and output modalities as well as missing modalities. The model also features a range of log-likelihood implementations for determining the reconstruction loss, including the negative binomial or the negative multinomial model.

scmaui_scheme.svg

The package is freely available under a GNU Lesser General Public License v3 or later (LGPLv3+)

Installation

pip scmaui

Usage

import pkg_resources
from scmaui.data import load_data, SCDataset
from scmaui.utils import get_model_params
from scmaui.ensembles import EnsembleVAE

# get some toy data
toy_data_path = pkg_resources.resource_filename('scmaui', 'resources/gtx.h5ad')

adatas = load_data([toy_data_path], names=['gtx'])
dataset = SCDataset(adatas, losses=['negbinom'])

# create an scMaui model
params = get_model_params(dataset)
ensemble = EnsembleVAE(params=params)

# fit the model
ensemble.fit(dataset, epochs=10)
ensemble.summary()

# obtain latent features
latents, _ = ensemble.encode(dataset)

# obtain an imputation
imputed = ensemble.impute(dataset)

# obtain input feature attributions
selected_cells = latents.index.tolist()[:5] # select first 5 cells
explanation = ensemble.explain(dataset, cellids=selected_cells)

Command-line usage

scMaui offers a command line interface for model fitting. The results are stored in an output directory (-output).

scmaui -data adata.h5ad \
      -names gtx \
      -output <outputdir> \
      -epochs 200 \
      -ensemble_size 10 \
      -nlatent 15 \
      -adversarial label1 label2 \
      -conditional covariate1 covariate2

Additional information on available hyper-parameters are available through

scmaui -h

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

scmaui-0.0.3.tar.gz (9.5 MB view details)

Uploaded Source

Built Distribution

scmaui-0.0.3-py2.py3-none-any.whl (9.6 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file scmaui-0.0.3.tar.gz.

File metadata

  • Download URL: scmaui-0.0.3.tar.gz
  • Upload date:
  • Size: 9.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for scmaui-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bd2000f9a53f3abfdccf2f77fc604a706e852038d02f56853f13899baae0b5b6
MD5 fadc1ff6d99483e1e51c5683ad506b84
BLAKE2b-256 d97e0dc37aa91062279c62ce60be94a7e26772897893845c25e4be42272f70e6

See more details on using hashes here.

File details

Details for the file scmaui-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: scmaui-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for scmaui-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 222b2b7c9ed275ea063487a026018de20ebdd1d1de0d37386f83e5c173dac272
MD5 1d375309f549ddde3190673dbea40f09
BLAKE2b-256 5fb413c77c0ff1d3187227b6cc252e08f904bd427d59c545738dc7ebd1653991

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