Metadata-Version: 2.1
Name: cellarium-cas
Version: 1.4.11
Summary: Cellarium Cell Annotation Service client tool
Author-email: Cellarium CAS <cas-support@broadinstitute.org>
License: BSD 3-Clause License
        
        Copyright (c) 2023, Broad Institute
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://cellarium.ai
Project-URL: Source Code, https://github.com/cellarium-ai/cellarium-cas
Project-URL: Bug Tracker, https://github.com/cellarium-ai/cellarium-cas/issues
Project-URL: Discussion Forum, https://github.com/cellarium-ai/cellarium-cas/discussions
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp[speedups] <4,>=3.8
Requires-Dist: requests <2.33,>=2.31
Requires-Dist: anndata <0.9,>=0.8
Requires-Dist: pandas <2.1,>=1.3
Requires-Dist: numpy <1.26,>=1.21
Requires-Dist: nest-asyncio ~=1.5
Requires-Dist: certifi ==2023.7.22
Requires-Dist: Deprecated ~=1.2
Requires-Dist: tqdm ~=4.66
Requires-Dist: typing-extensions ~=4.7.1
Requires-Dist: owlready2
Requires-Dist: networkx
Provides-Extra: docs
Requires-Dist: Pillow ~=9.5 ; extra == 'docs'
Requires-Dist: Sphinx ~=7.2 ; extra == 'docs'
Requires-Dist: sphinx-gallery ~=0.14 ; extra == 'docs'
Requires-Dist: sphinx-rtd-theme ~=1.3 ; extra == 'docs'
Requires-Dist: setuptools-git-versioning ==1.13.5 ; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest ~=7.3 ; extra == 'test'
Requires-Dist: coverage ~=4.5 ; extra == 'test'
Requires-Dist: click ~=8.0 ; extra == 'test'
Requires-Dist: mockito >=1.5.0 ; extra == 'test'
Requires-Dist: parameterized >=0.9.0 ; extra == 'test'
Provides-Extra: vis
Requires-Dist: scanpy[leiden] <1.9.6,>=1.9.0 ; extra == 'vis'
Requires-Dist: biopython ; extra == 'vis'
Requires-Dist: plotly ; extra == 'vis'
Requires-Dist: dash ; extra == 'vis'
Requires-Dist: dash-bootstrap-components ; extra == 'vis'

# Cellarium Cell Annotation Service (CAS) Client
This codebase contains the Python client library for using Cellarium Cell Annotation Service (CAS).

# Installation
```
$ 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>"
)
```

## 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")
```
or an anndata file from local disk:
```python3
response = cas.annotate_anndata_file(filepath="your_path_to_local_h5_file.h5ad")
```
or a previously loaded (unnormalized) anndata object:
```python3
import anndata


adata = anndata.read("you_anndata_file.h5ad")
response = cas.annotate_anndata(adata)
```
