SNPmanifold


NameSNPmanifold JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/StatBiomed/SNPmanifold
SummarySNPmanifold: Manifold learning for single-cell SNVs
upload_time2024-09-22 17:27:36
maintainerNone
docs_urlNone
author['Kevin Chung', 'Yuanhua Huang']
requires_pythonNone
licenseApache-2.0
keywords manifold learning variational autoencoder single-cell single-nucleotide variations phylogenetic reconstruction
VCS
bugtrack_url
requirements anndata scanpy leidenalg numpy scipy pandas networkx matplotlib seaborn torch scikit-learn umap-learn tqdm
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SNPmanifold

SNPmanifold is a Python package that learns a representative manifold for single cells based on their SNPs (Single-Nucleotide Polymorphisms) using VAE (Variational AutoEncoder) and UMAP (Uniform Manifold Approximation and Projection). It takes AD matrix, DP matrix, and VCF (or variant_name.tsv) as inputs. You can compile them from bam file(s) either conveniently by cellSNP-lite or by your custom scripts.

SNPmanifold first performs simple filtering on AD matrix and DP matrix for high-quality cells and SNPs. It then trains VAE and UMAP to learn a representative manifold for single cells according to their allele frequency of different SNPs (AF = AD/DP). Finally, it classifies cells into clones and infer their phylogeny based on the manifold. 

## Installation

Quick install can be achieved via pip

```bash
# for published version
pip install -U SNPmanifold

# or developing version
pip install -U git+https://github.com/StatBiomed/SNPmanifold
```

Or set a conda environment before installing (credits to Xinyi Lin).
Replace `$myenv` with the environment name you prefer.

```bash
conda create -n $myenv python=3.8
conda activate $myenv

pip install -U git+https://github.com/StatBiomed/SNPmanifold
```

## Quick Usage

Full documentation is at https://SNPmanifold.readthedocs.io. 

Here is a quick start:

1. Import SNPmanifold and create an object of the class SNP_VAE.

```python
from SNPmanifold import SNP_VAE
```

2. Run 4 methods (filtering, training, clustering, phylogeny) in order.

  Each method can rerun sperately without reruning prior methods. 

* The [demo page](https://snpmanifold.readthedocs.io/en/latest/SNPmanifold_demo.html) 
  and notebook [SNPmanifold_demo.ipynb](./SNPmanifold_demo.ipynb) show 
  a demo for quick usage of SNPmanifold on MKN45 cancer cell line using 
  mitochondrial SNPs.

* See how to use it via the [API page](https://snpmanifold.readthedocs.io/en/latest/API.html#main-object).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/StatBiomed/SNPmanifold",
    "name": "SNPmanifold",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Manifold learning, Variational autoencoder, Single-cell single-nucleotide variations, Phylogenetic reconstruction",
    "author": "['Kevin Chung', 'Yuanhua Huang']",
    "author_email": "u3570318@connect.hku.hk",
    "download_url": "https://files.pythonhosted.org/packages/56/91/d27f20fa6fedc0ca0c20d069cb701ec71f59a6add10fbc18a695a54e01a8/snpmanifold-0.0.6.tar.gz",
    "platform": null,
    "description": "# SNPmanifold\n\nSNPmanifold is a Python package that learns a representative manifold for single cells based on their SNPs (Single-Nucleotide Polymorphisms) using VAE (Variational AutoEncoder) and UMAP (Uniform Manifold Approximation and Projection). It takes AD matrix, DP matrix, and VCF (or variant_name.tsv) as inputs. You can compile them from bam file(s) either conveniently by cellSNP-lite or by your custom scripts.\n\nSNPmanifold first performs simple filtering on AD matrix and DP matrix for high-quality cells and SNPs. It then trains VAE and UMAP to learn a representative manifold for single cells according to their allele frequency of different SNPs (AF = AD/DP). Finally, it classifies cells into clones and infer their phylogeny based on the manifold. \n\n## Installation\n\nQuick install can be achieved via pip\n\n```bash\n# for published version\npip install -U SNPmanifold\n\n# or developing version\npip install -U git+https://github.com/StatBiomed/SNPmanifold\n```\n\nOr set a conda environment before installing (credits to Xinyi Lin).\nReplace `$myenv` with the environment name you prefer.\n\n```bash\nconda create -n $myenv python=3.8\nconda activate $myenv\n\npip install -U git+https://github.com/StatBiomed/SNPmanifold\n```\n\n## Quick Usage\n\nFull documentation is at https://SNPmanifold.readthedocs.io. \n\nHere is a quick start:\n\n1. Import SNPmanifold and create an object of the class SNP_VAE.\n\n```python\nfrom SNPmanifold import SNP_VAE\n```\n\n2. Run 4 methods (filtering, training, clustering, phylogeny) in order.\n\n  Each method can rerun sperately without reruning prior methods. \n\n* The [demo page](https://snpmanifold.readthedocs.io/en/latest/SNPmanifold_demo.html) \n  and notebook [SNPmanifold_demo.ipynb](./SNPmanifold_demo.ipynb) show \n  a demo for quick usage of SNPmanifold on MKN45 cancer cell line using \n  mitochondrial SNPs.\n\n* See how to use it via the [API page](https://snpmanifold.readthedocs.io/en/latest/API.html#main-object).\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "SNPmanifold:  Manifold learning for single-cell SNVs",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://github.com/StatBiomed/SNPmanifold"
    },
    "split_keywords": [
        "manifold learning",
        " variational autoencoder",
        " single-cell single-nucleotide variations",
        " phylogenetic reconstruction"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5691d27f20fa6fedc0ca0c20d069cb701ec71f59a6add10fbc18a695a54e01a8",
                "md5": "cdc41d482f0ac5b878083a66949cd75e",
                "sha256": "71e60825e5ad89fc3e76b45daaabc4848f4083859c2e2e301c9ebfdb09837d65"
            },
            "downloads": -1,
            "filename": "snpmanifold-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "cdc41d482f0ac5b878083a66949cd75e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 20128,
            "upload_time": "2024-09-22T17:27:36",
            "upload_time_iso_8601": "2024-09-22T17:27:36.941938Z",
            "url": "https://files.pythonhosted.org/packages/56/91/d27f20fa6fedc0ca0c20d069cb701ec71f59a6add10fbc18a695a54e01a8/snpmanifold-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-22 17:27:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "StatBiomed",
    "github_project": "SNPmanifold",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "anndata",
            "specs": [
                [
                    ">=",
                    "0.6"
                ]
            ]
        },
        {
            "name": "scanpy",
            "specs": []
        },
        {
            "name": "leidenalg",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.18.0"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.4.1"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    ">=",
                    "0.23.0"
                ]
            ]
        },
        {
            "name": "networkx",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.1.2"
                ]
            ]
        },
        {
            "name": "seaborn",
            "specs": [
                [
                    ">=",
                    "0.10.0"
                ]
            ]
        },
        {
            "name": "torch",
            "specs": []
        },
        {
            "name": "scikit-learn",
            "specs": [
                [
                    ">=",
                    "0.23"
                ]
            ]
        },
        {
            "name": "umap-learn",
            "specs": [
                [
                    ">=",
                    "0.5.3"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": []
        }
    ],
    "lcname": "snpmanifold"
}
        
Elapsed time: 1.73343s