|
6 | 6 | "source": [ |
7 | 7 | "# Assess in-situ cell type calling in smFISH simulation\n", |
8 | 8 | "\n", |
9 | | - "In this step we assess the cell type calling accuracy that we can achieve in with cell expression vector identified in the smFISH simulation. Hence this accuracy depend of the previous choice of the Marker list and the RNA assignement method that were used. A high cell type accuracy on smFISH simulation would confirm that our marker genes and RNA assignement method are relevant to detect thetargeted cell type\n" |
| 9 | + "In this step we assess the cell type calling accuracy that we can achieve in with cell expression vector identified in the smFISH simulation. This estimated accuracy can be interpret as the accuracy that would be obtained in the experiment while taking into account difficulties span by the limited number of markers and the RNA-cell assignement. \n", |
| 10 | + "\n", |
| 11 | + "This accuracy depend of the previous choice of the marker list and the RNA assignement method that were used. A high cell type accuracy on smFISH simulation would confirm that our marker genes and RNA assignement method are relevant to detect thetargeted cell type\n" |
10 | 12 | ] |
11 | 13 | }, |
12 | 14 | { |
|
15 | 17 | "source": [ |
16 | 18 | "#### RNA assignement error estimation\n", |
17 | 19 | "\n", |
18 | | - "Assignement of RNA to cell is error prone in tissue due to the complexity of the cell shape and the possible high density of the nuclei. Error in the RNA assignememnt to cell lead to error in the estimated RNA profile of the spatilly resolve cell and hence may lead to incorrect cell type calling. \n", |
19 | | - " In this notebook we start by estimation the RNA assignememnt error using the mean jaccard index. In our context the jaccard index is\n", |
| 20 | + "Assignement of RNA to cell is error prone in tissue due to the complexity of the cell shape, the possible high density of the nuclei and the lack of cytoplasm staining. Error in the RNA assignememnt to cell lead to error in the estimated RNA profile of the spatilly resolve cell and hence may lead to incorrect cell type calling. \n", |
| 21 | + " In this notebook we start by estimation the RNA assignememnt error using the mean jaccard index (also called IoU at the molecule level). In our context the jaccard index is\n", |
20 | 22 | "$$\n", |
21 | 23 | " \\frac{GT\\cap P}{GT\\cup P}\\\n", |
22 | 24 | "$$\n", |
|
76 | 78 | "cell_type": "markdown", |
77 | 79 | "metadata": {}, |
78 | 80 | "source": [ |
79 | | - "The jaccard index is not equal to 1, hence estimated RNA profiles have some errors. We will try tp classify theses estimated RNA profile to see if theses errors are small enought to not be detrimental for the cell type calling" |
| 81 | + "The jaccard index is not equal to 1, hence estimated RNA profiles have some errors. We will try to classify theses estimated RNA profile to see if theses errors are small enought to not be detrimental for the cell type calling" |
80 | 82 | ] |
81 | 83 | }, |
82 | 84 | { |
|
198 | 200 | " scrna_centroids.append(mean)\n" |
199 | 201 | ] |
200 | 202 | }, |
201 | | - { |
202 | | - "cell_type": "code", |
203 | | - "execution_count": 36, |
204 | | - "metadata": { |
205 | | - "scrolled": true |
206 | | - }, |
207 | | - "outputs": [ |
208 | | - { |
209 | | - "data": { |
210 | | - "text/plain": [ |
211 | | - "array([ 0., 0., 0., 0., 0., 0., 48., 0., 0., 0., 0., 0., 6.,\n", |
212 | | - " 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 3., 0., 0.,\n", |
213 | | - " 0., 0., 3., 0., 0., 0., 0., 0.])" |
214 | | - ] |
215 | | - }, |
216 | | - "execution_count": 36, |
217 | | - "metadata": {}, |
218 | | - "output_type": "execute_result" |
219 | | - } |
220 | | - ], |
221 | | - "source": [ |
222 | | - "anndata.X[i]" |
223 | | - ] |
224 | | - }, |
225 | 203 | { |
226 | 204 | "cell_type": "code", |
227 | 205 | "execution_count": 42, |
|
264 | 242 | "print(f\"cell type accuracy{acc}\")" |
265 | 243 | ] |
266 | 244 | }, |
| 245 | + { |
| 246 | + "cell_type": "markdown", |
| 247 | + "metadata": {}, |
| 248 | + "source": [ |
| 249 | + "The obtain cell type accuracy is 0.94" |
| 250 | + ] |
| 251 | + }, |
267 | 252 | { |
268 | 253 | "cell_type": "code", |
269 | 254 | "execution_count": 47, |
|
299 | 284 | "fig, ax = plt.subplots(figsize=(10,10))\n", |
300 | 285 | "disp.plot(ax=ax, xticks_rotation = \"vertical\")" |
301 | 286 | ] |
| 287 | + }, |
| 288 | + { |
| 289 | + "cell_type": "markdown", |
| 290 | + "metadata": {}, |
| 291 | + "source": [ |
| 292 | + "the confusion matrix above give information about which cell type is miss-classified. As example, some T-cell are miss-identify as NK-cell or Neutriphilis. \n", |
| 293 | + "\n", |
| 294 | + "For the purpose of this tutorail we only use a very small number of cells but those notebooks can be run on larger scale." |
| 295 | + ] |
| 296 | + }, |
| 297 | + { |
| 298 | + "cell_type": "code", |
| 299 | + "execution_count": null, |
| 300 | + "metadata": {}, |
| 301 | + "outputs": [], |
| 302 | + "source": [] |
302 | 303 | } |
303 | 304 | ], |
304 | 305 | "metadata": { |
|
0 commit comments