Skip to content

Commit

Permalink
allow run all on notebooks that have pip install for google colab
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera committed Oct 7, 2024
1 parent 26f36e2 commit fc72b03
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 28 deletions.
12 changes: 8 additions & 4 deletions docs/notebooks/CRISPR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Install pydna \n",
"%%capture\n",
"!pip install pydna"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand All @@ -54,7 +59,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},

"outputs": [
{
"name": "stdout",
Expand Down
11 changes: 8 additions & 3 deletions docs/notebooks/Dseq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Install pydna \n",
"%%capture\n",
"!pip install pydna"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand Down
11 changes: 8 additions & 3 deletions docs/notebooks/Dseq_Features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Install pydna \n",
"%%capture\n",
"!pip install pydna"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand Down
11 changes: 8 additions & 3 deletions docs/notebooks/Example_CRISPR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,14 @@
"metadata": {},
"outputs": [],
"source": [
"#Install pydna for colab.\n",
"%%capture\n",
"!pip install git+https://github.com/BjornFJohansson/pydna.git@dev_bjorn"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand Down
11 changes: 8 additions & 3 deletions docs/notebooks/Example_Gibson.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Install pydna \n",
"%%capture\n",
"!pip install pydna"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand Down
25 changes: 25 additions & 0 deletions docs/notebooks/Example_Restriction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,31 @@
"Source files can be found alongside this notebook, if you would like to follow along. Annotations are made alongside the code to describe key steps."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a target=\"_blank\" href=\"https://colab.research.google.com/github/BjornFJohansson/pydna/blob/dev_bjorn/docs/notebooks/Example_Gibson.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
11 changes: 8 additions & 3 deletions docs/notebooks/Gibson.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Install pydna \n",
"%%capture\n",
"!pip install pydna"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand Down
11 changes: 8 additions & 3 deletions docs/notebooks/Importing_Seqs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Install pydna \n",
"%%capture\n",
"!pip install pydna"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand Down
11 changes: 8 additions & 3 deletions docs/notebooks/PCR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Install pydna \n",
"%%capture\n",
"!pip install pydna"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand Down
11 changes: 8 additions & 3 deletions docs/notebooks/Restrict_Ligate_Cloning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@
"metadata": {},
"outputs": [],
"source": [
"# Install pydna \n",
"%%capture\n",
"!pip install pydna"
"# Install pydna (only when running on Colab)\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" %%capture\n",
" # Install the current development version of pydna (comment to install pip version)\n",
" !pip install git+https://github.com/BjornFJohansson/pydna@dev_bjorn\n",
" # Install pip version instead (uncomment to install)\n",
" # !pip install pydna\n"
]
},
{
Expand Down

0 comments on commit fc72b03

Please sign in to comment.