Installation - JoshLoecker/MAPT GitHub Wiki

NOTE: If you are on SciNet, a conda environment already exists. It is located at /project/brookings_minoin/conda-envs/mapt_pipeline. Continue to Step 4 to learn how to activate the environment.

This project was built and tested on Singularity version 3.7.0. Reproducibility and stability cannot be guaranteed on earlier versions

Git and Miniconda are required to download the pipeline and create a new Conda environment with the required software

Download git
Download miniconda

If you are running this project on SciNet, these tools are already available. Run the following commands to check their versions singularity --version
git --version
conda --version

  1. Log in to SciNet

  2. In your home directory, clone the GitHub repo
    a. git clone https://github.com/JoshLoecker/MAPT
    b. This will create a new folder MAPT in your current directory. You may move or rename this folder if you like
    c. While a current version of the pipeline exists at /project/brookings_minion/pipeline, it is not possible to have multiple runs starting from the same working directory

    1. Attempting to do so will result in an error, such as IncompleteFilesException, the files below seem to be incomplete
    2. This is because snakemake attempts to determine what outputs need to be created, and 'sees' that output is unfinished (from a currently running job, using this directry)
    3. The easiest fix is simply cloning a new version of the pipeline. This can even be done in your home directory, as the pipeline is just 4M in size
  3. Installing the environment b. On SciNet, storage space in your home directory is limited. It is strongly recommended to store environments in your /project directory. c. By saving environments in your /project directory, it is possible for everyone on your team to use the same environment, even if multiple people are running jobs at the same time.
    d. To create a new conda environment, execute the following inside the directory that was cloned in Step 2: conda env create -f environment.yaml -p /project/YOUR_PROJECT_NAME/conda-envs/YOUR_ENVIRONMENT_NAME

    1. Substitute YOUR_PROJECT_NAME with the name of your project
    2. Substitute YOUR_ENVIRONMENT_NAME with the name you would like to give your new environment.
  4. Activating the environment
    a. To activate the environment, its installation location must be known (from Step 3).

    1. We will assume you have installed the environment under /project/testing/conda-envs, with the name of my_environment
    2. This makes the full installation path equal to /project/testing/conda-envs/my_environment

    b. First, execute conda init to initialize conda for your shell. You will most likely have to log out and log back in to SciNet c. Execute conda activate /project/testing/conda-envs/my_environment to activate the conda environment d. By doing so, you now have access to all the tools installed within the environment

    1. An example of these tools include NanoPlot, NanoFilt, minimap, spoa, or cutadapt
    2. Running any of these command line tools with --version will show they are installed

    e. If you see the full path to the environment before your username (i.e., (/project/testing/conda-envs/my_environment) USERNAME /current/directory $), please do the following

    1. Edit the .condarc file by executing nano ~/.condarc
    2. Navigate to the bottom of the file and add env_prompt: ({name})
    3. Save the file with CTRL + X -> y -> [ENTER]

    f. To deactivate the environment, type conda deactivate.

You are now ready to use tools within the environment.

Return to Wiki Homepage
Continue to Parameters & Configuration Files