Setting up the working environment
Khalid El Moussaoui
Disclaimer
DISCLAIMER – FOR INFORMATIONAL PURPOSES ONLY; USE AT YOUR OWN RISK
The protocol content here is for informational purposes only and does not constitute legal, medical, clinical, or safety advice, or otherwise; content added to protocols.io is not peer reviewed and may not have undergone a formal approval of any kind. Information presented in this protocol should not substitute for independent professional judgment, advice, diagnosis, or treatment. Any action you take or refrain from taking using or relying upon the information presented here is strictly at your own risk. You agree that neither the Company nor any of the authors, contributors, administrators, or anyone else associated with protocols.io, can be held responsible for your use of the information contained in or linked to this protocol or any of our Sites/Apps and Services.
Abstract
This protocol illustrates how to properly configure the work environment. In order to avoid a profusion of error messages, it is strongly recommended to follow this protocol to the letter. Attention: the commands are case sensitive (= lower case/upper case).
Steps
xCode command line tools
Open a terminal window.
Software
Value | Label |
---|---|
Terminal | NAME |
macOS Monterey | OS_NAME |
12.3.1 | OS_VERSION |
Apple Inc. | DEVELOPER |
2.12.5 | VERSION |
Type the following command in the terminal to install xCode command line tools :
xcode-select --install
```A pop-up window opens, click on install and then accept.
Miniconda
Download the installation file (.pkg) by clicking on the following link : https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.pkg
Once the download is complete, open the .pkg file by double-clicking it.
A Miniconda3 installation window opens. Another window opens, prompting the user to install the Rosetta2 emulation program. Click on install and then finish. The Miniconda3 installer will restart itself. Follow the installation instructions to the end and then, close the installer.
Software
Value | Label |
---|---|
Miniconda | NAME |
4.11.0 | VERSION |
To verify that the installation was successful, open a terminal window and enter the following command :
conda --version
```If a message appears stating "Conda 4.11.0", the installation has been successful.
Update conda by typing the following command in the terminal :
conda update -n base -c defaults conda
```Confirm by pressing "Y" followed by enter.
Homebrew
Open a terminal window and type the following command :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```Enter the session password and then press enter. Wait until the installation closes.
Type the following 2 commands in the terminal to add homebrew to your PATH :
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/khalid/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
To verify the installation, type the following command in the terminal :
brew --version
```If a message appears stating "Homebrew 3.4.11", the installation has been successful
Creation and configuration of QC_env
Open a terminal window and type the following command to create a working environment under conda :
conda create -n QC_env
```Confirm by pressing "Y" followed by enter.
Activate the QC_env environment created in the previous step by typing the following command in the terminal :
conda activate QC_env
The first tool to install in this environment is fastQC. To do this, type the following command in the terminal :
conda install -c bioconda fastqc
```Confirm by pressing "Y" followed by enter.
The second tool to install in this environment is multiQC. To do this, type the following command in the terminal :
conda install -c bioconda -c conda-forge multiqc
```Confirm by pressing "Y" followed by enter.
The last tool to install in this environment is fastp. To do this, type the following command in the terminal :
conda install -c bioconda fastp
```Confirm by pressing "Y" followed by enter.
To verify that the installation was successful, type the following 3 commands one by one in the terminal :
fastqc --version
multiqc --version
fastp --version
```If these 3 commands generate a message with a version number, the installation was successful.
Type this command in a terminal window to close this environment :
conda deactivate
Creation and configuration of denovo_env
Open a terminal window and type the following command to create a working environment under conda :
conda create -n denovo_env python=3.7
```Confirm by pressing "Y" followed by enter.
Activate the denovo_env environment created in the previous step by typing the following command in the terminal :
conda activate denovo_env
The first tool to install in this environment is quast. To do this, type the following command in the terminal :
conda install -c bioconda quast
```Confirm by pressing "Y" followed by enter.
The second tool to install in this environment is megahit. To do this, type the following command in the terminal :
conda install -c bioconda megahit
```Confirm by pressing "Y" followed by enter.
The third tool to install in this environment is the Burrows-Wheeler Aligner (BWA). To do this, type the following command in the terminal :
conda install -c bioconda bwa
```Confirm by pressing "Y" followed by enter.
The fourth tool to install in this environment is the SPAdes. The latter can be installed through conda just like the previous tools, but when it is run directly through the binaries, the performance are increased tenfold. The first step is to download the binaries from the SPAdes repository (https://github.com/ablab/spades). Attention: make sure you download the archive named "Darwin" if you are under macOS. The other archive is only compatible with the Linux operating system. After unzipping the archive, you have to create a folder at the root of the user directory by executing the following command in a terminal window :
mkdir spades
```Put the bin and share folders from the decompression of the downloaded archive there.
Run the following commands in a terminal window to create the necessary folders within the previously created spades folder :
cd spades
mkdir SPAdes_assemblies
To run SPAdes, execute this command in a terminal window :
python3 ~/spades/bin/spades.py
```If you get a message "SPAdes genome assembler v3.15.4", your installation is functional.
The fifth tool to install in this environment is samtools. To do this, type the following command in the terminal :
brew install samtools
The last tool to install in this environment is Pilon. The latter is distributed as a java package (https://github.com/broadinstitute/pilon). Download the archive, unpack it and run the following command in a terminal windows to create the appropriate folder in the root of the user directory :
mkdir ~/pilon/bin
```Put the .jar file from the decompression of the downloaded archive in the bin folder.
To run pilon, enter the following command in a terminal window :
java -jar ~/pilon/bin/pilon-1.24.jar
```If you get a message "Pilon version 1.24", your installation is functional.
Type this command in a terminal window to close this environment :
conda deactivate
Creation and configuration of phylo_env
Open a terminal window and type the following command to create a working environment under conda :
conda create -n phylo_env
```Confirm by pressing "Y" followed by enter.
Activate the phylo_env environment created in the previous step by typing the following command in the terminal :
conda activate phylo_env
The first tool to install in this environment is ITSx. To do this, type the following command in the terminal :
conda install -c bioconda itsx
```Confirm by pressing "Y" followed by enter.
The second tool to install in this environment is fastANI. To do this, type the following command in the terminal :
brew tap brewsci/bio
brew install fastani
The third tool to install in this environment is barrnap. To do this, type the following command in the terminal :
conda install -c bioconda -c conda-forge barrnap
```Confirm by pressing "Y" followed by enter.
The last tool needed is RAxMLGUI. It can be downloaded from the following link : https://antonellilab.github.io/raxmlGUI/
After downloading, double-click on the installation file and follow the instructions.
Type this command in a terminal window to close this environment :
conda deactivate
KE_utilities configuration
Open a terminal window and type the following command to clone the drylab_workflow repository :
git clone https://github.com/elmoussaoui-k/drylab_workflow
```This creates a folder in the root of the user's directory, in which all the necessary scripts (python & R) are contained.
4peaks installation
4peaks can be downloaded from the following link : https://nucleobytes.com/4peaks/
You just have to run the installation file by double-clicking on it and follow the installation instructions.
Seqotron installation
Seqotron can be downloaded from the repository : https://github.com/4ment/seqotron/releases/tag/v1.0.1
After downloading, double-click on the installation file and follow the instructions.
R & RStudio installation
R can be downloaded from the following link : https://www.freestatistics.org/cran/
After downloading, double-click on the installation file and follow the instructions.
Only after installing R, download RStudio from the following link: https://www.rstudio.com/products/rstudio/download/#download.
As always, after downloading, double-click on the installation file and follow the instructions.
To install the packages in RStudio, start the program and run the following commands :
install.packages("cowplot")
install.packages("dplyr")
install.packages("ggplot2")
install.packages("gmodels")
install.packages("gridExtra")
install.packages("KefiR")
install.packages("moments")
install.packages("reshape2")
install.packages("rstatix")
install.packages("tidyverse")
install.packages("viridis")
G*Power installation
G*Power can be downloaded from the following link : https://www.psychologie.hhu.de/fileadmin/redaktion/Fakultaeten/Mathematisch-Naturwissenschaftliche_Fakultaet/Psychologie/AAP/gpower/GPowerMac_3.1.9.6.zip
After downloading, double-click on the installation file and follow the instructions.
Setting up other folders
Open a terminal window and type the following command to create the necessary folders in the proper hierarchy :
mkdir ~/fastq_files
mkdir ~/md5
mkdir ~/fastqc_reports
mkdir ~/multiqc_report
mkdir ~/barrnap
mkdir ~/ITSx
mkdir ~/ref_genomes
mkdir -p ~/fastp/{cleaned_fastq_files,fastp_reports}
mkdir -p ~/sanger_seq/{SQLE_seq,ITS_seq}