From 9b903805d6069ed35f42ac6a0f01f4cd28d10ab9 Mon Sep 17 00:00:00 2001 From: seohyonkim Date: Wed, 19 Feb 2025 16:09:33 +0100 Subject: [PATCH 1/3] modify remaining quizzes --- .../multimodal_integration.ipynb | 302 ++++++++++++++++-- jupyter-book/air_repertoire/specificity.ipynb | 19 +- 2 files changed, 278 insertions(+), 43 deletions(-) diff --git a/jupyter-book/air_repertoire/multimodal_integration.ipynb b/jupyter-book/air_repertoire/multimodal_integration.ipynb index e99fbdeb..43599eff 100644 --- a/jupyter-book/air_repertoire/multimodal_integration.ipynb +++ b/jupyter-book/air_repertoire/multimodal_integration.ipynb @@ -2384,25 +2384,282 @@ "id": "54051eba", "metadata": {}, "source": [ - "## Questions\n", - "\n", - "Why could it be useful to integrate AIR sequence information with gene expression?\n", - "- GEX can be used to improve AIR sequence reads.\n", - "- \\+ Both modalities provide different insights into the cell, while still being interdependent.\n", - "- Since both modalities capture the same information, integrating them provides an additional quality check.\n", - "- For most cells either GEX or AIR is measured. Integrating thereby allows analysis of all cells.\n", - "\n", - "What information provides us the AIR sequence, that is not directly captured in GEX?\n", - "- A count matrix between cells and antibody-tagged epitope bindings.\n", - "- The IR sequence can be used for demultiplexing between different donors.\n", - "- \\+ The cell's clonotype and, thereby, cell ancestry is defined by the AIR sequence.\n", - "- \\+ The AIR sequence determines specificity and is therefor a barcode for recognizing the same epitope.\n", + "## Quiz" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "790b3916", + "metadata": { + "tags": [ + "remove_input" + ] + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + "\n", + "
\n", + "
\n", + "
\n", + " Why could it be useful to integrate AIR sequence information with gene expression?\n", + "
\n", + "
\n", + " GEX can be used to improve AIR sequence reads, both modalities provide different insights into the cell, while still being interdependent, etc.\n", + "
\n", + "
\n", + "
\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + " \n", + "\n", + "
\n", + "
\n", + "
\n", + " What information provides us the AIR sequence, that is not directly captured in GEX?\n", + "
\n", + "
\n", + " A count matrix between cells and antibody-tagged epitope bindings, the IR sequence can be used for demultiplexing between different donors, etc.\n", + "
\n", + "
\n", + "
\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + " \n", + "\n", + "
\n", + "
\n", + "
\n", + " On what premise rely multi-modal integration approaches?\n", + "
\n", + "
\n", + " Cells of same or alike AIRs often have a similar phenotype, information of AIR and GEX provide orthogonal information to each other, since they are independent, etc.\n", + "
\n", + "
\n", + "
\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%run ../src/lib.py\n", "\n", - "On what premise rely multi-modal integration approaches?\n", - "- \\+ Cells of same or alike AIRs often have a similar phenotype.\n", - "- Information of AIR and GEX provide orthogonal information to each other, since they are independent.\n", - "- Knowledge is transferred between large gene expression datasets into which AIR data can be mapped.\n", - "- Each cell occurs clonally expanded and thereby provides multiple gene profiles." + "flip_card(\n", + " \"q1\",\n", + " \"Why could it be useful to integrate AIR sequence information with gene expression?\",\n", + " \"GEX can be used to improve AIR sequence reads, both modalities provide different insights into the cell, while still being interdependent, etc.\",\n", + ")\n", + "flip_card(\n", + " \"q2\",\n", + " \"What information provides us the AIR sequence, that is not directly captured in GEX?\",\n", + " \"A count matrix between cells and antibody-tagged epitope bindings, the IR sequence can be used for demultiplexing between different donors, etc.\",\n", + ")\n", + "flip_card(\n", + " \"q3\",\n", + " \"On what premise rely multi-modal integration approaches?\",\n", + " \"Cells of same or alike AIRs often have a similar phenotype, information of AIR and GEX provide orthogonal information to each other, since they are independent, etc.\",\n", + " back_font_size=15,\n", + ")" ] }, { @@ -2426,7 +2683,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "book", "language": "python", "name": "python3" }, @@ -2440,12 +2697,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" - }, - "vscode": { - "interpreter": { - "hash": "e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a" - } + "version": "3.11.8" } }, "nbformat": 4, diff --git a/jupyter-book/air_repertoire/specificity.ipynb b/jupyter-book/air_repertoire/specificity.ipynb index 2375066c..6c28bcce 100644 --- a/jupyter-book/air_repertoire/specificity.ipynb +++ b/jupyter-book/air_repertoire/specificity.ipynb @@ -3208,24 +3208,7 @@ "id": "1c0380ea", "metadata": {}, "source": [ - "## Quiz\n", - "What is assumed to be the most important AIR information, when considering specificity?\n", - "- \\+ CDR3 of the VDJ-chain\n", - "- V-, and J-gene of the VJ-chain\n", - "- The constant region\n", - "- Charge of the CDR2\n", - "\n", - "How can you computational infer specificity of AIR cells?\n", - "- Transforming the epitope Sequence to CDR3-format\n", - "- \\+ Querying appropriate databases\n", - "- \\+ Via prediction tools\n", - "- \\+ By comparing the AIR sequence with known binders\n", - "\n", - "Why should you be careful when using database queries?\n", - "- Most databases only include low-throughput samples.\n", - "- \\+ Databases are biased toward well researched diseases or epitopes.\n", - "- Epitopes from databases are often not relevant to actual research.\n", - "- \\+ Databases might follow different sequence definition and formatting." + "## Quiz" ] }, { From 8626dad93f6230dda03ba49884edde02ec65204b Mon Sep 17 00:00:00 2001 From: seohyonkim Date: Fri, 28 Feb 2025 15:53:47 +0100 Subject: [PATCH 2/3] fix the dark mode problem --- .../air_repertoire/ir_profiling.ipynb | 20 ++++----- .../multimodal_integration.ipynb | 20 ++++----- jupyter-book/air_repertoire/specificity.ipynb | 23 +++++------ .../cellular_structure/integration.ipynb | 23 +++++------ .../gene_regulatory_networks_atac.ipynb | 41 +++++++++---------- jupyter-book/conditions/compositional.ipynb | 23 +++++------ .../differential_gene_expression.ipynb | 23 +++++------ jupyter-book/conditions/gsea_pathway.ipynb | 36 ++++++++-------- .../conditions/perturbation_modeling.ipynb | 23 +++++------ .../mechanisms/cell_cell_communication.ipynb | 30 ++++++-------- .../mechanisms/gene_regulatory_networks.ipynb | 25 ++++++----- jupyter-book/src/lib.py | 10 ++--- 12 files changed, 137 insertions(+), 160 deletions(-) diff --git a/jupyter-book/air_repertoire/ir_profiling.ipynb b/jupyter-book/air_repertoire/ir_profiling.ipynb index cfd3ee11..7bd6c5f4 100644 --- a/jupyter-book/air_repertoire/ir_profiling.ipynb +++ b/jupyter-book/air_repertoire/ir_profiling.ipynb @@ -3257,7 +3257,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "id": "35d2d491", "metadata": { "tags": [ @@ -3270,8 +3270,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -3351,8 +3351,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -3432,8 +3432,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", diff --git a/jupyter-book/air_repertoire/multimodal_integration.ipynb b/jupyter-book/air_repertoire/multimodal_integration.ipynb index b1852e67..5f42a5e9 100644 --- a/jupyter-book/air_repertoire/multimodal_integration.ipynb +++ b/jupyter-book/air_repertoire/multimodal_integration.ipynb @@ -2434,7 +2434,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "id": "790b3916", "metadata": { "tags": [ @@ -2447,8 +2447,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2528,8 +2528,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2609,8 +2609,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", diff --git a/jupyter-book/air_repertoire/specificity.ipynb b/jupyter-book/air_repertoire/specificity.ipynb index eb5a87d6..d7baa03b 100644 --- a/jupyter-book/air_repertoire/specificity.ipynb +++ b/jupyter-book/air_repertoire/specificity.ipynb @@ -3252,7 +3252,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "bbd508b4", "metadata": { "tags": [ @@ -3265,9 +3265,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -3347,9 +3346,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -3429,9 +3427,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", diff --git a/jupyter-book/cellular_structure/integration.ipynb b/jupyter-book/cellular_structure/integration.ipynb index fc3b405c..88b5af17 100644 --- a/jupyter-book/cellular_structure/integration.ipynb +++ b/jupyter-book/cellular_structure/integration.ipynb @@ -3836,7 +3836,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "4750241c", "metadata": { "tags": [ @@ -3849,9 +3849,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -3931,9 +3930,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -4013,9 +4011,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", diff --git a/jupyter-book/chromatin_accessibility/gene_regulatory_networks_atac.ipynb b/jupyter-book/chromatin_accessibility/gene_regulatory_networks_atac.ipynb index ae0d9fd7..3a00a8ae 100644 --- a/jupyter-book/chromatin_accessibility/gene_regulatory_networks_atac.ipynb +++ b/jupyter-book/chromatin_accessibility/gene_regulatory_networks_atac.ipynb @@ -2718,7 +2718,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "f36c11d4", "metadata": { "tags": [ @@ -2731,9 +2731,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2813,9 +2812,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2895,9 +2893,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2977,9 +2974,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -3074,7 +3070,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "id": "a05530ec", "metadata": { "tags": [ @@ -3087,9 +3083,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -3166,6 +3161,8 @@ } ], "source": [ + "%run ../src/lib.py\n", + "\n", "flip_card(\"q1\", \"What is the DORC score and how it could be useful to identify regulatory interactions between peaks and genes?\", \"The DORC (Domain of Regulatory Chromatin) score quantifies the aggregate accessibility of multiple chromatin peaks associated with a single gene, aiding in identifying regulatory interactions by correlating these accessibility domains with gene expression levels.\", back_font_size=15)" ] }, diff --git a/jupyter-book/conditions/compositional.ipynb b/jupyter-book/conditions/compositional.ipynb index 8a81a1cc..8c2e7dd0 100644 --- a/jupyter-book/conditions/compositional.ipynb +++ b/jupyter-book/conditions/compositional.ipynb @@ -4753,7 +4753,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "7de25e49", "metadata": { "tags": [ @@ -4766,9 +4766,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -4848,9 +4847,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -4930,9 +4928,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", diff --git a/jupyter-book/conditions/differential_gene_expression.ipynb b/jupyter-book/conditions/differential_gene_expression.ipynb index 701a24c8..1cbcb135 100644 --- a/jupyter-book/conditions/differential_gene_expression.ipynb +++ b/jupyter-book/conditions/differential_gene_expression.ipynb @@ -2471,7 +2471,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "a181923c", "metadata": { "tags": [ @@ -2484,9 +2484,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2566,9 +2565,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2648,9 +2646,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", diff --git a/jupyter-book/conditions/gsea_pathway.ipynb b/jupyter-book/conditions/gsea_pathway.ipynb index 7f590318..e9b0fa6b 100644 --- a/jupyter-book/conditions/gsea_pathway.ipynb +++ b/jupyter-book/conditions/gsea_pathway.ipynb @@ -1936,7 +1936,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 1, "metadata": { "tags": [ "remove_input" @@ -1948,8 +1948,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2029,8 +2029,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2110,8 +2110,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2191,8 +2191,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2272,8 +2272,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2600,7 +2600,7 @@ ], "metadata": { "kernelspec": { - "display_name": "bp2", + "display_name": "book", "language": "python", "name": "python3" }, @@ -2614,7 +2614,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.8" + "version": "3.11.8" } }, "nbformat": 4, diff --git a/jupyter-book/conditions/perturbation_modeling.ipynb b/jupyter-book/conditions/perturbation_modeling.ipynb index df1360fb..d72edf84 100644 --- a/jupyter-book/conditions/perturbation_modeling.ipynb +++ b/jupyter-book/conditions/perturbation_modeling.ipynb @@ -2651,7 +2651,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "00b86371", "metadata": { "tags": [ @@ -2664,9 +2664,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2746,9 +2745,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2828,9 +2826,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", diff --git a/jupyter-book/mechanisms/cell_cell_communication.ipynb b/jupyter-book/mechanisms/cell_cell_communication.ipynb index d7a726f5..7257057c 100644 --- a/jupyter-book/mechanisms/cell_cell_communication.ipynb +++ b/jupyter-book/mechanisms/cell_cell_communication.ipynb @@ -2168,7 +2168,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { "tags": [ "remove_input" @@ -2180,9 +2180,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2262,9 +2261,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2344,9 +2342,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2426,9 +2423,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", diff --git a/jupyter-book/mechanisms/gene_regulatory_networks.ipynb b/jupyter-book/mechanisms/gene_regulatory_networks.ipynb index 60d970fd..12bebf82 100644 --- a/jupyter-book/mechanisms/gene_regulatory_networks.ipynb +++ b/jupyter-book/mechanisms/gene_regulatory_networks.ipynb @@ -1968,7 +1968,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 2, "id": "2a4c20a0", "metadata": { "tags": [ @@ -1981,9 +1981,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2063,9 +2062,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2145,9 +2143,8 @@ "text/html": [ "\n", " \n", "\n", "
\n", @@ -2224,6 +2221,8 @@ } ], "source": [ + "%run ../src/lib.py\n", + "\n", "flip_card(\n", " \"q1\",\n", " \"Describe the major steps in the SCENIC pipeline (three or more).\",\n", diff --git a/jupyter-book/src/lib.py b/jupyter-book/src/lib.py index e5feedf4..0b52bd1b 100644 --- a/jupyter-book/src/lib.py +++ b/jupyter-book/src/lib.py @@ -50,8 +50,8 @@ def multiple_choice_question( html_code = f"""
From 3de8e60d4563a1c6e56440353c80d2b70cbec1a0 Mon Sep 17 00:00:00 2001 From: seohyonkim Date: Wed, 5 Mar 2025 01:46:08 +0900 Subject: [PATCH 3/3] modify build_book and environment.yml --- .github/workflows/build_book.yml | 5 ++++- environment.yml | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_book.yml b/.github/workflows/build_book.yml index 99aa237b..17784566 100644 --- a/.github/workflows/build_book.yml +++ b/.github/workflows/build_book.yml @@ -72,7 +72,10 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade uv - uv pip install --system jupyter-book jupytext beautifulsoup4 + uv pip install --system jupyter-book jupytext beautifulsoup4 playwright + + - name: Install Playwright browsers + run: playwright install --with-deps - name: Install Headless Chrome dependencies run: | diff --git a/environment.yml b/environment.yml index ab287b2f..cd260ce3 100644 --- a/environment.yml +++ b/environment.yml @@ -3,9 +3,12 @@ channels: - defaults - conda-forge dependencies: - - conda-forge::python=3.13 - - conda-forge::jupyter-book==1.0.3 + - conda-forge::python==3.12 + - conda-forge::jupyter-book==1.0.4 - conda-forge::jupytext==1.16.7 - conda-forge::beautifulsoup4==4.13.3 + - conda-forge::playwright==1.50.1 + - conda-forge::sphinx==7.* + - pip - pip: - lamindb[bionty,jupyter]