Skip to main content

Single-cell assisted deconvolutional network

Scaden

Scaden version MIT Install with pip Downloads Docker Scaden CI

Scaden is a deep-learning based algorithm for cell type deconvolution of bulk RNA-seq samples. It was developed at the DZNE Tübingen and the ZMNH in Hamburg. The method is published in Science Advances: Deep-learning based cell composition analysis from tissue expression profiles

A complete documentation is available here

Figure1

Scaden overview. a) Generation of artificial bulk samples with known cell type composition from scRNA-seq data. b) Training of Scaden model ensemble on simulated training data. c) Scaden ensemble architecture. d) A trained Scaden model can be used to deconvolve complex bulk mixtures.

Installation guide

Scaden can be easily installed on a Linux system, and should also work on Mac. There are currently two options for installing Scaden, either using Bioconda or via pip.

pip

To install Scaden via pip, simply run the following command:

pip install scaden

GPU

If you want to make use of your GPU, you will have to additionally install tensorflow-gpu.

For pip:

pip install tensorflow-gpu

For conda:

conda install tensorflow-gpu

Docker

If you don't want to install Scaden at all, but rather use a Docker container, we provide that as well. For every release, we provide two version - one for CPU and one for GPU usage. To pull the CPU container, use this command:

docker pull ghcr.io/kevinmenden/scaden/scaden

For the GPU container:

docker pull ghcr.io/kevinmenden/scaden/scaden-gpu

Webtool (beta)

Additionally, we now proivde a web tool:

https://scaden.ims.bio

It contains pre-generated training datasets for several tissues, and all you need to do is to upload your expression data. Please note that this is still in preview.

Usage

We provide a detailed instructions for how to use Scaden at our Documentation page

A deconvolution workflow with Scaden consists of four major steps:

  • data simulation
  • data processing
  • training
  • prediction

If training data is already available, you can start at the data processing step. Otherwise you will first have to process scRNA-seq datasets and perform data simulation to generate a training dataset. As an example workflow, you can use Scaden's function scaden example to generate example data and go through the whole pipeline.

First, make an example data directory and generate the example data:

mkdir example_data
scaden example --out example_data/

This generates the files "example_counts.txt", "example_celltypes.txt" and "example_bulk_data.txt" in the "example_data" directory. Next, you can generate training data:

scaden simulate --data example_data/ -n 100 --pattern "*_counts.txt

This generates 100 samples of training data in your current working directory. The file you need for your next step is called "data.h5ad". Now you need to perform the preprocessing using the training data and the bulk data file:

scaden process data.h5ad example_data/example_bulk_data.txt

As a result, you should now have a file called "processed.h5ad" in your directory. Now you can perform training. The following command performs training for 5000 steps per model and saves the trained weights to the "model" directory, which will be created:

scaden train processed.h5ad --steps 5000 --model_dir model

Finally, you can use the trained model to perform prediction:

scaden predict --model_dir model example_data/example_bulk_data.txt

Now you should have a file called "scaden_predictions.txt" in your working directory, which contains your estimated cell compositions.

1. System requirements

Scaden was developed and tested on Linux (Ubuntu 16.04 and 18.04). It was not tested on Windows or Mac, but should also be usable on these systems when installing with Pip or Bioconda. Scaden does not require any special hardware (e.g. GPU), however we recommend to have at least 16 GB of memory.

Scaden requires Python 3. All package dependencies should be handled automatically when installing with pip or conda.

Metadata

Release files for scaden 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scaden 1.1.2
File Size Uploaded Provenance
scaden-1.1.2.tar.gz 17.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for scaden 1.1.2
File Interpreter ABI Platform
scaden-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 36.9 kB

Release files / scaden-1.1.2.tar.gz

Download URL scaden-1.1.2.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ae03c2036f154955d8337207b18076331ae7f249dbf4df0b99c254a6724e0e88
BLAKE2b-256 checksum
How to use checksums
bfd9bb3fc8ef347dfbcb8a086056942b9ac400fbc0eee2d65092af43c233e7f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release files / scaden-1.1.2-py3-none-any.whl

Download URL scaden-1.1.2-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3da60791a5ac3525fc8e389407a15609af756536d6f4c5d3fcc78d0a3eb301f5
BLAKE2b-256 checksum
How to use checksums
6a4913f3d3cdd62ecfbbeae694e9a9fbffa4c587e3f77c6ad97039d34eabf3f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Security for scaden 1.1.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page