CellCover


NameCellCover JSON
Version 0.1.9 PyPI version JSON
download
home_page
SummaryCellCover
upload_time2023-08-17 20:30:34
maintainer
docs_urlNone
authorLaurent Younes
requires_python
license
keywords python single-cell marker gene
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# CellCover

This is the python version of CellCover. To run CellCover, Gurobi installation is necessary. Please follow the README.md in [lanlanji/CoveringPackage (github.com)](https://github.com/lanlanji/CoveringPackage) to acquire and install the Gurobi academic liscence.

### Installing CellCover:

```python
pip install CellCover
```

### Using CellCover to obtain marker panel

To run the CelCover, the following python variables need to be define first: 

- **data**: a numpy array of your single cell RNA-seq data with shape (N,G) where N is the number of cells and G is the size of the gene portfolio.

- **gene**: a numpy array of gene names with shape (G,)

- **CellTypeLabels**: a numpy array of cell types with shape (N,)

- **CellTypeNames**: a numpy array of distinct cell type names (string)

- **ct**: a single string of the cell type name that user want to find covering markers for, e.g. "CD4"

What is more, there is a list of hyperparameters that need to be defined before running the covering:

- **binarization_threshold**: the threshold above which we binarize the gene expression to 1, below which we binarize the gene expression to 0 

- **minSize**: the depth of covering

- **alpha**: 1 - covering rate. The default is $0.05$

- **te**: This is a parameter for pruning the data. For each cell type, the gene expressing more than te * 100 percent of time are selected for finding the covering markers. The default is $0.1$.

- **top_num_gene**: This is another pruning parameter. In each class, **top_num_gene** number of genes with the highest margin score will be selected for marker selection. The default is $6000$.

The pipeline of getting the covering marker panel of the user defined cell type **ct** is

```python
from CellCover import binarization
from CellCover import SensList
from CellCover import weight
from CellCover import covering
from CellCover import getCoveringVariables
data = binarization(mat = data, binarization_threshold =  binarization_threshold)
sens = SensList(mat = data, CellTypeLabels =  CellTypeLabels, CellTypeNames=CellTypeNames)
X,w,g = weight(mat = data,sens =sens, CellTypeLabels = CellTypeLabels, CellTypeNames = CellTypeNames, ct = ct,gene = gene)
cov = covering(Z=X, minSize = minSize, alpha = alpha,weights = w)
marker = getCoveringVariables(cov, ngenes = len(g), geneNames = g, nlevels = 1)

```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "CellCover",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,single-cell,marker gene",
    "author": "Laurent Younes",
    "author_email": "<laurent.younes@jhu.edu>",
    "download_url": "https://files.pythonhosted.org/packages/ef/88/f6298dd86ae90fbe8e04a0e05a9e4bc24fa9139e7968638156280a76ea8b/CellCover-0.1.9.tar.gz",
    "platform": null,
    "description": "\n# CellCover\n\nThis is the python version of CellCover. To run CellCover, Gurobi installation is necessary. Please follow the README.md in [lanlanji/CoveringPackage (github.com)](https://github.com/lanlanji/CoveringPackage) to acquire and install the Gurobi academic liscence.\n\n### Installing CellCover:\n\n```python\npip install CellCover\n```\n\n### Using CellCover to obtain marker panel\n\nTo run the CelCover, the following python variables need to be define first: \n\n- **data**: a numpy array of your single cell RNA-seq data with shape (N,G) where N is the number of cells and G is the size of the gene portfolio.\n\n- **gene**: a numpy array of gene names with shape (G,)\n\n- **CellTypeLabels**: a numpy array of cell types with shape (N,)\n\n- **CellTypeNames**: a numpy array of distinct cell type names (string)\n\n- **ct**: a single string of the cell type name that user want to find covering markers for, e.g. \"CD4\"\n\nWhat is more, there is a list of hyperparameters that need to be defined before running the covering:\n\n- **binarization_threshold**: the threshold above which we binarize the gene expression to 1, below which we binarize the gene expression to 0 \n\n- **minSize**: the depth of covering\n\n- **alpha**: 1 - covering rate. The default is $0.05$\n\n- **te**: This is a parameter for pruning the data. For each cell type, the gene expressing more than\u00a0te\u00a0* 100 percent of time are selected for finding the covering markers. The default is\u00a0$0.1$.\n\n- **top_num_gene**: This is another pruning parameter. In each class,\u00a0**top_num_gene**\u00a0number of genes with the highest margin score will be selected for marker selection. The default is $6000$.\n\nThe pipeline of getting the covering marker panel of the user defined cell type **ct** is\n\n```python\nfrom CellCover import binarization\nfrom CellCover import SensList\nfrom CellCover import weight\nfrom CellCover import covering\nfrom CellCover import getCoveringVariables\ndata = binarization(mat = data, binarization_threshold =  binarization_threshold)\nsens = SensList(mat = data, CellTypeLabels =  CellTypeLabels, CellTypeNames=CellTypeNames)\nX,w,g = weight(mat = data,sens =sens, CellTypeLabels = CellTypeLabels, CellTypeNames = CellTypeNames, ct = ct,gene = gene)\ncov = covering(Z=X, minSize = minSize, alpha = alpha,weights = w)\nmarker = getCoveringVariables(cov, ngenes = len(g), geneNames = g, nlevels = 1)\n\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "CellCover",
    "version": "0.1.9",
    "project_urls": null,
    "split_keywords": [
        "python",
        "single-cell",
        "marker gene"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "414af9bd6e0fb30f3c269574504202f3a910e48ddf8c2e274fa80b430b51b88c",
                "md5": "5ae4cc21f25bccbce72024f477fd629d",
                "sha256": "c8e504c75815e6e68e7ce73cb5c6ef13420fdffc13e08e18f7fd3c2283674f12"
            },
            "downloads": -1,
            "filename": "CellCover-0.1.9-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ae4cc21f25bccbce72024f477fd629d",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 4145,
            "upload_time": "2023-08-17T20:30:32",
            "upload_time_iso_8601": "2023-08-17T20:30:32.851036Z",
            "url": "https://files.pythonhosted.org/packages/41/4a/f9bd6e0fb30f3c269574504202f3a910e48ddf8c2e274fa80b430b51b88c/CellCover-0.1.9-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef88f6298dd86ae90fbe8e04a0e05a9e4bc24fa9139e7968638156280a76ea8b",
                "md5": "9bd8b87e09f8c67f4c5eb0f4ec7e74da",
                "sha256": "68310a770ef3509340767f459674a043ccbcaec8b1f1b791799d8af3fe6c7a6f"
            },
            "downloads": -1,
            "filename": "CellCover-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "9bd8b87e09f8c67f4c5eb0f4ec7e74da",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3929,
            "upload_time": "2023-08-17T20:30:34",
            "upload_time_iso_8601": "2023-08-17T20:30:34.604525Z",
            "url": "https://files.pythonhosted.org/packages/ef/88/f6298dd86ae90fbe8e04a0e05a9e4bc24fa9139e7968638156280a76ea8b/CellCover-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-17 20:30:34",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "cellcover"
}
        
Elapsed time: 0.25687s