Skip to content

Commit

Permalink
removed mamba installation in Google Cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
hadiparsianNIH authored Feb 10, 2025
1 parent fa24555 commit 2a79677
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 91 deletions.
9 changes: 1 addition & 8 deletions AWS/tutorial_1-bismark.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,7 @@
"source": [
"#### Installation of the tools for Tutorial 1 and 2 using <code>mamba</code>\n",
"\n",
"[**mamba**](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) is a re-implementation of the conda package manager in C++. It uses the same commands and configuration options as conda. The only difference is that you should still use conda for activation and deactivation."
]
},
{
"cell_type": "markdown",
"id": "f0dbeb53-d416-40a3-b5b9-64ea7e58ea62",
"metadata": {},
"source": [
"[**mamba**](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) is a re-implementation of the conda package manager in C++. Using mamba and bioconda, install the tools that will be used in this tutorial.\n",
"<div class= \"alert alert-block alert-info\"><b>Tip</b>: use <code>\\</code> to break a long command into multiple lines</div>"
]
},
Expand Down
38 changes: 1 addition & 37 deletions GoogleCloud/tutorial_1-bismark.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,43 +101,6 @@
"</div>"
]
},
{
"cell_type": "markdown",
"id": "8dea8fc8-2a8a-44a1-9fa6-4ae59593d887",
"metadata": {},
"source": [
"#### Mamba \n",
"\n",
"[**mamba**](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) is a re-implementation of the conda package manager in C++. It uses the same commands and configuration options as conda. The only difference is that you should still use conda for activation and deactivation. Once conda is installed, we will install `mamba` and use it to install all the tools we are going to use in Tutorial 1 and 2. \n",
"> **Installation**: conda -> mamba -> other tools\n",
"\n",
"The script below installs `mamba` via Miniforge."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "918ebef6-99e3-4096-b2d1-2f183c626f92",
"metadata": {},
"outputs": [],
"source": [
"! curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh\n",
"! bash Miniforge3-$(uname)-$(uname -m).sh -b -p $HOME/miniforge"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "59a0266e-9afa-4695-af55-ece62a3713be",
"metadata": {},
"outputs": [],
"source": [
"#This need to be run at the start of every notebook\n",
"#add to your path\n",
"import os\n",
"os.environ[\"PATH\"] += os.pathsep + os.environ[\"HOME\"]+\"/miniforge/bin\""
]
},
{
"cell_type": "markdown",
"id": "37bdd323-c35b-4e41-a623-24ee7e263e11",
Expand All @@ -151,6 +114,7 @@
"id": "f0dbeb53-d416-40a3-b5b9-64ea7e58ea62",
"metadata": {},
"source": [
"[**mamba**](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) is a re-implementation of the conda package manager in C++. Using mamba and bioconda, install the tools that will be used in this tutorial.\n",
"<div class= \"alert alert-block alert-info\"><b>Tip</b>: use <code>\\</code> to break a long command into multiple lines</div>"
]
},
Expand Down
16 changes: 8 additions & 8 deletions GoogleCloud/tutorial_2-metilene.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"\n",
"### Install metilene\n",
"\n",
"If you've followed the previous Bismark tutorial (tutorial_1-bismark.ipynb), metilene should already be installed in the instance. If not, please use the following command to install metilene: `! conda install -y -c conda-forge -c bioconda samtools=1.15.* metilene`"
"If you've followed the previous Bismark tutorial (tutorial_1-bismark.ipynb), metilene should already be installed in the instance. If not, please use the following command to install metilene: `! mamba install -y -c conda-forge -c bioconda samtools=1.15.* metilene`"
]
},
{
Expand Down Expand Up @@ -136,7 +136,7 @@
"outputs": [],
"source": [
"# Sort all the methylation files\n",
"!for file_name in Tutorial_2/*bedGraph.gz; do \\\n",
"! for file_name in Tutorial_2/*bedGraph.gz; do \\\n",
" sortBed -i ${file_name} > ${file_name//_R1_val_1_bismark_bt2_pe.deduplicated.bedGraph.gz/.bedgraph}; \\\n",
"done;"
]
Expand Down Expand Up @@ -233,7 +233,7 @@
"metadata": {},
"outputs": [],
"source": [
"!metilene -a serum -b 2i Tutorial_2/metilene.input | sort -V -k1,1 -k2,2n > Tutorial_2/metilene_denovo.output"
"! metilene -a serum -b 2i Tutorial_2/metilene.input | sort -V -k1,1 -k2,2n > Tutorial_2/metilene_denovo.output"
]
},
{
Expand All @@ -259,7 +259,7 @@
"metadata": {},
"outputs": [],
"source": [
"!metilene -a serum -b 2i -f 2 -B Tutorial_1/fastq/cpgIslandExt_mm39_chr6.bed Tutorial_2/metilene.input | sort -V -k1,1 -k2,2n > Tutorial_2/metilene_cgi.output"
"! metilene -a serum -b 2i -f 2 -B Tutorial_1/fastq/cpgIslandExt_mm39_chr6.bed Tutorial_2/metilene.input | sort -V -k1,1 -k2,2n > Tutorial_2/metilene_cgi.output"
]
},
{
Expand All @@ -286,8 +286,8 @@
"metadata": {},
"outputs": [],
"source": [
"!metilene_output.pl -q Tutorial_2/metilene_denovo.output -o Tutorial_2/denovo -a serum -b 2i\n",
"!metilene_output.pl -q Tutorial_2/metilene_cgi.output -o Tutorial_2/cgi -a serum -b 2i"
"! metilene_output.pl -q Tutorial_2/metilene_denovo.output -o Tutorial_2/denovo -a serum -b 2i\n",
"! metilene_output.pl -q Tutorial_2/metilene_cgi.output -o Tutorial_2/cgi -a serum -b 2i"
]
},
{
Expand Down Expand Up @@ -411,7 +411,7 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install jupytercards --quiet\n",
"! pip install jupytercards --quiet\n",
"from jupytercards import display_flashcards\n",
"display_flashcards('../quiz_files/f2.json')"
]
Expand All @@ -423,7 +423,7 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install jupyterquiz --quiet\n",
"! pip install jupyterquiz --quiet\n",
"from jupyterquiz import display_quiz\n",
"display_quiz('../quiz_files/q2.json')"
]
Expand Down
4 changes: 2 additions & 2 deletions GoogleCloud/tutorial_4-methylseq2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"outputs": [],
"source": [
"#faster way to compress the files\n",
"!pigz Tutorial_4/sra_download/SRR*"
"! pigz Tutorial_4/sra_download/SRR*"
]
},
{
Expand Down Expand Up @@ -607,7 +607,7 @@
"outputs": [],
"source": [
"#use the file names listed in here\n",
"!ls null/pipeline_info"
"! ls null/pipeline_info"
]
},
{
Expand Down
38 changes: 2 additions & 36 deletions GoogleCloud/tutorial_5-BonusNotebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,49 +64,15 @@
"id": "27af056b-5062-41e4-968c-d363e9420d7d",
"metadata": {},
"source": [
"## Get Started\n",
"The dependencies are installed the same way, so we run the next few cells the same way as in Tutorial 1. Try to install mamba below."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f2d4f954-2881-43b9-9f32-839b5fd8a6b5",
"metadata": {},
"outputs": [],
"source": [
"<YOUR COMMAND HERE>"
]
},
{
"cell_type": "markdown",
"id": "d5c499de-f301-4991-85de-ec2e4b2beb41",
"metadata": {},
"source": [
"<details>\n",
" <summary>Click for help</summary>\n",
" \n",
" Make sure you include the `!` in front of your command if it is a bash command.\n",
" \n",
" \n",
"`! curl -L -O https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh`\n",
"`! bash Miniforge3-$(uname)-$(uname -m).sh -b -p $HOME/miniforge` \n",
" \n",
" Remember to add mamba to the path. \n",
" \n",
"`import os` \n",
"`os.environ[\"PATH\"] += os.pathsep + os.environ[\"HOME\"]+\"/miniforge/bin\"`\n",
" \n",
"\n",
"</details>"
"## Get Started"
]
},
{
"cell_type": "markdown",
"id": "4d1cd3f7-38f0-4606-8b3c-0c5c6dc26fe2",
"metadata": {},
"source": [
"Next, use mamba to install the tools needed for this analysis: fastqc, multiqc bismark, trim-galore, bedtools, samtools, and metilene. Remember to set the channel to bioconda in order to access the bioinformatics tools."
"Use mamba to install the tools needed for this analysis: fastqc, multiqc bismark, trim-galore, bedtools, samtools, and metilene. Remember to set the channel to bioconda in order to access the bioinformatics tools."
]
},
{
Expand Down

0 comments on commit 2a79677

Please sign in to comment.