cap-sc-client
The cap-sc-client package provides a simple interface to interact with the Cell Annotation Platform (CAP) GraphQL API. The package allows to search for datasets, cell labels metadata and get molecular profiles of cell types published on CAP.
Installation
pip install -U cap-sc-client
Basic usage
The main goal of this package is to provide an interace to access CAP datasets and cell annotation metadata (including marker genes, synonyms, rationales, etc.) via standard python tooling. The outputs are in the format pandas DataFrame, which could be converted to other formats (csv, JSON, etc.) if the user desires.
>>> from cap_sc_client import CapClient
>>> cp = CapClient()
>>> datasets = cp.search_datasets(limit=5, offset=0, organism=["Homo sapiens"])
>>> datasets.head()
id name cell_count project
0 1427 Skin fibroblasts - Pan-d... 337376.0 {'id': '613', 'name': 'Pan...
1 1426 Skin fibroblast scRNA-seq ... 153546.0 {'id': '613', 'name': 'Pan...
2 1157 Single cell atlas of the h... 72788.0 {'id': '544', 'name': 'Sin...
3 1156 snRNA-seq of human retina ... 3177310.0 {'id': '544', 'name': 'Sin...
4 1154 snRNA-seq of human retina ... 691008.0 {'id': '544', 'name': 'Sin...
>>> labels = cp.search_cell_labels(limit=10, offset=0)
>>> labels[["full_name", "ontology_term_exists", "marker_genes"]]
full_name ontology_term_exists marker_genes
0 cycling stromal ... True [MKI67, TOP2A, C...
1 alveolar type 1 ... True [PDPN, HOPX]
2 mesoderm 2 (ZEB2) False [ZEB2]
3 acinar cell True [PRSS1]
4 neuron True [STMN2]
5 smooth muscle cell True [DES, CNN1, ACTA...
6 ciliated cell True [FOXJ1]
7 Schwann cell True [MPZ]
8 pancreatic cells False [PDX1]
9 club cell True [SCGB1A1]
There is also an MDSession class that allows users to interact with the molecular profiles of cell types within a specific dataset. However, this class requires users to be familiar with the CAP MD page.
For more examples, please refer to "examples" and the GitHub wiki for detailed documentation.
Documentation
Detailed documentation is available on GitHub Wiki.
Metadata
Release files for cap_sc_client 2.10.0
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 |
|---|---|---|---|---|
| cap_sc_client-2.10.0.tar.gz | 21.3 kB | Without provenance | Details for cap_sc_client-2.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cap_sc_client-2.10.0-py3-none-any.whl | Python 3 | none | any | Details for cap_sc_client-2.10.0-py3-none-any.whl |
Total release size: 48.5 kB
Release files / cap_sc_client-2.10.0.tar.gz
| Download URL | cap_sc_client-2.10.0.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
baafd1f149bcc946f32afb038f60eaeb68296992c19939c7a2f7eab01f42f769
|
|
BLAKE2b-256 checksum How to use checksums |
15aaec2ecf981ba97f64772bc357887f3ef5c320ccd1c15ca650a3afbf0874d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|
Release files / cap_sc_client-2.10.0-py3-none-any.whl
| Download URL | cap_sc_client-2.10.0-py3-none-any.whl |
|---|---|
| Size | 27.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11444378e9746ae70db20bca22b9728e2b6c453011be127600800c0a53cf1c47
|
|
BLAKE2b-256 checksum How to use checksums |
18d15cb725191076e1e1503a9cb36c3e0ad0898b973c91a97039037f0249e031
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.5
|
Security for cap_sc_client 2.10.0
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.