ZJU-Fangyin
commited on
Commit
•
5b55003
1
Parent(s):
cca7fbc
Upload 8 files
Browse files- README.md +122 -0
- figures/example1.jpg +0 -0
- figures/example2.jpg +0 -0
- figures/example3.jpg +0 -0
- figures/example4.jpg +0 -0
- figures/intro.jpg +0 -0
- figures/logo.png +0 -0
- figures/overview.jpg +0 -0
README.md
CHANGED
@@ -1,3 +1,125 @@
|
|
1 |
---
|
2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
pipeline_tag: text-generation
|
4 |
+
tags:
|
5 |
+
- biology
|
6 |
+
- single-cell
|
7 |
+
- single-cell analysis
|
8 |
+
- text-generation-inference
|
9 |
---
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
<div align="center">
|
15 |
+
|
16 |
+
<img src="./figures/logo.png" alt="image" width=8%>
|
17 |
+
|
18 |
+
<h2 align="center"> ChatCell: Facilitating Single-Cell Analysis with Natural Language </h2>
|
19 |
+
|
20 |
+
<p align="center">
|
21 |
+
<a href="https://www.zjukg.org/project/ChatCell">💻 Project Page</a> •
|
22 |
+
<a href="https://huggingface.co/datasets/zjunlp/ChatCell-Instructions">🤗 Dataset</a> •
|
23 |
+
<a href="https://huggingface.co/spaces/zjunlp/Chatcell">🍎 Demo</a> •
|
24 |
+
<a href="#1">🏖️ Overview</a> •
|
25 |
+
<a href="#2">🧬 Single-cell Analysis Tasks</a> •
|
26 |
+
<a href="#3">🛠️ Quickstart</a> •
|
27 |
+
<a href="#4">📝 Cite</a>
|
28 |
+
</p>
|
29 |
+
|
30 |
+
|
31 |
+
<img src="./figures/intro.jpg" alt="image" width=60%>
|
32 |
+
<b>ChatCell</b> allows researchers to input instructions in either natural or single-cell language, thereby facilitating the execution of necessary tasks in single-cell analysis. Black and red texts denote human and single-cell language, respectively.
|
33 |
+
|
34 |
+
</div>
|
35 |
+
|
36 |
+
|
37 |
+
## 📌 Table of Contents
|
38 |
+
|
39 |
+
- [🏖️ Overview](#1)
|
40 |
+
- [🧬 Single-cell Analysis Tasks](#2)
|
41 |
+
- [🛠️ Quickstart](#3)
|
42 |
+
- [📝 Cite](#4)
|
43 |
+
|
44 |
+
|
45 |
+
---
|
46 |
+
|
47 |
+
<h2 id="1">🏖️ Overview</h2>
|
48 |
+
|
49 |
+
**Background**
|
50 |
+
- Single-cell biology examines the intricate functions of the cells, ranging from energy production to genetic information transfer, playing a critical role in unraveling the fundamental principles of life and mechanisms influencing health and disease.
|
51 |
+
- The field has witnessed a surge in single-cell RNA sequencing (scRNA-seq) data, driven by advancements in high-throughput sequencing and reduced costs.
|
52 |
+
- Traditional single-cell foundation models leverage extensive scRNA-seq datasets, applying NLP techniques to analyze gene expression matrices—structured formats that simplify scRNA-seq data into computationally tractable representations—during pre-training. They are subsequently fine-tuned for distinct single-cell analysis tasks, as shown in Figure (a).
|
53 |
+
|
54 |
+
<p align="center">
|
55 |
+
<img src="./figures/overview.jpg" alt="image" width=100%>
|
56 |
+
</p>
|
57 |
+
<div align="center">
|
58 |
+
Figure 1: (a) Comparison of traditional single-cell engineering and <b>ChatCell</b>. (b) Overview of <b>ChatCell</b>.
|
59 |
+
</div>
|
60 |
+
<br>
|
61 |
+
We present <b>ChatCell</b>, a new paradigm that leverages natural language to make single-cell analysis more accessible and intuitive.
|
62 |
+
|
63 |
+
- Initially, we convert scRNA-seq data into a single-cell language that LLMs can readily interpret.
|
64 |
+
- Subsequently, we employ templates to integrate this single-cell language with task descriptions and target outcomes, creating comprehensive single-cell instructions.
|
65 |
+
- To improve the LLM's expertise in the single-cell domain, we conduct vocabulary adaptation, enriching the model with a specialized single-cell lexicon.
|
66 |
+
- Following this, we utilize unified sequence generation to empower the model to adeptly execute a range of single-cell tasks.
|
67 |
+
|
68 |
+
|
69 |
+
<h2 id="2">🧬 Single-cell Analysis Tasks</h2>
|
70 |
+
|
71 |
+
We concentrate on the following single-cell tasks:
|
72 |
+
|
73 |
+
- <b>Random Cell Sentence Generation.</b>
|
74 |
+
Random cell sentence generation challenges the model to create cell sentences devoid of predefined biological conditions or constraints. This task aims to evaluate the model's ability to generate valid and contextually appropriate cell sentences, potentially simulating natural variations in cellular behavior.
|
75 |
+
|
76 |
+
<p align="center">
|
77 |
+
<img src="./figures/example1.jpg" alt="image" width=80%>
|
78 |
+
</p>
|
79 |
+
|
80 |
+
|
81 |
+
- <b>Pseudo-cell Generation.</b>
|
82 |
+
Pseudo-cell generation focuses on generating gene sequences tailored to specific cell type labels. This task is vital for unraveling gene expression and regulation across different cell types, offering insights for medical research and disease studies, particularly in the context of diseased cell types.
|
83 |
+
|
84 |
+
|
85 |
+
<p align="center">
|
86 |
+
<img src="./figures/example2.jpg" alt="image" width=80%>
|
87 |
+
</p>
|
88 |
+
|
89 |
+
- <b>Cell Type Annotation.</b>
|
90 |
+
For cell type annotation, the model is tasked with precisely classifying cells into their respective types based on gene expression patterns encapsulated in cell sentences. This task is fundamental for understanding cellular functions and interactions within tissues and organs, playing a crucial role in developmental biology and regenerative medicine.
|
91 |
+
|
92 |
+
<p align="center">
|
93 |
+
<img src="./figures/example3.jpg" alt="image" width=80%>
|
94 |
+
</p>
|
95 |
+
|
96 |
+
- <b>Drug Sensitivity Prediction.</b>
|
97 |
+
The drug sensitivity prediction task aims to predict the response of different cells to various drugs. It is pivotal in designing effective, personalized treatment plans and contributes significantly to drug development, especially in optimizing drug efficacy and safety.
|
98 |
+
|
99 |
+
|
100 |
+
<p align="center">
|
101 |
+
<img src="./figures/example4.jpg" alt="image" width=80%>
|
102 |
+
</p>
|
103 |
+
|
104 |
+
<h2 id="3">🛠️ Quickstart</h2>
|
105 |
+
|
106 |
+
```python
|
107 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
108 |
+
|
109 |
+
tokenizer = AutoTokenizer.from_pretrained("zjunlp/chatcell-small")
|
110 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("zjunlp/chatcell-small")
|
111 |
+
```
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
<h2 id="4">📝 Cite</h2>
|
116 |
+
|
117 |
+
If you use our repository, please cite the following related paper:
|
118 |
+
```
|
119 |
+
@article{fang2024chatcell,
|
120 |
+
title={ChatCell: Facilitating Single-Cell Analysis with Natural Language},
|
121 |
+
author={Fang, Yin and Liu, Kangwei and Zhang, Ningyu and Deng, Xinle and Yang, Penghui and Chen, Zhuo and Tang, Xiangru and Gerstein, Mark and Fan, Xiaohui and Chen, Huajun},
|
122 |
+
journal={arXiv preprint arXiv:2306.08018},
|
123 |
+
year={2024},
|
124 |
+
}
|
125 |
+
```
|
figures/example1.jpg
ADDED
figures/example2.jpg
ADDED
figures/example3.jpg
ADDED
figures/example4.jpg
ADDED
figures/intro.jpg
ADDED
figures/logo.png
ADDED
figures/overview.jpg
ADDED