Try   HackMD

Using genelab-utils to download GeneLab workflows

This page demonstrates using a program in the genelab-utils package to programmatically download packaged workflows from our
Data Processing github repository.

Contact Mike.Lee@nasa.gov if having trouble.



tl;dr example usage

conda activate genelab-utils

GL-get-workflow MG-Illumina

#    The MG-Illumina workflow was downloaded to 'SW_MGIllumina_2.0.3/'

#      It was pulled from this release page:
#           https://api.github.com/repos/nasa/GeneLab_Data_Processing/releases


ls SW_MGIllumina_2.0.3/
# Snakefile   config      config.yaml envs        scripts

Installing genelab-utils if needed

The genelab-utils package should be installed with conda/mamba. If you are not familiar with conda, you can find an introduction here if wanted, and if you are not familiar with mamba, there is a super-short introduction on that same page here – it's definitely worth using mamba if you use conda at all :+1:

# if needing mamba
conda install -c conda-forge -n base mamba

mamba create -n genelab-utils -c conda-forge -c bioconda -c defaults \
             -c astrobiomike 'genelab-utils>=1.3'

Downloading a workflow

conda activate genelab-utils

Seeing workflows available

Can see those available by just running the command by itself, or giving -h/--help for help:

GL-get-workflow -h

# usage: GL-get-workflow [-h] [--wanted-version WANTED_VERSION]
#                        {MG-Illumina,MG-remove-human-reads,MG-estimate-host-reads,Amplicon-Illumina,Amplicon-454-IonTorrent,RNAseq,MethylSeq}
#
# This is a helper program for downloading GeneLab workflows. For verison info
# run `GL-version`.
#
# options:
#   -h, --help            show this help message and exit
#   --wanted-version WANTED_VERSION
#                         Specify the version you'd like to download (leaving
#                         out this argument will pull the latest by default)
#
# required arguments:
#   {MG-Illumina,MG-remove-human-reads,MG-estimate-host-reads,Amplicon-Illumina,Amplicon-454-IonTorrent,RNAseq,MethylSeq}
#                         The first positional argument should be which one of
#                         these workflows you'd like to download
#
# Ex. usage: GL-get-workflow MG-Illumina

Downloading latest version

GL-get-workflow MG-Illumina

Downloading a specific version

When we specify a specific version, it will check that a zip exists for it on the releases page, and then download it if yes:

GL-get-workflow MG-Illumina --wanted-version 2.0.2