---
tags: GeneLab
title: Using `genelab-utils` to download GeneLab workflows
---
# Using genelab-utils to download GeneLab workflows
> This page demonstrates using a program in the [genelab-utils](https://github.com/AstrobioMike/genelab-utils#genelab-utils) package to programmatically download packaged workflows from our
> [Data Processing github repository](https://github.com/nasa/GeneLab_Data_Processing).
>
> Contact Mike.Lee@nasa.gov if having trouble.
---
[toc]
---
## tl;dr example usage
```bash
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](https://astrobiomike.github.io/unix/conda-intro) if wanted, and if you are not familiar with mamba, there is a super-short introduction on that same page [here](https://astrobiomike.github.io/unix/conda-intro#bonus-mamba-no-5) – it's definitely worth using mamba if you use conda at all :+1:
```bash
# 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
```bash
conda activate genelab-utils
```
### Seeing workflows available
Can see those available by just running the command by itself, or giving `-h/--help` for help:
```bash
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
```bash
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](https://github.com/nasa/GeneLab_Data_Processing/releases), and then download it if yes:
```bash
GL-get-workflow MG-Illumina --wanted-version 2.0.2
```
---
---