Skip to content

Commit

Permalink
updating drax wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Rowe committed Mar 28, 2018
1 parent 184ff66 commit a55d3b3
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 15 deletions.
46 changes: 35 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,19 @@

`DRAX` is a [Nextflow](https://www.nextflow.io) pipeline to detect resistome associated taxa in metagenomes. It identifies Antimicrobial Resistance Genes (ARGs) using [GROOT](https://www.biorxiv.org/content/early/2018/02/28/270835), extracts the genomic environment of each ARG using [Metacherchant](https://academic.oup.com/bioinformatics/article-abstract/34/3/434/4575138?redirectedFrom=fulltext) and then performs taxanomic classification of assembled environments. Further pipeline steps and full documentation are being added.

## Installation

## Quick Start
### Bioconda

You can use [bioconda](https://bioconda.github.io/) to manage all of the `DRAX` pipeline dependencies:
For ease of use, the `DRAX` pipeline is called by a wrapper script that allows you to either download the required reference data, run the `DRAX` [Nextflow](https://www.nextflow.io) pipeline or update the pipeline. It is easiest to install `DRAX` using [Bioconda](https://bioconda.github.io/):

```
# Get the software requirements list
wget https://raw.githubusercontent.com/will-rowe/drax/master/drax-conda-environment.yml
# Create a conda environment
yes | conda env create -n drax -f drax-conda-environment.yml && source activate drax
# Run DRAX
nextflow run will-rowe/drax --reads 'tests/*R{1,2}.fq.gz'
conda install drax -c bioconda
```

Alternatively, you can also run `DRAX` using containers:
### Containers

You can also run `DRAX` using containers instead of conda. This will bypass the wrapper script so you will need to download the required reference data yourself.

```
# Install Nextflow
Expand All @@ -44,6 +40,34 @@ curl -s https://get.nextflow.io | bash
./nextflow run will-rowe/drax --reads 'tests/*R{1,2}.fq.gz' -with-singularity 'docker://wpmr/drax'
```

## Quick Start

The first time you use `DRAX`, you will need to get the required data:

```
drax get
```

* this will download several databases (masked hg19 for decontamination, ResFinder for GROOT, Kaiju RefSeq DB...)
* it can take a little while (databases total ~10GB compressed)
* you only need to do this **once**
* the default directory is `./DRAX-files` but you can rename/move it later
* this command will also update the pipeline to the most current version

Now you can run `DRAX`:

```
drax --reads 'tests/*R{1,2}.fq.gz' --refData ./DRAX-files
```

For a full list of options, just run:

```
drax --help
```

Also, read the [documentation](/docs) for a more detailed overview of `DRAX`.

## Workflow

![workflow](assets/misc/pipeline-workflow.png)
Expand Down
9 changes: 7 additions & 2 deletions drax
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ echo ""
# if no options are given, print the DRAX help and exit
if [[ $# == 0 ]]; then

echo "before running drax for the first time, make sure to first run \`drax get\` to download all the required files!"
echo "========================================="
echo ""
echo "run \`drax get\` to download all the required files (you only need to run this once)"
echo ""
echo "run \`drax --reads '*_R{1,2}.fastq.gz' --refData ./DRAX-files\` to set the pipeline going"
echo ""
echo "run \`drax --help\` for a full list of options"
echo ""
echo "========================================="
echo ""
nextflow run will-rowe/drax --help
exit
fi

Expand Down
4 changes: 2 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def helpMessage() {
--email Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits
-name Name for the pipeline run. If not specified, Nextflow will automatically generate a random mnemonic
-profile Specify docker or standard (default)
--noTaxa Don't run Kaiju (default = false)
--noTaxa Don't run Kaiju (default = false)
--max_cpus Number of CPUs to use (default = max available)
--max_memory Amount of RAM to use (default = 32 GB)
""".stripIndent()
Expand Down Expand Up @@ -542,7 +542,7 @@ process kaiju {

when:
params.noTaxa == false

script:
"""
# run the commands
Expand Down

0 comments on commit a55d3b3

Please sign in to comment.