cell type annotation with scRNA sequencing data using any marker gene sets
Project description
CellTypeMark
CellTypeMark is a Python package for cell type annotation in single-cell RNA sequencing data using marker genes. It provides tools for scoring and annotating cell types based on predefined marker gene sets.
Features
- Score cell types using marker genes (using scanpy score_genes)
- Automatic cell type annotation based on marker gene expression
- Visualization of cell type annotations
- Integration with Scanpy and AnnData objects
- Support for custom marker gene sets
Installation
pip install celltypemark
Usage
import scanpy as sc
import celltypemark as ctm
# Load your AnnData object
adata = sc.read_h5ad("your_data.h5ad")
# Score cell types using default marker genes
adata = ctm.score(adata, ctm.marker_genes)
# Score cell types using specified marker genes
## Example, Tabula_Muris
from pathlib import Path
resource_path = Path("your gene marker file")
marker_genes = ctm.load_resource(resource_path, resource_url='https://maayanlab.cloud/Enrichr/geneSetLibrary?mode=text&libraryName=Tabula_Muris')
# For using marker sets from enrichr, uppercase var_names
adata.var_names = adata.var_names.str.upper()
adata = ctm.score(adata, marker_genes)
# Annotate cell types
adata = ctm.mark(adata, ctm.marker_genes, by='leiden', save='results', plot=True)
Output
Add in the adata.obs:
- the scores of the keys in the gene sets for each observation
- the predicted key for each observation
- (if by) the predicted key for each by group, e.g., leiden
- (if save) save the scores of the keys for each by group in a txt file and the heatmap of the data under cellmarkoutput/
Dependencies
- scanpy
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Citation
If you use CellTypeMark in your research, please cite:
@software{celltypemark2024,
author = {brainfo},
title = {CellTypeMark: A Python package for cell type annotation in single-cell RNA sequencing data},
year = {2024},
publisher = {GitHub},
url = {https://github.com/yourusername/celltypemark}
}
Copyright (c) 2024
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file celltypemark-0.3.0.tar.gz.
File metadata
- Download URL: celltypemark-0.3.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d70755fe130dfdefeee95e35a179927325534629d1916e757b2e8e6b62a28242
|
|
| MD5 |
1787eb5bc28f0bbfc5ea6a173ab7db86
|
|
| BLAKE2b-256 |
644b1b43e9fdacffeea7691312af85303dd5cf0ef3b25c427c59c05c9648868f
|
File details
Details for the file celltypemark-0.3.0-py3-none-any.whl.
File metadata
- Download URL: celltypemark-0.3.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c9aa12523cc55d66485a85382cd72acc56b558621c01043532794b3f8037ac0
|
|
| MD5 |
f94ddbb689d71ee95685dc513f2191c7
|
|
| BLAKE2b-256 |
62e8760a4848be7700b1fac04550ab465109ba28e69da86380fe486417fb019d
|