You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
":::{.callout-tip collapse=\"true\" title=\"A few introductory points to run this notebook\"}\n",
15
13
"\n",
16
-
"* To use this notebook, use the `NGS (python)` kernel that contains the packages. Choose it by selecting `Kernel -> Change Kernel` in the menu on top of the window.\n",
14
+
"* To use the notebooks in bash or python languages, use the `Python 3` kernel that contains the packages. For R notebooks use the `R` kernel. Choose it by selecting `Kernel -> Change Kernel` in the menu on top of the window.\n",
"* In this notebook you will use only bash commands as you would do in the command line (this is why you read `%%bash` at the beginning of each piece of code). Those commands can be replicated in the command line, but we thought of integrating them in a notebook to make the tutorial understandable. The bash commands can also be marked with an `!` sign at the beginning of the line\n",
20
+
"* In the very first notebook you will use only bash commands as you would do in the command line (this is why you read `%%bash` at the beginning of each piece of code). Those commands can be replicated in the command line, but we thought of integrating them in a notebook to make the tutorial understandable. The bash commands can also be marked with a `!` sign at the beginning of the line\n",
23
21
"* On some computers, you might see the result of the commands once they are done running. This means you will wait some time while the computer is crunching, and only afterwards you will see the result of the command you have executed\n",
24
22
"* You can run the code in each cell by clicking on the run cell button, or by pressing <kbd> Shift </kbd> + <kbd> Enter </kbd>. When the code is done running, a small green check sign will appear on the left side\n",
25
23
"* You need to run the cells in sequential order, please do not run a cell until the one above finished running and do not skip any cells\n",
26
24
"* Each cell contains a short description of the code and the output you should get. Please try not to focus on understanding the code for each command in too much detail, but rather try to focus on the output \n",
27
-
"* You can create new code cells by pressing <kbd> + </kbd> in the Menu bar above. \n",
28
-
"\n",
29
-
":::"
25
+
"* You can create new code cells by pressing <kbd> + </kbd> in the Menu bar above. "
Copy file name to clipboardExpand all lines: Notebooks-dev/04_scRNAseq_analysis.ipynb
+24-33Lines changed: 24 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@
19
19
" toc: true\n",
20
20
"title: \"Single cell analysis workflow\"\n",
21
21
"author: \"Stig U Andersen, Mikkel H Schierup, Samuele Soraggi\"\n",
22
+
"date-modified: last-modified\n",
22
23
"title-block-banner: true\n",
23
24
"---"
24
25
]
@@ -40,28 +41,7 @@
40
41
"- Merge datasets and do cross-data analysis\n",
41
42
"\n",
42
43
":::\n",
43
-
"\n",
44
-
"The present tutorial, like the rest of the course material, is available at our [open-source github repository](https://github.com/hds-sandbox/NGS_summer_course_Aarhus) and will be kept up-to-date as long as the course will be renewed.\n",
45
-
"\n",
46
-
"\n",
47
-
"To use this notebook, use the `NGS (python)` kernel that contains the packages. Choose it by selecting `Kernel -> Change Kernel` in the menu on top of the window.\n",
48
-
"\n",
49
-
":::{.callout-tip collapse=\"true\" title=\"A few introductory points to run this notebook (click to show)\"}\n",
50
-
" \n",
51
-
"* To use this notebook, use the `NGS (Python)` kernel that contains the packages. Choose it by selecting `Kernel -> Change Kernel` in the menu on top of the window.\n",
"* In this notebook you will use only python commands\n",
58
-
"* On some computers, you might see the result of the commands once they are done running. This means you will wait some time while the computer is crunching, and only afterwards you will see the result of the command you have executed\n",
59
-
"* You can run the code in each cell by clicking on the run cell button, or by pressing <kbd> Shift </kbd> + <kbd> Enter </kbd>. When the code is done running, a small green check sign will appear on the left side\n",
60
-
"* You need to run the cells in sequential order, please do not run a cell until the one above finished running and do not skip any cells\n",
61
-
"* Each cell contains a short description of the code and the output you should get. Please try not to focus on understanding the code for each command in too much detail, but rather try to focus on the output \n",
62
-
"* You can create new code cells by pressing <kbd> + </kbd> in the Menu bar above. \n",
63
-
" \n",
64
-
":::"
44
+
"\n"
65
45
]
66
46
},
67
47
{
@@ -438461,7 +438441,6 @@
438461
438441
" </figure>\n",
438462
438442
"\n",
438463
438443
":::{.callout-note}\n",
438464
-
"\n",
438465
438444
"Multiplets are in the almost totality of the cases doublets, because triplets and higher multiplets are extremely rare. We will thus talk only about doublets instead of multiplets. Read [this more technical blog post](https://liorpachter.wordpress.com/2019/02/07/sub-poisson-loading-for-single-cell-rna-seq/) for deeper explanations about this fact.\n",
438466
438445
"\n",
438467
438446
"As a rule of thumb, you can have a look [at this table](https://kb.10xgenomics.com/hc/en-us/articles/360059124751-Why-is-the-multiplet-rate-different-for-the-Next-GEM-Single-Cell-3-LT-v3-1-assay-compared-to-other-single-cell-applications-) to see what is the expected amount of doublets rate for different amounts of cells loaded in a single cell 10X experiment. In our case, each sample ranges somewhere between 3000 and 5000 cells, meaning there were somewhere between 8000 and 10000 loaded cells in each experiment (assuming efficiency of cell capture between 50% and 70%), so one could use 6-8% as a guess.\n",
@@ -438471,7 +438450,8 @@
438471
438450
"<figcaption> Figure: doublet rates for various setting in a single cell experiment with 10X technology.</figcaption>\n",
438472
438451
"</figure>\n",
438473
438452
"\n",
438474
-
"Below, we run the detection and obtain a score between 0 and 1 for each doublet. We will use that score for filtering"
438453
+
"Below, we run the detection and obtain a score between 0 and 1 for each doublet. We will use that score for filtering\n",
"Try to look at other samples and see if there are some principal components highly dependent with technical features. You might also want to choose other technical features from the data.\n",
488760
488740
"\n",
488761
-
"The available samples are\n"
488741
+
"The available samples are"
488762
488742
]
488763
488743
},
488764
488744
{
@@ -488835,7 +488815,11 @@
488835
488815
"cell_type": "markdown",
488836
488816
"metadata": {},
488837
488817
"source": [
488838
-
"<div class=\"alert-success\"> <font size=\"+2\"> <b> End of optional task </b> </font> </div>"
"PCA and UMAP are two of the many projection methods available at the moment. Before UMAP, a very popular method was (and still is) tSNE [van der Maaten and Hinton, 2008](https://www.jmlr.org/papers/volume9/vandermaaten08a/vandermaaten08a.pdf). tSNE tries to match the statistical distribution of the high-dimensional data and its projection. The statistical distribution modeling high-dimensional data is Cryptoled by a parameter called *perplexity*, defining how far away cells are considered to be in the neighbourhood of a cell. The largest the perplexity, the farther away cells are going to be pulled close to each other in the tSNE projection. In general, tSNE is not very good at keeping the global behaviour of the data into account, while it often pulls cells together in separate chunks. \n",
922729
922712
"\n",
922730
922713
"Changing the perplexity can change a lot the output of tSNE, even though it has shown empirically being stable with values between 5 and 50.\n",
"* To use the notebooks in bash or python languages, use the `Python 3` kernel that contains the packages. For R notebooks use the `R` kernel. Choose it by selecting `Kernel -> Change Kernel` in the menu on top of the window.\n",
"* In the very first notebook you will use only bash commands as you would do in the command line (this is why you read `%%bash` at the beginning of each piece of code). Those commands can be replicated in the command line, but we thought of integrating them in a notebook to make the tutorial understandable. The bash commands can also be marked with a `!` sign at the beginning of the line\n",
21
+
"* On some computers, you might see the result of the commands once they are done running. This means you will wait some time while the computer is crunching, and only afterwards you will see the result of the command you have executed\n",
22
+
"* You can run the code in each cell by clicking on the run cell button, or by pressing <kbd> Shift </kbd> + <kbd> Enter </kbd>. When the code is done running, a small green check sign will appear on the left side\n",
23
+
"* You need to run the cells in sequential order, please do not run a cell until the one above finished running and do not skip any cells\n",
24
+
"* Each cell contains a short description of the code and the output you should get. Please try not to focus on understanding the code for each command in too much detail, but rather try to focus on the output \n",
25
+
"* You can create new code cells by pressing <kbd> + </kbd> in the Menu bar above. "
0 commit comments