-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from cellarium-ai/mb-docs-update
Update CAS documentation
- Loading branch information
Showing
7 changed files
with
105 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,32 @@ | ||
# Cellarium Cell Annotation Service (CAS) Client | ||
<img src="https://cellarium.ai/wp-content/uploads/2024/07/cellarium-logo-medium.png" alt="Cellarium Logo" width="180"> | ||
|
||
# Cellarium Cell Annotation Service (CAS) Client Library | ||
This codebase contains the Python client library for using Cellarium Cell Annotation Service (CAS). | ||
|
||
# Installation | ||
The cellarium-cas package officially supports Python versions between 3.7 and 3.10. We recommend using Python 3.10. | ||
You can install CAS from PyPI using `pip`. To install the latest version, please run the following command: | ||
``` | ||
$ pip install cellarium-cas | ||
``` | ||
# Usage | ||
To use Cellarium CAS, create a client instance with your API token: | ||
|
||
```python3 | ||
from cellarium.cas import CASClient | ||
|
||
api_token = "a_very_long_string_with_some_symbols" | ||
cas = CASClient( | ||
api_token=api_token, | ||
api_url="<optional url to connect to a non-standard CAS server>" | ||
) | ||
To install a specific version `version_number`, you can use the following command: | ||
``` | ||
|
||
## Annotation | ||
You can annotate 10x Cell Ranger h5 matrices from local disk: | ||
```python3 | ||
|
||
response = cas.annotate_10x_h5_file(filepath="your_path_to_local_h5_file.h5") | ||
$ pip install cellarium-cas==<version_number> | ||
``` | ||
or an anndata file from local disk: | ||
```python3 | ||
response = cas.annotate_anndata_file(filepath="your_path_to_local_h5_file.h5ad") | ||
If you wish to use visualization features, you can install the package with the visualization extras: | ||
``` | ||
$ pip install cellarium-cas[vis] | ||
``` | ||
or a previously loaded (unnormalized) anndata object: | ||
```python3 | ||
import anndata | ||
|
||
# Obtaining an API Token | ||
You need an API token to use CAS. We are offerring a free public beta program for a limited time to try CAS and explore ways it can enhance your cell biology research. To obtain your unique API token to join the public beta program, please navigate to the CAS webpage at [cellarium.ai](https://cellarium.ai/tool/cellarium-cell-annotation-service-cas/), scroll to the bottom of the page, and [sign up](https://cellarium.ai/cell-annotation-service-cas-access/). We will contact you with your unique API key as soon as the public beta is available. | ||
|
||
adata = anndata.read("you_anndata_file.h5ad") | ||
response = cas.annotate_anndata(adata) | ||
``` | ||
# Quickstart Tutorial | ||
The fastest way to get started with using CAS is to follow the quickstart tutorial: | ||
[Click here to open the quickstart tutorial on GitHub](notebooks/quickstart_tutorial.ipynb) | ||
|
||
It is even easier to go through the quickstart tutorial on Google Colab. Remember, you still need an API key to successfully run through the tutorial: | ||
[Click here to open the quickstart tutorial on Google Colab](https://colab.research.google.com/drive/1m9zgqP5n7E4pGGCg5RjfvlCnS6uqUdSa) | ||
|
||
# Documentation | ||
Please visit the project's [ReadTheDocs page](https://cellarium-cas.readthedocs.io/) for additional documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters