TITLE: Setting up  the working environment
AUTHORS: Khalid  El Moussaoui

[DESCRIPTION]
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]
SECTION: xCode command line tools
1. Open a terminal window.
 

SECTION: xCode command line tools
2. Type the following command in the terminal to install xCode command line tools :
 
A pop-up window opens, click on install and then accept.
SECTION: Miniconda
3. 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.
SECTION: Miniconda
4. 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. 
 

SECTION: Miniconda
5. To verify that the installation was successful, open a terminal window and enter the following command :
 
If a message appears stating "Conda 4.11.0", the installation has been successful.
SECTION: Homebrew
7. Open a terminal window and type the following command :
 
Enter the session password and then press enter. Wait until the installation closes.
SECTION: Homebrew
8. Type the following 2 commands in the terminal to add homebrew to your PATH :
 

SECTION: Homebrew
9. To verify the installation, type the following command in the terminal :
 
If a message appears stating "Homebrew 3.4.11", the installation has been successful
SECTION: Creation and configuration of QC_env
10. Open a terminal window and type the following command to create a working environment under conda :
 
Confirm by pressing "Y" followed by enter.
SECTION: Miniconda
6. Update conda by typing the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of QC_env
11. Activate the QC_env environment created in the previous step by typing the following command in the terminal :
 

SECTION: Creation and configuration of QC_env
12. The first tool to install in this environment is fastQC. To do this, type the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of QC_env
13. The second tool to install in this environment is multiQC. To do this, type the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of QC_env
14. The last tool to install in this environment is fastp. To do this, type the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of QC_env
15. To verify that the installation was successful, type the following 3 commands one by one in the terminal :
 
If these 3 commands generate a message with a version number, the installation was successful.
SECTION: Creation and configuration of denovo_env
17. Open a terminal window and type the following command to create a working environment under conda :

 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of denovo_env
18. Activate the denovo_env environment created in the previous step by typing the following command in the terminal :
 

SECTION: Creation and configuration of denovo_env
19. The first tool to install in this environment is quast. To do this, type the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of denovo_env
20. The second tool to install in this environment is megahit. To do this, type the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of denovo_env
21. The third tool to install in this environment is the Burrows-Wheeler Aligner (BWA). To do this, type the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of denovo_env
22. 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 :
 
Put the bin and share folders from the decompression of the downloaded archive there.
SECTION: Creation and configuration of denovo_env
23. Run the following commands in a terminal window to create the necessary folders within the previously created spades folder :
 

SECTION: Creation and configuration of denovo_env
24. To run SPAdes, execute this command in a terminal window :

 
If you get a message "SPAdes genome assembler v3.15.4", your installation is functional.
SECTION: Creation and configuration of denovo_env
25. The fifth tool to install in this environment is samtools. To do this, type the following command in the terminal :
 

SECTION: Creation and configuration of denovo_env
26. 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 :
 
Put the .jar file from the decompression of the downloaded archive in the bin folder.
SECTION: Creation and configuration of denovo_env
27. To run pilon, enter the following command in a terminal window :
 
If you get a message "Pilon version 1.24", your installation is functional.
SECTION: Creation and configuration of phylo_env
29. Open a terminal window and type the following command to create a working environment under conda :
 
Confirm by pressing "Y" followed by enter.

SECTION: Creation and configuration of phylo_env
30. Activate the phylo_env environment created in the previous step by typing the following command in the terminal :
 

SECTION: Creation and configuration of QC_env
16. Type this command in a terminal window to close this environment :
 

SECTION: Creation and configuration of denovo_env
28. Type this command in a terminal window to close this environment :
 

SECTION: Creation and configuration of phylo_env
31. The first tool to install in this environment is ITSx. To do this, type the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of phylo_env
32. The second tool to install in this environment is fastANI. To do this, type the following command in the terminal :
 

SECTION: KE_utilities configuration
36. Open a terminal window and type the following command to clone the drylab_workflow repository :
 
This creates a folder in the root of the user's directory, in which all the necessary scripts (python & R) are contained.
SECTION: 4peaks installation
37. 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.
SECTION: Seqotron installation
38. 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.
SECTION: Creation and configuration of phylo_env
33. The third tool to install in this environment is barrnap. To do this, type the following command in the terminal :
 
Confirm by pressing "Y" followed by enter.
SECTION: Creation and configuration of phylo_env
34. 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.
SECTION: Creation and configuration of phylo_env
35. Type this command in a terminal window to close this environment :
 

SECTION: R &amp; RStudio installation
39. 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.
SECTION: Setting up other folders
43. Open a terminal window and type the following command to create the necessary folders in the proper hierarchy :
 

SECTION: R &amp; RStudio installation
40. 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.
SECTION: R &amp; RStudio installation
41. To install the packages in RStudio, start the program and run the following commands :
 

SECTION: G*Power installation
42. 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.