Skip to main content

CAME

DOI

English | 简体中文

CAME is a tool for Cell-type Assignment and Module Extraction, based on a heterogeneous graph neural network.

For detailed usage, please refer to CAME-Documentation.

CAME outputs the quantitative cell-type assignment for each query cell, that is, the probabilities of cell types that exist in the reference species, which enables the identification of the unresolved cell states in the query data.

Besides, CAME gives the aligned cell and gene embeddings across species, which facilitates low-dimensional visualization and joint gene-module extraction.

Installation

It's recommended to create a conda environment for running CAME:

conda create -n env_came python=3.8
conda activate env_came

Install required packages:

# on CPU
pip install "scanpy[leiden]"
pip install torch  # >=1.8 
pip install dgl  # tested on 0.7.2, better below 1.0.*

See Scanpy, PyTorch and DGL for detailed installation guide (especially for GPU version).

Install CAME by PyPI:

pip install came

Install the developmental version of CAME from source code:

git clone https://github.com/XingyanLiu/CAME.git
cd CAME
python setup.py install

Example data

The test code is based on the sample data attached to the CAME package. It is initially saved in compressed form (CAME/came/sample_data.zip), and will be automatically decompressed to the default directory (CAME/came/sample_data/) when necessary, which contains the following files:

  • gene_matches_1v1_human2mouse.csv (optional)
  • gene_matches_1v1_mouse2human.csv (optional)
  • gene_matches_human2mouse.csv
  • gene_matches_mouse2human.csv
  • raw-Baron_mouse.h5ad
  • raw-Baron_human.h5ad

You can access these data by came.load_example_data().

If you tend to apply CAME to analyze your own datasets, you need to prepare at least the last two files for the same species (e.g., cross-dataset integration);

For cross-species analysis, you need to provide another .csv file where the first column contains the genes in the reference species and the second contains the corresponding query homologous genes.

NOTE: the file raw-Baron_human.h5ad is a subsample from the original data for code testing. The resulting annotation accuracy may not be as good as using the full dataset as the reference.

Suggestions

If you have sufficient GPU memory, setting the hidden-size h_dim=512 in "came/PARAMETERS.py" may result in a more accurate cell-type transfer.

Test CAME's pipeline (optional)

To test the package, run the python file test_pipeline.py:

# test_pipeline.py
import came

if __name__ == '__main__':
    came.__test1__(6, batch_size=2048)
    came.__test2__(6, batch_size=None)
python test_pipeline.py 

Contribute

Support

If you are having issues, please let us know. We have a mailing list located at:

Citation

If CAME is useful for your research, consider citing our work:

Liu X, Shen Q, Zhang S. Cross-species cell-type assignment of single-cell RNA-seq by a heterogeneous graph neural network[J]. Genome Research, 2022: gr. 276868.122.

Preprint: https://doi.org/10.1101/2021.09.25.461790

Release files for came 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for came 0.1.13
File Size Uploaded
came-0.1.13.tar.gz 16.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for came 0.1.13
File Interpreter ABI Platform
came-0.1.13-py3-none-any.whl Python 3 none any Details

Total release size: 32.3 MB

Release files / came-0.1.13.tar.gz

Download URL came-0.1.13.tar.gz
Size 16.1 MB
Tags Source
SHA-256 checksum
How to use checksums
245538199f1225388d5d4a12f14afbd8846c0bc81c3f312d566f747ba67a2309
BLAKE2b-256 checksum
How to use checksums
2d80b25e2fe76442d0c833dd5f8e9ca015b687fc52b414460d4934ef4850872a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.8

Release files / came-0.1.13-py3-none-any.whl

Download URL came-0.1.13-py3-none-any.whl
Size 16.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7fdb1a65006ca668e0cab51576a09bf540f074346e5f120ec654cd4f91627f7d
BLAKE2b-256 checksum
How to use checksums
1061178f646c249b408fd0931cf626e3868409ff081513c7d9695de961db28d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.8

Release history Release notifications | RSS feed

This release

0.1.13 This release

2 release files

0.1.12

2 release files

0.1.11

1 release file

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page