Skip to content

Instantly share code, notes, and snippets.

@moonwatcher
Last active Apr 27, 2021
Embed
What would you like to do?
Options for Installing Pheniqs on greene.hpc.nyu.edu

Prepare for the Pheniqs BADAS talk

Install conda on greene with the Anaconda module

To use the global anaconda module you need to create your own conda environment in your home directory. You can create multiple such environments and when you want to use it, you just activate it. When you are done you deactivate it. Ok lets do it...

First, load the anaconda module on greene

module purge
module load anaconda3/2020.07

If you have not yet initialized conda you should. It just updates you environment to include the conda bin directory in your search path by adding some stuff to your .bashrc, the file initializing your interactive shell when you login. Noting happens if you do this again.

conda init bash

Create a conda environment and activate it. We will create an envrironment in the .conda_pheniqs folder in your home directory for this demonstration but you may choose a different name for your environment.

conda create -p ./.conda_pheniqs

And activate the new environment

conda activate ./.conda_pheniqs

Now add the conda-forge and bioconda channels to your conda environment

conda config --add channels conda-forge
conda config --add channels bioconda

Now you can finally install Pheniqs

conda install pheniqs

When you are done you can deactivate your conda environment with

conda deactivate

Install conda on greene with Miniconda

Log into greene and download Miniconda. You cannot use the Anaconda module, it is ancient and has really old packages.

curl -OL https://repo.anaconda.com/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh

Now make the file executable

chmod +x Miniconda3-py39_4.9.2-Linux-x86_64.sh

and install conda

./Miniconda3-py39_4.9.2-Linux-x86_64.sh

You will need to complete the conda install and let it intialize at the end.

Install Pheniqs 2.1.0 with conda

You can now install Pheniqs 2.1.0 with conda.

conda install pheniqs

Install Pheniqs with the build api

Pheniqs has its own little package manager that can build a portable, static, binary of pheniqs. That means you can build it and then move it around it and it still works.

Make a work directory and cd into it

mkdir pheniqs_static_build
cd pheniqs_static_build

Download the pheniqs-build-api python script

curl -OL https://raw.githubusercontent.com/biosails/pheniqs-build-api/master/pheniqs-build-api.py

Now make the file executable

chmod +x pheniqs-build-api.py

now ask the builder to build pheniqs 2.1.0

./pheniqs-build-api.py build -R 1ea39695b5544f4cab5fa272b12b0f6897d0f95a

when its done your portable binary will be in bin/static-1ea39695b5544f4cab5fa272b12b0f6897d0f95a/install/bin/pheniqs under your work directory.

you can now move this binary to your local bin directory (by default it does not exist but is on your path on greene).

optionally create it if you have not done this yet

mkdir ~/bin

then copy your new pheniqs binary there

cp bin/static-1ea39695b5544f4cab5fa272b12b0f6897d0f95a/install/bin/pheniqs ~/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment