sc-echidna


Namesc-echidna JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/azizilab/echidna
SummaryMapping genotype to phenotype through joint probabilistic modeling of single-cell gene expression and chromosomal copy number variation.
upload_time2024-12-16 18:35:46
maintainerNone
docs_urlNone
authorJoy Linyue Fan
requires_python<4.0,>=3.10
licenseMIT
keywords scrna wgs cnv
VCS
bugtrack_url
requirements scanpy pandas numpy seaborn hmmlearn pyro-ppl graphviz requests scikit-learn leidenalg
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Echidna
<img src=./echidna_logo.png width="100" />

 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. 


<img src=./echidna_concept.png width="800" />

# Install

Echidna is [available on PyPI](https://pypi.org/project/sc-echidna/1.0.0/) under the name `sc-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](https://pytorch.org/get-started/locally/).

Echidna is available through pip via: `pip install sc-echidna`.

# Tutorial

There are four example notebooks:

1. 1-single-timepoint.ipynb
2. 2-multi-timepoint.ipynb
3. 3-infer-gene-dosage.ipynb
4. 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 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](https://pyro.ai/) 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.                                     |
| `lkj_concentration`   | `float` | `1.0`     | Concentration parameter of LKJ prior. Values > 1.0 result in more diagonal covariance matrices. |
| `q_shape_rate_scaler` | `float` | `10.0`    | Scaler for the shape and rate parameters of the covariance diagonal for variational inference. |
| `q_corr_init`         | `float` | `0.01`    | Initial scale of the variational correlation.                                      |
| `q_cov_scaler`        | `float` | `0.01`    | Scaler for the covariance of the variational correlation.                          |
| `eta_mean_init`       | `float` | `2.0`     | Initial mean value for the eta parameter.                                          |
| `eps`                 | `float` | `5e-3`    | Small constant added to the diagonal to ensure positive definiteness (PD).         |


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/azizilab/echidna",
    "name": "sc-echidna",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "scRNA, wgs, cnv",
    "author": "Joy Linyue Fan",
    "author_email": "lf2684@columbia.edu",
    "download_url": "https://files.pythonhosted.org/packages/2e/cb/025abeb1133956134fe7334e39c1409a91a07f89f3e80e0455f421a37d13/sc_echidna-1.0.2.tar.gz",
    "platform": null,
    "description": "# Echidna\n<img src=./echidna_logo.png width=\"100\" />\n\n 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. \n\n\n<img src=./echidna_concept.png width=\"800\" />\n\n# Install\n\nEchidna is [available on PyPI](https://pypi.org/project/sc-echidna/1.0.0/) under the name `sc-echidna`.\n\n## Step 1 (optional but recommended)\nCreate a conda environment with a recent Python version: `conda create -n \"echidna-env\" python=3.10`.\n\n## Step 2\nEnsure you have the right version of torch installed for your device. See instructions on [pytorch.org](https://pytorch.org/get-started/locally/).\n\nEchidna is available through pip via: `pip install sc-echidna`.\n\n# Tutorial\n\nThere are four example notebooks:\n\n1. 1-single-timepoint.ipynb\n2. 2-multi-timepoint.ipynb\n3. 3-infer-gene-dosage.ipynb\n4. 4-echidna-model.ipynb\n\nThe notebooks are meant to be run sequentially, and they build off of each other.\n\nNotebook 1 introduces you to the package - preparing your data, setting hyperparamters, performing posterior predictive checks - with data collected from a single point in time.\n\nIn notebook 2, we look at a multi-timepoint setting, where we have paired single-cell and WGS data collected over time. \n\nThe 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.\n\nNotebook 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](https://pyro.ai/) knowledge is assumed.\n\n# Echidna Configuration Settings\n\n## `.obs` Labels\n\n| Setting        | Type   | Default         | Description                               |\n|----------------|--------|-----------------|-------------------------------------------|\n| `timepoint_label` | `str`  | `\"timepoint\"`    | Label for timepoints in the data.         |\n| `counts_layer`    | `str`  | `\"counts\"`       | Name of the counts layer in the data.     |\n| `clusters`        | `str`  | `\"leiden\"`       | Clustering method used in the data. This can also be celltype annotations, if you have them.       |\n\n## Training Parameters\n\n| Setting         | Type   | Default         | Description                                               |\n|-----------------|--------|-----------------|-----------------------------------------------------------|\n| `seed`          | `int`  | `42`            | Random seed for reproducibility.                          |\n| `n_steps`       | `int`  | `10000`         | Maximum number of steps for Stochastic Variational Inference (SVI). |\n| `learning_rate` | `float`| `0.1`           | Learning rate for the Adam optimizer.                     |\n| `val_split`     | `float`| `0.1`           | Percentage of training data to use for validation.         |\n| `patience`      | `int`  | `30`            | Early stopping patience (set to >0 to enable early stopping). |\n| `device`        | `str`  | `\"cuda\" if is_available() else \"cpu\"` | Device to use for training (GPU if available, otherwise CPU). |\n| `verbose`       | `bool` | `True`          | Whether to enable logging output.                         |\n\n## Model Hyperparameters\n\n| Setting              | Type    | Default   | Description                                                                        |\n|----------------------|---------|-----------|------------------------------------------------------------------------------------|\n| `inverse_gamma`       | `bool`  | `False`   | Whether to use inverse gamma for noisier data.                                     |\n| `lkj_concentration`   | `float` | `1.0`     | Concentration parameter of LKJ prior. Values > 1.0 result in more diagonal covariance matrices. |\n| `q_shape_rate_scaler` | `float` | `10.0`    | Scaler for the shape and rate parameters of the covariance diagonal for variational inference. |\n| `q_corr_init`         | `float` | `0.01`    | Initial scale of the variational correlation.                                      |\n| `q_cov_scaler`        | `float` | `0.01`    | Scaler for the covariance of the variational correlation.                          |\n| `eta_mean_init`       | `float` | `2.0`     | Initial mean value for the eta parameter.                                          |\n| `eps`                 | `float` | `5e-3`    | Small constant added to the diagonal to ensure positive definiteness (PD).         |\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Mapping genotype to phenotype through joint probabilistic modeling of single-cell gene expression and chromosomal copy number variation.",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/azizilab/echidna",
        "Repository": "https://github.com/azizilab/echidna"
    },
    "split_keywords": [
        "scrna",
        " wgs",
        " cnv"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b69863172be46bdd7a201c02e5cf07db95a07f45b2478b9d892d73ba92eea213",
                "md5": "bf62503f65725e72fdf2d8f2abbb8902",
                "sha256": "9826b1685cbb091c5649e702f5d9f0b3738f07dd2687aff640766aaaeaca7c79"
            },
            "downloads": -1,
            "filename": "sc_echidna-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bf62503f65725e72fdf2d8f2abbb8902",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 40514,
            "upload_time": "2024-12-16T18:35:44",
            "upload_time_iso_8601": "2024-12-16T18:35:44.851593Z",
            "url": "https://files.pythonhosted.org/packages/b6/98/63172be46bdd7a201c02e5cf07db95a07f45b2478b9d892d73ba92eea213/sc_echidna-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ecb025abeb1133956134fe7334e39c1409a91a07f89f3e80e0455f421a37d13",
                "md5": "53acdc621b6a1194b6b81766c6230b5f",
                "sha256": "0e355842d01899c868de50b3a61356f22e5edfac22b57cdbe1d388204c2e2065"
            },
            "downloads": -1,
            "filename": "sc_echidna-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "53acdc621b6a1194b6b81766c6230b5f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 35087,
            "upload_time": "2024-12-16T18:35:46",
            "upload_time_iso_8601": "2024-12-16T18:35:46.937089Z",
            "url": "https://files.pythonhosted.org/packages/2e/cb/025abeb1133956134fe7334e39c1409a91a07f89f3e80e0455f421a37d13/sc_echidna-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-16 18:35:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "azizilab",
    "github_project": "echidna",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "scanpy",
            "specs": [
                [
                    ">=",
                    "1.10"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.21"
                ]
            ]
        },
        {
            "name": "seaborn",
            "specs": []
        },
        {
            "name": "hmmlearn",
            "specs": []
        },
        {
            "name": "pyro-ppl",
            "specs": [
                [
                    ">=",
                    "1.9.1"
                ]
            ]
        },
        {
            "name": "graphviz",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "scikit-learn",
            "specs": []
        },
        {
            "name": "leidenalg",
            "specs": []
        }
    ],
    "lcname": "sc-echidna"
}
        
Elapsed time: 0.41689s