cellxgene-census


Namecellxgene-census JSON
Version 1.16.2 PyPI version JSON
download
home_pageNone
SummaryAPI to facilitate the use of the CZ CELLxGENE Discover Census. For more information about the API and the project visit https://github.com/chanzuckerberg/cellxgene-census/
upload_time2024-10-07 19:44:01
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # CZ CELLxGENE Discover Census

The `cellxgene_census` package provides an API to facilitate the use of the CZ CELLxGENE Discover Census. For more information about the API and the project visit the [chanzuckerberg/cellxgene-census GitHub repo](https://github.com/chanzuckerberg/cellxgene-census/).

## For More Help

For more help, please file a issue on the repo, or contact us at <soma@chanzuckerberg.com>.

If you believe you have found a security issue, we would appreciate notification. Please send email to <security@chanzuckerberg.com>.

## Development Environment Setup

- Create a virtual environment using `venv` or `conda`
- `cd` to the root of this repository
- `pip install -e api/python/cellxgene_census`
- To install dependencies needed to work on the [experimental](./src/cellxgene_census/experimental/) portion of the API:
  `pip install -e 'api/python/cellxgene_census[experimental]'`.
- `pip install jupyterlab`
- **Test it!** Either open up a new `jupyter` notebook or the `python` interpreter and run this code:

```python
import cellxgene_census

with cellxgene_census.open_soma() as census:

    cell_metadata = cellxgene_census.get_obs(
        census,
        "homo_sapiens",
        value_filter = "sex == 'female' and cell_type in ['microglial cell', 'neuron']",
        column_names = ["assay", "cell_type", "tissue", "tissue_general", "suspension_type", "disease"]
    )
    cell_metadata
```

The output is a `pandas.DataFrame` with over 600K cells meeting our query criteria and the selected columns:

```python

The "stable" release is currently 2023-12-15. Specify 'census_version="2023-12-15"' in future calls to open_soma() to ensure data consistency.

                assay        cell_type                 tissue tissue_general suspension_type disease     sex
0        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female
1        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female
2        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female
3        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female
4        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female
...               ...              ...                    ...            ...             ...     ...     ...
607636  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female
607637  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female
607638  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female
607639  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female
607640  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female

[607641 rows x 7 columns]

```

- Learn more about the Census API by going through the tutorials in the [notebooks](../notebooks/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cellxgene-census",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Chan Zuckerberg Initiative Foundation <soma@chanzuckerberg.com>",
    "download_url": "https://files.pythonhosted.org/packages/f5/3e/5482ec97c597853106172293341e7592fdcea4d1c89f592d0083899a7d49/cellxgene_census-1.16.2.tar.gz",
    "platform": null,
    "description": "# CZ CELLxGENE Discover Census\n\nThe `cellxgene_census` package provides an API to facilitate the use of the CZ CELLxGENE Discover Census. For more information about the API and the project visit the [chanzuckerberg/cellxgene-census GitHub repo](https://github.com/chanzuckerberg/cellxgene-census/).\n\n## For More Help\n\nFor more help, please file a issue on the repo, or contact us at <soma@chanzuckerberg.com>.\n\nIf you believe you have found a security issue, we would appreciate notification. Please send email to <security@chanzuckerberg.com>.\n\n## Development Environment Setup\n\n- Create a virtual environment using `venv` or `conda`\n- `cd` to the root of this repository\n- `pip install -e api/python/cellxgene_census`\n- To install dependencies needed to work on the [experimental](./src/cellxgene_census/experimental/) portion of the API:\n  `pip install -e 'api/python/cellxgene_census[experimental]'`.\n- `pip install jupyterlab`\n- **Test it!** Either open up a new `jupyter` notebook or the `python` interpreter and run this code:\n\n```python\nimport cellxgene_census\n\nwith cellxgene_census.open_soma() as census:\n\n    cell_metadata = cellxgene_census.get_obs(\n        census,\n        \"homo_sapiens\",\n        value_filter = \"sex == 'female' and cell_type in ['microglial cell', 'neuron']\",\n        column_names = [\"assay\", \"cell_type\", \"tissue\", \"tissue_general\", \"suspension_type\", \"disease\"]\n    )\n    cell_metadata\n```\n\nThe output is a `pandas.DataFrame` with over 600K cells meeting our query criteria and the selected columns:\n\n```python\n\nThe \"stable\" release is currently 2023-12-15. Specify 'census_version=\"2023-12-15\"' in future calls to open_soma() to ensure data consistency.\n\n                assay        cell_type                 tissue tissue_general suspension_type disease     sex\n0        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female\n1        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female\n2        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female\n3        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female\n4        Smart-seq v4  microglial cell  middle temporal gyrus          brain         nucleus  normal  female\n...               ...              ...                    ...            ...             ...     ...     ...\n607636  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female\n607637  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female\n607638  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female\n607639  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female\n607640  microwell-seq           neuron          adrenal gland  adrenal gland            cell  normal  female\n\n[607641 rows x 7 columns]\n\n```\n\n- Learn more about the Census API by going through the tutorials in the [notebooks](../notebooks/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "API to facilitate the use of the CZ CELLxGENE Discover Census. For more information about the API and the project visit https://github.com/chanzuckerberg/cellxgene-census/",
    "version": "1.16.2",
    "project_urls": {
        "homepage": "https://github.com/chanzuckerberg/cellxgene-census",
        "repository": "https://github.com/chanzuckerberg/cellxgene-census"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72cd698e57ba5e2780f94dcd1fc0580236b9e5f5be090413316afa2292ee23b5",
                "md5": "c7df588a4d3d4ced5308b4aea0c5f2e3",
                "sha256": "1a8694fea8ee6a9e93157540b22eddbf59c5b23997b583f08505c4b57d92e3bf"
            },
            "downloads": -1,
            "filename": "cellxgene_census-1.16.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c7df588a4d3d4ced5308b4aea0c5f2e3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 54814,
            "upload_time": "2024-10-07T19:43:59",
            "upload_time_iso_8601": "2024-10-07T19:43:59.726271Z",
            "url": "https://files.pythonhosted.org/packages/72/cd/698e57ba5e2780f94dcd1fc0580236b9e5f5be090413316afa2292ee23b5/cellxgene_census-1.16.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f53e5482ec97c597853106172293341e7592fdcea4d1c89f592d0083899a7d49",
                "md5": "50c16ebce6bc410f27a16c3a51cd6938",
                "sha256": "c007031b1e42b320a191ff1f20ea4099ea935fe5416dffcd710b0e4a94c28ce1"
            },
            "downloads": -1,
            "filename": "cellxgene_census-1.16.2.tar.gz",
            "has_sig": false,
            "md5_digest": "50c16ebce6bc410f27a16c3a51cd6938",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 124045,
            "upload_time": "2024-10-07T19:44:01",
            "upload_time_iso_8601": "2024-10-07T19:44:01.712732Z",
            "url": "https://files.pythonhosted.org/packages/f5/3e/5482ec97c597853106172293341e7592fdcea4d1c89f592d0083899a7d49/cellxgene_census-1.16.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-07 19:44:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chanzuckerberg",
    "github_project": "cellxgene-census",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "cellxgene-census"
}
        
Elapsed time: 0.35052s