This code provides a python package for mapping single sell RNA sequencing data onto a cell type taxonomy such as those provided by the Allen Institute for Brain Science. It is the backend implementation of the "Correlation Mapping" and "Hierarchical Mapping" algorithms in the Allen Institute's online MapMyCells tool.
To install this library, run
pip install cell_type_mapper@git+https://github.com/AllenInstitute/cell_type_mapper
To install a specific version run
pip install cell_type_mapper@git+https://github.com/AllenInstitute/cell_type_mapper@{version}
e.g.
pip install cell_type_mapper@git+https://github.com/AllenInstitute/[email protected]
A list of valid version tags can be found on this page.
This package has been tested extensively with python 3.12. We have no reason to believe that it will not also run with any python >= 3.10
In addition to the documentation referenced below, we provide several Jupyter notebooks detailing common use cases for this code.
The code in this repository provides the backend for the Allen Institute's online MapMyCells tool. This notebook walks the user through the process of downloading actual data, formatting it to be submitted to MapMyCells, and then downloading and interpreting the results. You may also want to consult this page for detailed documentation of the output produced by the mapping code.
If you want to run the code on your own machine, but still want to map to the taxonomies supported by the on-line MapMyCells tool, consult this page and Section 8 of this Jupyter notebook.
This Jupyter notebook downloads data defining two older (~ 2021) Allen Institute taxonomies, one mouse and one human. It walks the user through the process of formatting these taxonomies for use with MapMyCells and then performs mapping, both cross-validation mapping and a mapping of human data onto the mouse taxonomy. It also demonstrates mapping the human data onto the Yao et al. 2023 Whole Mouse Brain taxonomy.
This Jupyter notebook walks the user through the process of creating a new taxonomy from cartoon data (generated by the notebook) and mapping unlabeled data to that taxonomy.
This Jupyter notebook downloads rat data from Phillips et al. 2022 and maps it onto the Yao et al. 2023 Whole Mouse Brain taxonomy. It demonstrates the general pattern for mapping data from one species onto a taxonomy defined in another spcies.
This Jupyter notebook downloads data defining two older (~ 2021) Allen Institute taxonomies, one mouse and one human. It walks the user through the process of formatting these taxonomies for use with MapMyCells and then maps the human data onto both the older mouse taxonomy as well as the Yao et al. 2023 Whole Mouse Brain taxonomy.
This Jupyter notebook walks the user through the process of downloading a subset of the Allen Institute's Whole Mouse Brain data using the abc_atlas_access tool, creating a taxonomy based solely on that subset of the data, and mapping data to that new taxonomy.
The recommended workflow for running this code is here.
Documentation of the output produced by this code can be found here.
We are providing this tool to the community and any and all who want to use it. Issues and pull requests are welcome, however, this code is also intended as part of the backend for the Allen Institute Brain Knowledge Platform. As such, issues and pull requests may be declined if they interfere with the functionality required to support that service.