Update README.md
Browse files
README.md
CHANGED
@@ -10,6 +10,7 @@ tags:
|
|
10 |
|
11 |
|
12 |
|
|
|
13 |
<div align="center">
|
14 |
|
15 |
<img src="./figures/logo.png" alt="image" width=8%>
|
@@ -17,10 +18,9 @@ tags:
|
|
17 |
<h2 align="center"> ChatCell: Facilitating Single-Cell Analysis with Natural Language </h2>
|
18 |
|
19 |
<p align="center">
|
20 |
-
<a href="https://
|
21 |
<a href="https://huggingface.co/datasets/zjunlp/ChatCell-Instructions">🤗 Dataset</a> •
|
22 |
<a href="https://huggingface.co/spaces/zjunlp/Chatcell">🍎 Demo</a> •
|
23 |
-
<a href="https://arxiv.org/abs/2402.08303">📑 Paper</a> •
|
24 |
<a href="#1">🏖️ Overview</a> •
|
25 |
<a href="#2">🧬 Single-cell Analysis Tasks</a> •
|
26 |
<a href="#3">🛠️ Quickstart</a> •
|
@@ -36,37 +36,32 @@ tags:
|
|
36 |
|
37 |
## 📌 Table of Contents
|
38 |
|
39 |
-
- [
|
40 |
-
- [🧬 Single-cell Analysis Tasks](#
|
41 |
-
- [
|
42 |
-
- [📝 Cite](#
|
43 |
-
|
44 |
|
45 |
---
|
46 |
|
47 |
-
<h2 id="
|
48 |
|
49 |
-
|
50 |
-
|
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 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
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="
|
70 |
|
71 |
We concentrate on the following single-cell tasks:
|
72 |
|
@@ -101,32 +96,18 @@ The drug sensitivity prediction task aims to predict the response of different c
|
|
101 |
<img src="./figures/example4.jpg" alt="image" width=80%>
|
102 |
</p>
|
103 |
|
104 |
-
<h2 id="
|
105 |
-
|
106 |
-
```python
|
107 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
108 |
-
|
109 |
-
tokenizer = AutoTokenizer.from_pretrained("zjunlp/chatcell-large")
|
110 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("zjunlp/chatcell-large")
|
111 |
-
input_text="Detail the 100 starting genes for a Mix, ranked by expression level: "
|
112 |
-
# Encode the input text and generate a response with specified generation parameters
|
113 |
-
input_ids = tokenizer(input_text,return_tensors="pt").input_ids
|
114 |
-
output_ids = model.generate(input_ids, max_length=512, num_return_sequences=1, no_repeat_ngram_size=2, top_k=50, top_p=0.95, do_sample=True)
|
115 |
-
# Decode and print the generated output text
|
116 |
-
output_text = tokenizer.decode(output_ids[0],skip_special_tokens=True)
|
117 |
-
print(output_text)
|
118 |
-
```
|
119 |
|
|
|
|
|
120 |
|
121 |
|
122 |
-
<h2 id="
|
123 |
|
124 |
-
If you use our repository, please cite the following related paper:
|
125 |
```
|
126 |
@article{fang2024chatcell,
|
127 |
title={ChatCell: Facilitating Single-Cell Analysis with Natural Language},
|
128 |
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},
|
129 |
-
journal={arXiv preprint arXiv:2402.08303},
|
130 |
year={2024},
|
131 |
}
|
132 |
```
|
|
|
10 |
|
11 |
|
12 |
|
13 |
+
|
14 |
<div align="center">
|
15 |
|
16 |
<img src="./figures/logo.png" alt="image" width=8%>
|
|
|
18 |
<h2 align="center"> ChatCell: Facilitating Single-Cell Analysis with Natural Language </h2>
|
19 |
|
20 |
<p align="center">
|
21 |
+
<a href="https://chat.openai.com/g/g-vUwj222gQ-chatcell">💻GPTStore App</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> •
|
|
|
36 |
|
37 |
## 📌 Table of Contents
|
38 |
|
39 |
+
- [🛠️ Quickstart](#2)
|
40 |
+
- [🧬 Single-cell Analysis Tasks](#3)
|
41 |
+
- [✨ Acknowledgements](#4)
|
42 |
+
- [📝 Cite](#5)
|
|
|
43 |
|
44 |
---
|
45 |
|
46 |
+
<h2 id="3">🛠️ Quickstart</h2>
|
47 |
|
48 |
+
```python
|
49 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
|
|
|
50 |
|
51 |
+
tokenizer = AutoTokenizer.from_pretrained("zjunlp/chatcell-large")
|
52 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("zjunlp/chatcell-large")
|
53 |
+
input_text="Detail the 100 starting genes for a Mix, ranked by expression level: "
|
54 |
+
# Encode the input text and generate a response with specified generation parameters
|
55 |
+
input_ids = tokenizer(input_text,return_tensors="pt").input_ids
|
56 |
+
output_ids = model.generate(input_ids, max_length=512, num_return_sequences=1, no_repeat_ngram_size=2, top_k=50, top_p=0.95, do_sample=True)
|
57 |
+
# Decode and print the generated output text
|
58 |
+
output_text = tokenizer.decode(output_ids[0],skip_special_tokens=True)
|
59 |
+
print(output_text)
|
60 |
+
```
|
61 |
|
|
|
|
|
|
|
|
|
62 |
|
63 |
|
64 |
+
<h2 id="3">🧬 Single-cell Analysis Tasks</h2>
|
65 |
|
66 |
We concentrate on the following single-cell tasks:
|
67 |
|
|
|
96 |
<img src="./figures/example4.jpg" alt="image" width=80%>
|
97 |
</p>
|
98 |
|
99 |
+
<h2 id="4">📝 ✨ Acknowledgements</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
+
Special thanks to the authors of [Cell2Sentence: Teaching Large Language Models the Language of Biology](https://github.com/vandijklab/cell2sentence-ft) and [Representing cells as sentences enables natural-language processing for single-cell transcriptomics
|
102 |
+
](https://github.com/rahuldhodapkar/cell2sentence) for their inspiring work.
|
103 |
|
104 |
|
105 |
+
<h2 id="5">📝 Cite</h2>
|
106 |
|
|
|
107 |
```
|
108 |
@article{fang2024chatcell,
|
109 |
title={ChatCell: Facilitating Single-Cell Analysis with Natural Language},
|
110 |
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},
|
|
|
111 |
year={2024},
|
112 |
}
|
113 |
```
|