Linux Software Installation – Exercises 1
Part 1. Setup Conda
1.1 Login to the BioHPC machine and download the installer
Login (ssh) to the machine that you are assigned for this workshop (assigned machines: https://biohpc.cornell.edu/ww/machines.aspx?i=128). Prepare the working directory, and download the latest version of Miniconda/python3 installer into the working directory.
1.2 Run the installer
The “chmod u+x” command makes the file executable.
During the installation, you will be asked for multiple questions:
1) “Please, press ENTER to continue”: press “ENTER” key;
2) “More”: keep pressing “SPACE” key until you reach next question;
3) “Do you accept the license terms?”: enter “yes”
4) “Miniconda3 will now be installed into this location … ”: press “ENTER” key and accept the default “/home/xxxxx/miniconda3”.
5) “Do you wish the installer to initialize Miniconda3” : Press ENTER to accept the default “no”;
1.3 Miniconda is ready.
Part 2. Install and run a simple software in Conda
2.1 Install bwa in Conda
2.2 Run bwa in Conda
Next time you login, to run bwa that you installed:
Part 3. Work with Conda environment
3.1 Create a virtual environment and give it a name “pysam”, install pysam the virtual environment
3.2 Start the pysam environment, and run python
“which python” “which pip”would tell you which python and pip you are using .
3.3 Install other python modules in this environment
3.4 End the environment
3.5. Now you installed pysam and numpy in miniconda3 in the home directory. Next time you need to use it in a new session, run these commands
Part 4. Create a Python2.7 environment in Miniconda3
Note in the first command there is no package name. This step would create an empty python2.7 environment, within which you can use pip to install other python modules.