From e19138add7e51c4ec254a84b29c2ebd3ec06cd75 Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 14:49:37 +0100 Subject: [PATCH 1/9] Start branch From 0bd862c941c529d0e31cdf24062c8c971d1a7ab4 Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 16:33:12 +0100 Subject: [PATCH 2/9] Apply @AndreaVolkamer's suggestions --- .../T000_template/talktorial.ipynb | 257 ++++++++++++++++-- 1 file changed, 236 insertions(+), 21 deletions(-) diff --git a/teachopencadd/talktorials/T000_template/talktorial.ipynb b/teachopencadd/talktorials/T000_template/talktorial.ipynb index 6ab4e11a..ef1f8775 100644 --- a/teachopencadd/talktorials/T000_template/talktorial.ipynb +++ b/teachopencadd/talktorials/T000_template/talktorial.ipynb @@ -1,5 +1,27 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "__Thank you for contributing to TeachOpenCADD!__\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "__Set up your PR__: Please check out our [issue](https://github.com/volkamerlab/teachopencadd/issues/41) on how to set up a PR for new talktorials, including standard checks and TODOs.\n", + "\n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -12,6 +34,24 @@ "- First and last name, year(s) of contribution, lab, institution" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "_The examples used in this talktorial template are taken from __Talktorial T001__._" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "__Cross-referencing talktorials__: If you want to cross-reference to existing talktorials in your notebook, please use the following formatting: __Talktorial T000__ (Markdown: `__Talktorial T000__`)\n", + "\n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -27,8 +67,6 @@ "source": [ "### Contents in *Theory*\n", "\n", - "*These points should refer to the headlines of your theory section below.*\n", - "\n", "* ChEMBL database\n", "* Compound activity measures" ] @@ -37,14 +75,34 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Contents in *Practical*\n", + "
\n", "\n", - "*These points should refer to the headlines of your practical section below.*\n", + "Sync section titles with TOC: These points should refer to the headlines of your Theory section below.\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Contents in *Practical*\n", "\n", "* Connect to ChEMBL database\n", "* Load and draw molecules" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "Sync section titles with TOC: These points should refer to the headlines of your Theory section below.\n", + "\n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -59,7 +117,7 @@ "* Keyword describing resource: Journal (year), volume, pages (link to resource) \n", "\n", "*Example:*\n", - "* ChEMBL web services: Nucleic Acids Res. (2015), 43, 612-620 (https://academic.oup.com/nar/article/43/W1/W612/2467881) " + "* ChEMBL web services: [Nucleic Acids Res. (2015), 43, 612-620](https://academic.oup.com/nar/article/43/W1/W612/2467881) " ] }, { @@ -73,17 +131,53 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### ChEMBL database" + "
\n", + "\n", + "Sync section titles with TOC: Please make sure that all section titles in the Theory section are synced with with bullet point list provided in the Aim of this talktorial > Contents in Theory section.\n", + "\n", + "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n", + "
\n", + " \n", + "Beware of section levels: Please check if you are using the correct subsection levels. The section Theory is in Markdown `## Theory`, so every subsection within Theory is `###` or lower.\n", "\n", - "**Note**: Include images like this (place images in `images/`):\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### ChEMBL database" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + " \n", + "__Figures__: Place images in the `images/` folder and include them using Markdown `![Figure title](images/some_figure.jpg)`.\n", "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "![ChEMBL web service schema](images/chembl_webservices_schema_diagram.jpg)\n", "\n", "*Figure 1:* \n", @@ -123,30 +217,67 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Short summay of what will be done in this practical section." + "Short summary of what will be done in this practical section." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Please add all your imports on top of this section." + "
\n", + "\n", + "Sync section titles with TOC: Please make sure that all section titles in the Practical section are synced with with bullet point list provided in the Aim of this talktorial > Contents in Practical section.\n", + "\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + " \n", + "Beware of section levels: Please check if you are using the correct subsection levels. The section Practical is in Markdown `## Practical`, so every subsection within Practical is `###` or lower.\n", + "\n", + "
" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "RDKit WARNING: [16:28:01] Enabling RDKit 2019.09.3 jupyter extensions\n" + ] + } + ], "source": [ - "from pathlib import Path" + "from pathlib import Path\n", + "import math\n", + "\n", + "import numpy as np\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "from matplotlib.lines import Line2D\n", + "import matplotlib.patches as mpatches\n", + "from rdkit import Chem\n", + "from rdkit.Chem import Descriptors, Draw, PandasTools" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Add globals to this talktorial's path (`HERE`) and its data folder (`DATA`)." + "
\n", + "\n", + "__Imports__: Please add all your imports on top of this section, ordered by standard library / 3rd party packages / our own (`teachopencadd.*`). \n", + "Read more on imports and import order in the [\"PEP 8 -- Style Guide for Python Code\"](https://www.python.org/dev/peps/pep-0008/#imports).\n", + " \n", + "
" ] }, { @@ -159,6 +290,20 @@ "DATA = HERE / \"data\"" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "__Relative paths__: Please do not use relative paths to example input/output data or images that you would like to include.\n", + "Instead add this talktorial's path to the global `HERE`. Define all paths relative to this path.\n", + "\n", + "If your talktorial has input/output data, please define the global `DATA`, which points to this talktorial's data folder (check out the default folder structure of each talktorial).\n", + " \n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -170,7 +315,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Explain what you will do here in the Markdown cell. This includes everything that has to do with the talktorial's storytelling." + "_Explain what you will do and why here in the Markdown cell. This includes everything that has to do with the talktorial's storytelling._" ] }, { @@ -179,15 +324,61 @@ "metadata": {}, "outputs": [], "source": [ - "# Add comments in the Code cell if you want to comment on coding decisions" + "# Add comments in the code cell if you want to comment on coding decisions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "__Functions__: \n", + " \n", + "- Please add [numpy docstrings](https://numpydoc.readthedocs.io/en/latest/format.html) to your functions.\n", + "- Please expose all variables used within a function in the function's signature (i.e. they must be a function parameter), unless they are created within the scope of the function. \n", + "- Please add comments to the steps performed in the function.\n", + "\n", + "
" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "def calculate_ro5_properties(smiles):\n", + " \"\"\"\n", + " Test if input molecule (SMILES) fulfills Lipinski's rule of five.\n", + "\n", + " Parameters\n", + " ----------\n", + " smiles : str\n", + " SMILES for a molecule.\n", + "\n", + " Returns\n", + " -------\n", + " pandas.Series\n", + " Molecular weight, number of hydrogen bond acceptors/donor and logP value\n", + " and Lipinski's rule of five compliance for input molecule.\n", + " \"\"\"\n", + " # RDKit molecule from SMILES\n", + " molecule = Chem.MolFromSmiles(smiles)\n", + " # Calculate Ro5-relevant chemical properties\n", + " molecular_weight = Descriptors.ExactMolWt(molecule)\n", + " n_hba = Descriptors.NumHAcceptors(molecule)\n", + " n_hbd = Descriptors.NumHDonors(molecule)\n", + " logp = Descriptors.MolLogP(molecule)\n", + " # Ro5 conditions fulfilled?\n", + " conditions = [molecular_weight <= 500, n_hba <= 10, n_hbd <= 5, logp <= 5]\n", + " ro5_fulfilled = sum(conditions) >= 3\n", + " # Return True if no more than one out of four conditions is violated\n", + " return pd.Series(\n", + " [molecular_weight, n_hba, n_hbd, logp, ro5_fulfilled],\n", + " index=[\"molecular_weight\", \"n_hba\", \"n_hbd\", \"logp\", \"ro5_fulfilled\"],\n", + " )" + ] }, { "cell_type": "markdown", @@ -200,15 +391,17 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Explain what you will do." + "_Explain what you will do and why here in the Markdown cell. This includes everything that has to do with the talktorial's storytelling._" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "# Add comments in the code cell if you want to comment on coding decisions" + ] }, { "cell_type": "code", @@ -238,6 +431,28 @@ "2. Question\n", "3. Question" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "\n", + "__Useful checks at the end__: \n", + " \n", + "- Clear output and rerun your runtime. Does it finish without errors?\n", + "- Check if your talktorial's runtime is as excepted. If not, try to find out which step(s) take unexpectedly long. \n", + "- Flag code cells with `# TODO: CI` that have deterministic output and should be tested within our Continuous Integration (CI) framework.\n", + "\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -256,7 +471,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.8.6" } }, "nbformat": 4, From ea02adca1e9ee97a62d9953e6c9a89830a7be69c Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 16:39:56 +0100 Subject: [PATCH 3/9] Use HTML instead of Markdown format in highlighted boxes --- teachopencadd/talktorials/T000_template/talktorial.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teachopencadd/talktorials/T000_template/talktorial.ipynb b/teachopencadd/talktorials/T000_template/talktorial.ipynb index ef1f8775..17764610 100644 --- a/teachopencadd/talktorials/T000_template/talktorial.ipynb +++ b/teachopencadd/talktorials/T000_template/talktorial.ipynb @@ -6,7 +6,7 @@ "source": [ "
\n", "\n", - "__Thank you for contributing to TeachOpenCADD!__\n", + "Thank you for contributing to TeachOpenCADD!\n", "\n", "
" ] @@ -17,7 +17,7 @@ "source": [ "
\n", "\n", - "__Set up your PR__: Please check out our [issue](https://github.com/volkamerlab/teachopencadd/issues/41) on how to set up a PR for new talktorials, including standard checks and TODOs.\n", + "Set up your PR: Please check out our issue on how to set up a PR for new talktorials, including standard checks and TODOs.\n", "\n", "
" ] From cf5db6f2b5929540fc22de8487a49c86e516eb59 Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 16:53:18 +0100 Subject: [PATCH 4/9] Add more HTML (still problems with monospaced stuff) --- .../T000_template/talktorial.ipynb | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/teachopencadd/talktorials/T000_template/talktorial.ipynb b/teachopencadd/talktorials/T000_template/talktorial.ipynb index 17764610..e85d5464 100644 --- a/teachopencadd/talktorials/T000_template/talktorial.ipynb +++ b/teachopencadd/talktorials/T000_template/talktorial.ipynb @@ -47,7 +47,7 @@ "source": [ "
\n", "\n", - "__Cross-referencing talktorials__: If you want to cross-reference to existing talktorials in your notebook, please use the following formatting: __Talktorial T000__ (Markdown: `__Talktorial T000__`)\n", + "Cross-referencing talktorials: If you want to cross-reference to existing talktorials in your notebook, please use the following formatting: Talktorial T000 (Markdown: __Talktorial T000__)\n", "\n", "
" ] @@ -144,7 +144,7 @@ "source": [ "
\n", " \n", - "Beware of section levels: Please check if you are using the correct subsection levels. The section Theory is in Markdown `## Theory`, so every subsection within Theory is `###` or lower.\n", + "Beware of section levels: Please check if you are using the correct subsection levels. The section Theory is in Markdown ## Theory, so every subsection within Theory is ### or lower.\n", "\n", "
" ] @@ -169,7 +169,7 @@ "source": [ "
\n", " \n", - "__Figures__: Place images in the `images/` folder and include them using Markdown `![Figure title](images/some_figure.jpg)`.\n", + "Figures: Place images in the images/ folder and include them using Markdown ![Figure title](images/some_figure.jpg).\n", "\n", "
" ] @@ -237,7 +237,7 @@ "source": [ "
\n", " \n", - "Beware of section levels: Please check if you are using the correct subsection levels. The section Practical is in Markdown `## Practical`, so every subsection within Practical is `###` or lower.\n", + "Beware of section levels: Please check if you are using the correct subsection levels. The section Practical is in Markdown ## Practical, so every subsection within Practical is ### or lower.\n", "\n", "
" ] @@ -274,8 +274,8 @@ "source": [ "
\n", "\n", - "__Imports__: Please add all your imports on top of this section, ordered by standard library / 3rd party packages / our own (`teachopencadd.*`). \n", - "Read more on imports and import order in the [\"PEP 8 -- Style Guide for Python Code\"](https://www.python.org/dev/peps/pep-0008/#imports).\n", + "Imports: Please add all your imports on top of this section, ordered by standard library / 3rd party packages / our own (teachopencadd.*). \n", + "Read more on imports and import order in the \"PEP 8 -- Style Guide for Python Code\".\n", " \n", "
" ] @@ -296,10 +296,10 @@ "source": [ "
\n", "\n", - "__Relative paths__: Please do not use relative paths to example input/output data or images that you would like to include.\n", - "Instead add this talktorial's path to the global `HERE`. Define all paths relative to this path.\n", + "Relative paths: Please do not use relative paths to example input/output data or images that you would like to include.\n", + "Instead add this talktorial's path to the global HERE. Define all paths relative to this path.\n", "\n", - "If your talktorial has input/output data, please define the global `DATA`, which points to this talktorial's data folder (check out the default folder structure of each talktorial).\n", + "If your talktorial has input/output data, please define the global DATA, which points to this talktorial's data folder (check out the default folder structure of each talktorial).\n", " \n", "
" ] @@ -333,9 +333,9 @@ "source": [ "
\n", "\n", - "__Functions__: \n", + "Functions: \n", " \n", - "- Please add [numpy docstrings](https://numpydoc.readthedocs.io/en/latest/format.html) to your functions.\n", + "- Please add numpy docstrings to your functions.\n", "- Please expose all variables used within a function in the function's signature (i.e. they must be a function parameter), unless they are created within the scope of the function. \n", "- Please add comments to the steps performed in the function.\n", "\n", @@ -438,11 +438,11 @@ "source": [ "
\n", "\n", - "__Useful checks at the end__: \n", + "Useful checks at the end: \n", " \n", "- Clear output and rerun your runtime. Does it finish without errors?\n", "- Check if your talktorial's runtime is as excepted. If not, try to find out which step(s) take unexpectedly long. \n", - "- Flag code cells with `# TODO: CI` that have deterministic output and should be tested within our Continuous Integration (CI) framework.\n", + "- Flag code cells with # TODO: CI that have deterministic output and should be tested within our Continuous Integration (CI) framework.\n", "\n", "
" ] From 2827efcc80debea34bbf4a55b299301544e6d209 Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 16:55:46 +0100 Subject: [PATCH 5/9] Fix HTML bugs --- teachopencadd/talktorials/T000_template/talktorial.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teachopencadd/talktorials/T000_template/talktorial.ipynb b/teachopencadd/talktorials/T000_template/talktorial.ipynb index e85d5464..afde5d0c 100644 --- a/teachopencadd/talktorials/T000_template/talktorial.ipynb +++ b/teachopencadd/talktorials/T000_template/talktorial.ipynb @@ -47,7 +47,7 @@ "source": [ "
\n", "\n", - "Cross-referencing talktorials: If you want to cross-reference to existing talktorials in your notebook, please use the following formatting: Talktorial T000 (Markdown: __Talktorial T000__)\n", + "Cross-referencing talktorials: If you want to cross-reference to existing talktorials in your notebook, please use the following formatting: Talktorial T000.\n", "\n", "
" ] From fa9ede0f97da23ab4da335d67d5613701387d995 Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 17:02:06 +0100 Subject: [PATCH 6/9] Fix more HTML bugs --- .../T000_template/talktorial.ipynb | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/teachopencadd/talktorials/T000_template/talktorial.ipynb b/teachopencadd/talktorials/T000_template/talktorial.ipynb index afde5d0c..1f8ea6b3 100644 --- a/teachopencadd/talktorials/T000_template/talktorial.ipynb +++ b/teachopencadd/talktorials/T000_template/talktorial.ipynb @@ -133,7 +133,7 @@ "source": [ "
\n", "\n", - "Sync section titles with TOC: Please make sure that all section titles in the Theory section are synced with with bullet point list provided in the Aim of this talktorial > Contents in Theory section.\n", + "Sync section titles with TOC: Please make sure that all section titles in the Theory section are synced with the bullet point list provided in the Aim of this talktorial > Contents in Theory section.\n", "\n", "
" ] @@ -144,7 +144,7 @@ "source": [ "
\n", " \n", - "Beware of section levels: Please check if you are using the correct subsection levels. The section Theory is in Markdown ## Theory, so every subsection within Theory is ### or lower.\n", + "Beware of section levels: Please check if you are using the correct subsection levels. The section Theory is written in Markdown as ## Theory, so every subsection within Theory is ### or lower.\n", "\n", "
" ] @@ -226,7 +226,7 @@ "source": [ "
\n", "\n", - "Sync section titles with TOC: Please make sure that all section titles in the Practical section are synced with with bullet point list provided in the Aim of this talktorial > Contents in Practical section.\n", + "Sync section titles with TOC: Please make sure that all section titles in the Practical section are synced with the bullet point list provided in the Aim of this talktorial > Contents in Practical section.\n", "\n", "
" ] @@ -237,7 +237,7 @@ "source": [ "
\n", " \n", - "Beware of section levels: Please check if you are using the correct subsection levels. The section Practical is in Markdown ## Practical, so every subsection within Practical is ### or lower.\n", + "Beware of section levels: Please check if you are using the correct subsection levels. The section Practical is written in Markdown as ## Practical, so every subsection within Practical is ### or lower.\n", "\n", "
" ] @@ -334,11 +334,13 @@ "
\n", "\n", "Functions: \n", - " \n", - "- Please add numpy docstrings to your functions.\n", - "- Please expose all variables used within a function in the function's signature (i.e. they must be a function parameter), unless they are created within the scope of the function. \n", - "- Please add comments to the steps performed in the function.\n", "\n", + "
    \n", + "
  • Please add numpy docstrings to your functions.
  • \n", + "
  • Please expose all variables used within a function in the function's signature (i.e. they must be a function parameter), unless they are created within the scope of the function.
  • \n", + "
  • Please add comments to the steps performed in the function.
  • \n", + "
\n", + " \n", "
" ] }, @@ -440,9 +442,11 @@ "\n", "Useful checks at the end: \n", " \n", - "- Clear output and rerun your runtime. Does it finish without errors?\n", - "- Check if your talktorial's runtime is as excepted. If not, try to find out which step(s) take unexpectedly long. \n", - "- Flag code cells with # TODO: CI that have deterministic output and should be tested within our Continuous Integration (CI) framework.\n", + "
    \n", + "
  • Clear output and rerun your runtime. Does it finish without errors?
  • \n", + "
  • Check if your talktorial's runtime is as excepted. If not, try to find out which step(s) take unexpectedly long.
  • \n", + "
  • Flag code cells with # TODO: CI that have deterministic output and should be tested within our Continuous Integration (CI) framework.
  • \n", + "
\n", "\n", "
" ] From 0cf998e5ce65483e52bbf260fc1702c05d543811 Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 17:19:04 +0100 Subject: [PATCH 7/9] Refine info boxes --- .../T000_template/talktorial.ipynb | 74 ++++++++++++++----- 1 file changed, 56 insertions(+), 18 deletions(-) diff --git a/teachopencadd/talktorials/T000_template/talktorial.ipynb b/teachopencadd/talktorials/T000_template/talktorial.ipynb index 1f8ea6b3..7fe37cf3 100644 --- a/teachopencadd/talktorials/T000_template/talktorial.ipynb +++ b/teachopencadd/talktorials/T000_template/talktorial.ipynb @@ -58,7 +58,7 @@ "source": [ "## Aim of this talktorial\n", "\n", - "Short summary of this talktorial's content." + "Add a short summary of this talktorial's content." ] }, { @@ -67,6 +67,8 @@ "source": [ "### Contents in *Theory*\n", "\n", + "_Add Table of Contents (TOC) for Theory section._\n", + "\n", "* ChEMBL database\n", "* Compound activity measures" ] @@ -77,7 +79,7 @@ "source": [ "
\n", "\n", - "Sync section titles with TOC: These points should refer to the headlines of your Theory section below.\n", + "Sync TOC with section titles: These points should refer to the headlines of your Theory section below.\n", "\n", "
" ] @@ -88,6 +90,8 @@ "source": [ "### Contents in *Practical*\n", "\n", + "_Add Table of Contents (TOC) for Practical section._\n", + "\n", "* Connect to ChEMBL database\n", "* Load and draw molecules" ] @@ -98,7 +102,7 @@ "source": [ "
\n", "\n", - "Sync section titles with TOC: These points should refer to the headlines of your Theory section below.\n", + "Sync TOC with section titles: These points should refer to the headlines of your Practical section below.\n", "\n", "
" ] @@ -163,13 +167,24 @@ "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![ChEMBL web service schema](images/chembl_webservices_schema_diagram.jpg)\n", + "\n", + "*Figure 1:* \n", + "Describe figure and add reference.\n", + "Figure and description taken from: [Nucleic Acids Res. (2015), 43, 612-620](https://academic.oup.com/nar/article/43/W1/W612/2467881)." + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", " \n", - "Figures: Place images in the images/ folder and include them using Markdown ![Figure title](images/some_figure.jpg).\n", + "Figures: Place images in the images/ folder and include them using Markdown ![Figure title](images/some_figure.jpg). Add a figure caption in the format provided below.\n", "\n", "
" ] @@ -178,32 +193,53 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "![ChEMBL web service schema](images/chembl_webservices_schema_diagram.jpg)\n", - "\n", - "*Figure 1:* \n", - "Describe figure and add reference.\n", - "Figure and description taken from: [Nucleic Acids Res. (2015), 43, 612-620](https://academic.oup.com/nar/article/43/W1/W612/2467881)." + "### Compound activity measures" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Compound activity measures" + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "$pIC_{50} = -log_{10}(IC_{50}*10^{-9})= 9-log_{10}(IC_{50}) $" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + " \n", + "Formulas: Please use LaTeX to format formulas.\n", + "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\n", + "If you place links, please link descriptive words.\n", "\n", - "Please use LaTeX to format formulas: $pIC_{50} = -log_{10}(IC_{50}*10^{-9})= 9-log_{10}(IC_{50}) $\n", + "> __Yes__: [ChEMBL](https://www.ebi.ac.uk/chembl/) is a manually curated database of bioactive molecules\n", "\n", - "If you place links, please link descriptive words.\n", - "> **Yes**: This figure is licensed under [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/).\n", + "> __No__: ChEMBL ([here](https://www.ebi.ac.uk/chembl/)) is a manually curated database of bioactive molecules" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + " \n", + "Links: If you place links, please link descriptive words.\n", "\n", - "> **No**: This figure is licensed under CC BY-SA 3.0 ([here](https://creativecommons.org/licenses/by-sa/3.0/))." + "
" ] }, { @@ -217,7 +253,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Short summary of what will be done in this practical section." + "Add short summary of what will be done in this practical section." ] }, { @@ -296,9 +332,11 @@ "source": [ "
\n", "\n", - "Relative paths: Please do not use relative paths to example input/output data or images that you would like to include.\n", + "Relative paths: Please do not use relative paths to example input/output data or images.\n", "Instead add this talktorial's path to the global HERE. Define all paths relative to this path.\n", "\n", + "
\n", + " \n", "If your talktorial has input/output data, please define the global DATA, which points to this talktorial's data folder (check out the default folder structure of each talktorial).\n", " \n", "
" @@ -337,7 +375,7 @@ "\n", "
    \n", "
  • Please add numpy docstrings to your functions.
  • \n", - "
  • Please expose all variables used within a function in the function's signature (i.e. they must be a function parameter), unless they are created within the scope of the function.
  • \n", + "
  • Please expose all variables used within a function in the function's signature (i.e. they must be function parameters), unless they are created within the scope of the function.
  • \n", "
  • Please add comments to the steps performed in the function.
  • \n", "
\n", " \n", From 950fa5b4c3d86175b63f37981beab90e493d6632 Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 18:44:31 +0100 Subject: [PATCH 8/9] Add @AndreaVolkamer's suggestions --- .../talktorials/T000_template/talktorial.ipynb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/teachopencadd/talktorials/T000_template/talktorial.ipynb b/teachopencadd/talktorials/T000_template/talktorial.ipynb index 7fe37cf3..dbad3a4f 100644 --- a/teachopencadd/talktorials/T000_template/talktorial.ipynb +++ b/teachopencadd/talktorials/T000_template/talktorial.ipynb @@ -38,7 +38,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_The examples used in this talktorial template are taken from __Talktorial T001__._" + "_The examples used in this talktorial template are taken from [__Talktorial T001__](https://github.com/volkamerlab/teachopencadd/blob/master/teachopencadd/talktorials/T001_query_chembl/talktorial.ipynb) and [__Talktorial T002__](https://github.com/volkamerlab/teachopencadd/blob/master/teachopencadd/talktorials/T002_compound_adme/talktorial.ipynb)._" ] }, { @@ -79,7 +79,7 @@ "source": [ "
\n", "\n", - "Sync TOC with section titles: These points should refer to the headlines of your Theory section below.\n", + "Sync TOC with section titles: These points should refer to the headlines of your Theory section.\n", "\n", "
" ] @@ -102,7 +102,7 @@ "source": [ "
\n", "\n", - "Sync TOC with section titles: These points should refer to the headlines of your Practical section below.\n", + "Sync TOC with section titles: These points should refer to the headlines of your Practical section.\n", "\n", "
" ] @@ -184,7 +184,7 @@ "source": [ "
\n", " \n", - "Figures: Place images in the images/ folder and include them using Markdown ![Figure title](images/some_figure.jpg). Add a figure caption in the format provided below.\n", + "Figures: Place images in the images/ folder and include them using Markdown ![Figure title](images/some_figure.jpg). Add a figure caption in the format shown in the example.\n", "\n", "
" ] @@ -332,11 +332,7 @@ "source": [ "
\n", "\n", - "Relative paths: Please do not use relative paths to example input/output data or images.\n", - "Instead add this talktorial's path to the global HERE. Define all paths relative to this path.\n", - "\n", - "
\n", - " \n", + "Relative paths: Please define all paths relative to this talktorial's path by using the global variable HERE.\n", "If your talktorial has input/output data, please define the global DATA, which points to this talktorial's data folder (check out the default folder structure of each talktorial).\n", " \n", "
" @@ -377,6 +373,7 @@ "
  • Please add numpy docstrings to your functions.
  • \n", "
  • Please expose all variables used within a function in the function's signature (i.e. they must be function parameters), unless they are created within the scope of the function.
  • \n", "
  • Please add comments to the steps performed in the function.
  • \n", + "
  • Please use meaningful function and parameter names. This applies also to variable names.
  • \n", "\n", " \n", "" @@ -481,7 +478,7 @@ "Useful checks at the end: \n", " \n", "
      \n", - "
    • Clear output and rerun your runtime. Does it finish without errors?
    • \n", + "
    • Clear output and rerun your complete notebook. Does it finish without errors?
    • \n", "
    • Check if your talktorial's runtime is as excepted. If not, try to find out which step(s) take unexpectedly long.
    • \n", "
    • Flag code cells with # TODO: CI that have deterministic output and should be tested within our Continuous Integration (CI) framework.
    • \n", "
    \n", From 912e39d4f2e541ed74b81d16abe581fadd2ef412 Mon Sep 17 00:00:00 2001 From: dominiquesydow Date: Tue, 15 Dec 2020 18:47:17 +0100 Subject: [PATCH 9/9] Minor formatting bug --- teachopencadd/talktorials/T000_template/talktorial.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teachopencadd/talktorials/T000_template/talktorial.ipynb b/teachopencadd/talktorials/T000_template/talktorial.ipynb index dbad3a4f..55887606 100644 --- a/teachopencadd/talktorials/T000_template/talktorial.ipynb +++ b/teachopencadd/talktorials/T000_template/talktorial.ipynb @@ -38,7 +38,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "_The examples used in this talktorial template are taken from [__Talktorial T001__](https://github.com/volkamerlab/teachopencadd/blob/master/teachopencadd/talktorials/T001_query_chembl/talktorial.ipynb) and [__Talktorial T002__](https://github.com/volkamerlab/teachopencadd/blob/master/teachopencadd/talktorials/T002_compound_adme/talktorial.ipynb)._" + "*The examples used in this talktorial template are taken from [__Talktorial T001__](https://github.com/volkamerlab/teachopencadd/blob/master/teachopencadd/talktorials/T001_query_chembl/talktorial.ipynb) and [__Talktorial T002__](https://github.com/volkamerlab/teachopencadd/blob/master/teachopencadd/talktorials/T002_compound_adme/talktorial.ipynb).*" ] }, {