Echidna
A Bayesian framework for quantifying gene dosage effect on phenotypic plasticity through integrating single-cell RNA sequencing (scRNA-seq) and bulk whole-genome sequencing (WGS) from a single or multiple time points.
Install
Echidna is available on PyPI under the name sc-echidna and bioconda under echidna.
Step 1 (optional but recommended)
Create a conda environment with a recent Python version: conda create -n "echidna-env" python=3.10.
Step 2
Ensure you have the right version of torch installed for your device. See instructions on pytorch.org.
Conda Formula
conda install bioconda::echidna
Pip Formula
pip install sc-echidna
Installation time depends on hardware, but can be finished within 5 minutes for most computers.
Tutorial
There are four example notebooks:
- 1-single-timepoint.ipynb
- 2-multi-timepoint.ipynb
- 3-infer-gene-dosage.ipynb
- 4-echidna-model.ipynb
The notebooks are meant to be run sequentially, and they build off of each other.
Notebook 1 introduces you to the package - preparing your data, setting hyperparamters, performing posterior predictive checks - with data collected from a single point in time.
In notebook 2, we look at a multi-timepoint setting, where we have paired single-cell and WGS data collected over time. The demo dataset included in ./demo_data is the same data we used for this notebook.
The saved model runs from notebook 2 will be used in notebook 3, where you will see how to infer amplifications and deletions by cluster of genes across a given genome. This notebook also shows you how to calculate and plot gene dosage effect with Echidna.
Notebook 4 is meant to show you how to do more custom work with the model. We package together many functions for your convenience, but this notebook will show you how to work directly with the model for the experiments not covered in the package. Some Pyro knowledge is assumed.
Echidna Configuration Settings
.obs Labels
| Setting | Type | Default | Description |
|---|---|---|---|
timepoint_label |
str |
"timepoint" |
Label for timepoints in the data. |
counts_layer |
str |
"counts" |
Name of the counts layer in the data. |
clusters |
str |
"leiden" |
Clustering method used in the data. This can also be celltype annotations, if you have them. |
Training Parameters
| Setting | Type | Default | Description |
|---|---|---|---|
seed |
int |
42 |
Random seed for reproducibility. |
n_steps |
int |
10000 |
Maximum number of steps for Stochastic Variational Inference (SVI). |
learning_rate |
float |
0.1 |
Learning rate for the Adam optimizer. |
val_split |
float |
0.1 |
Percentage of training data to use for validation. |
patience |
int |
30 |
Early stopping patience (set to >0 to enable early stopping). |
device |
str |
"cuda" if is_available() else "cpu" |
Device to use for training (GPU if available, otherwise CPU). |
verbose |
bool |
True |
Whether to enable logging output. |
Model Hyperparameters
| Setting | Type | Default | Description |
|---|---|---|---|
inverse_gamma |
bool |
False |
Whether to use inverse gamma for noisier data. |
eta_mean_init |
float |
2.0 |
Initial mean value for the eta parameter. |
lkj_concentration |
float |
1.0 |
Concentration parameter of LKJ prior. Values > 1.0 result in more diagonal covariance matrices. |
q_corr_init |
float |
0.01 |
Initial scale of the variational correlation. |
q_shape_rate_scaler |
float |
10.0 |
Scaler for the shape and rate parameters of the covariance diagonal for variational inference. |
Metadata
Release files for sc-echidna 1.0.3
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 |
|---|---|---|---|---|
| sc_echidna-1.0.3.tar.gz | 35.0 kB | Without provenance | Details for sc_echidna-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sc_echidna-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for sc_echidna-1.0.3-py3-none-any.whl |
Total release size: 75.6 kB
Release files / sc_echidna-1.0.3.tar.gz
| Download URL | sc_echidna-1.0.3.tar.gz |
|---|---|
| Size | 35.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ba8c0bbe4c39f09f0dad36413a7b9d06db0dc10d270e43392634cc822400aaa
|
|
BLAKE2b-256 checksum How to use checksums |
3b77c2036819dd48bc222ba673185041999cdccbe3957c217d988c94fab85966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / sc_echidna-1.0.3-py3-none-any.whl
| Download URL | sc_echidna-1.0.3-py3-none-any.whl |
|---|---|
| Size | 40.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63291b06a534802bf7c1ee580d7f5c0342e3f8f321b7ee5bda7529dcd17d1f3c
|
|
BLAKE2b-256 checksum How to use checksums |
2315e571585b42475ee64a439169987f62935df1cd4a18c4077053e6e5961244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Security for sc-echidna 1.0.3
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.