Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] LONGLMAS: First working iteration PR #35

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
20 changes: 19 additions & 1 deletion .github/workflows/ci_nextflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ jobs:
--velvetoptimiser false
FILE=report/index.html
if [ ! -f "$FILE" ]; then echo "Run failed!"; exit 1; else echo "Run successful!"; fi
rm -r work/ results/ report/ .nextflow.log pipeline_stats.txt
- name: Basic workflow tests - long
run: |
nextflow run ${GITHUB_WORKSPACE} -profile docker --fastq "test/data/tinyont.fastq.gz" \
--reference "test/data/tiny_reference.fasta" --max_cpus 2 --max_memory 4.GB \
--wf ont --flye false --metaflye false --ra false --wtdbg2 false --canu false
FILE=report/index.html
if [ ! -f "$FILE" ]; then echo "Run failed!"; exit 1; else echo "Run successful!"; fi
rm -r work/ results/ report/ .nextflow.log pipeline_stats.txt

singularity:
runs-on: ubuntu-latest
Expand All @@ -54,4 +63,13 @@ jobs:
--minia false --megahit false --metaspades false --spades false --unicycler false \
--velvetoptimiser false
FILE=report/index.html
if [ ! -f "$FILE" ]; then echo "Run failed!"; exit 1; else echo "Run successful!"; fi
if [ ! -f "$FILE" ]; then echo "Run failed!"; exit 1; else echo "Run successful!"; fi
rm -r work/ results/ report/ .nextflow.log pipeline_stats.txt
- name: Basic workflow tests - long
run: |
nextflow run ${GITHUB_WORKSPACE} -profile singularity --fastq "test/data/tinyont.fastq.gz" \
--reference "test/data/tiny_reference.fasta" --max_cpus 2 --max_memory 4.GB \
--wf ont --flye false --metaflye false --ra false --wtdbg2 false --canu false
FILE=report/index.html
if [ ! -f "$FILE" ]; then echo "Run failed!"; exit 1; else echo "Run successful!"; fi
rm -r work/ results/ report/ .nextflow.log pipeline_stats.txt
21 changes: 21 additions & 0 deletions conf/containers.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ process {
withName: ABYSS {
container = "cimendes/abyss:2.3.1-1"
}
withName: CANU {
container = "cimendes/canu:2.2"
}
withName: FLYE {
container = "cimendes/flye:2.9"
}
withName: GATBMINIAPIPELINE {
container = "cimendes/gatb-minia-pipeline:31.07.2020-1"
}
Expand All @@ -17,6 +23,9 @@ process {
withName: MEGAHIT {
container = "cimendes/megahit-assembler:1.2.9-1"
}
withName: METAFLYE {
container = "cimendes/flye:2.9"
}
withName: METAHIPMER2 {
container = "cimendes/mhm2:v2.0.0-65-gaad446d-generic"
}
Expand All @@ -26,6 +35,12 @@ process {
withName: MINIA {
container = "cimendes/minia:3.2.6-1"
}
withName: RA {
container = "cimendes/ra:0.2.1"
}
withName: RAVEN {
container = "cimendes/raven:1.8.0"
}
withName: SKESA {
container = "cimendes/skesa:2.5.0-1"
}
Expand All @@ -41,6 +56,9 @@ process {
withName: VELVETOPTIMISER {
container = "cimendes/velvetoptimiser:2.2.6-1"
}
withName: WTDBG2 {
container = "cimendes/wtdgb2:2.5"
}
withName: FILTER_ASSEMBLY {
container = "pcerqueira/bbtools:38.44"
}
Expand All @@ -53,4 +71,7 @@ process {
withName: READ_MAPPING {
container = "cimendes/minimap2:2.22-1"
}
withName: LONG_READ_MAPPING {
container = "cimendes/minimap2:2.22-1"
}
}
30 changes: 30 additions & 0 deletions conf/params.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
params {

/*
Run Mode
---------------------------
*/
wf = "default"

/*
Input Files
---------------------------
*/
fastq = 'data/fastq/*_{1,2}.*'
ont = false
reference = 'data/reference/*.fasta'
md = 'data/*.md'

Expand Down Expand Up @@ -60,6 +67,29 @@ params {
velvetoptimiser_hashs = 19
velvetoptimiser_hashe = 31

/*
Long-Read Assemblers
---------------------------
*/
//CANU
canu = false
canu_genomesize = "1g"

//FLYE
flye = true

//METAFLYE
metaflye = true

//RA
ra = true

//RAVEN
raven = true

//WTDBG2
wtdbg2 = true

/*
Assembly Quality Control
*/
Expand Down
18 changes: 18 additions & 0 deletions docker/canu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM continuumio/miniconda3

LABEL software="CANU" \
software.version="2.2" \
about.home="https://github.com/marbl/canu" \
about.summary="A single molecule sequence assembler for genomes large and small." \
about.documentation="https://canu.readthedocs.io/en/latest/index.html" \
about.license="https://github.com/marbl/canu/blob/master/README.licenses" \
author="Inês Mendes <[email protected]>"

# System essentials
RUN conda install -c conda-forge -c bioconda -c defaults canu=2.2

# Set up workdir for installation
WORKDIR /data

# PS for nextflow
RUN apt-get install -y procps
16 changes: 16 additions & 0 deletions docker/flye/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM continuumio/miniconda3

LABEL software="Flye" \
software.version="2.9" \
about.home="https://github.com/fenderglass/Flye" \
about.summary="Flye Assembler for long read data" \
author="Inês Mendes <[email protected]>"

# System essentials
RUN conda install -c conda-forge -c bioconda -c defaults flye=2.9

# Set up workdir for installation
WORKDIR /data

# PS for nextflow
RUN apt-get install -y procps
14 changes: 14 additions & 0 deletions docker/miniasm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Base image - Alternatives: Conda, Python...
FROM continuumio/miniconda3

LABEL software="miniasm" \
software.version="0.3_r179" \
about.home="https://github.com/lh3/miniasm" \
about.summary="Ultrafast de novo assembly for long noisy reads (though having no consensus step)" \
author="Inês Mendes <[email protected]>"

# System essentials
RUN conda install -c bioconda miniasm

# PS for nextflow
RUN apt-get install -y procps
26 changes: 26 additions & 0 deletions docker/ra/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Base image - Alternatives: Conda, Python...
FROM continuumio/miniconda3

LABEL software="ra" \
software.version="0.2.1" \
about.home="https://github.com/lbcb-sci/ra" \
about.summary="Assembler for raw de novo genome assembly of long uncorrected reads." \
about.license="https://github.com/lbcb-sci/ra/blob/master/LICENSE" \
author="Inês Mendes <[email protected]>"

# System essentials
RUN conda install -c bioconda ra
RUN apt-get update && apt-get -y install build-essential \
cmake \
zlib1g-dev

# Install RA
RUN git clone --recursive https://github.com/rvaser/ra.git ra
WORKDIR ra
RUN mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..
RUN cd build && make

ENV PATH /ra/build/bin:$PATH

# PS for nextflow
RUN apt-get install -y procps
14 changes: 14 additions & 0 deletions docker/raven/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Base image - Alternatives: Conda, Python...
FROM continuumio/miniconda3

LABEL software="raven-assembler" \
software.version="1.8.0" \
about.home="https://github.com/lbcb-sci/raven" \
about.summary="Raven-assembler for long read data" \
author="Inês Mendes <[email protected]>"

# System essentials
RUN conda install -c conda-forge -c bioconda -c defaults raven-assembler=1.8.0

# PS for nextflow
RUN apt-get install -y procps
14 changes: 14 additions & 0 deletions docker/shaste/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Base image - Alternatives: Conda, Python...
FROM continuumio/miniconda3

LABEL software="shasta" \
software.version="0.6.0" \
about.home="https://github.com/chanzuckerberg/shasta" \
about.summary="De novo assembly from Oxford Nanopore reads." \
author="Inês Mendes <[email protected]>"

# System essentials
RUN conda install -c bioconda shasta

# PS for nextflow
RUN apt-get install -y procps
17 changes: 17 additions & 0 deletions docker/wtdgb2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Base image - Alternatives: Conda, Python...
FROM continuumio/miniconda3

LABEL software="wtdbg2" \
software.version="2.5" \
about.home="https://github.com/ruanjue/wtdbg2" \
about.summary="wtdbg2 assembler for long read data" \
author="Inês Mendes <[email protected]>"

# Maintainer
LABEL maintainer="Inês Mendes <[email protected]>"

# System essentials
RUN conda install -c conda-forge -c bioconda -c defaults wtdbg=2.5

# PS for nextflow
RUN apt-get install -y procps
8 changes: 8 additions & 0 deletions lib/CheckParams.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
class Params {

static void check(Map params) {

// mode
if (!params.wf) {print_error("'--wf' parameter missing")}
def allowed_modes = ["default", "Illumina", "illumina", "hybrid", "Hybrid", "ont", "ONT"] as Set
def mode_parameter_diff = allowed_modes - params.wf
if (mode_parameter_diff.size() > 6){
print_error("[Pipeline warning] Parameter --wf $params.wf is not valid in the pipeline! Allowed values: 'default', 'long', 'hybrid', 'all'")
}

// input
if (!params.reference) {print_error("'--reference' parameter missing")}
Expand Down
24 changes: 22 additions & 2 deletions lib/Helper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ class Help {
println " Last Metagenomic Assembler Standing"
println ""
println "Input parameters:"
println " --fastq Path expression to paired-end fastq files."
println " --wf Execution mode of LMAS."
println " (default: $params.wf, allowed options: 'default' or 'illumina', 'ont')"
println " --fastq Path expression to short-read paired-end fastq files."
println " (default: $params.fastq)"
println " --ont Path expression to nanopore fastq files."
println " (default: $params.ont)"
println " --reference Path to the genome reference fasta file."
println " (default: $params.reference)"
println " --md Path to markdown with input sample description for report (optional)."
Expand All @@ -56,7 +60,7 @@ class Help {
println " Allowed values: 'linear' or 'log'."
println " (default: $params.plot_scale)"
println ""
println "Assembly execution parameters:"
println "Short-read assembly execution parameters:"
println " --abyss Boolean controling the execution of the ABySS assembler."
println " (default: $params.abyss)"
println " --abyssKmerSize K-mer size for the ABySS assembler, as an intiger."
Expand Down Expand Up @@ -114,6 +118,22 @@ class Help {
println " --velvetoptimiser_hashe End K-mer size for the VelvetOptimiser assembler, as an intiger."
println " (default $params.velvetoptimiser_hashe)"
println ""
println "Long-read assembly execution parameters:"
println " --canu Boolean controling the execution of the canu assembler."
println " (default: $params.canu)"
println " --canu_genomesize An estimate of the size of the genome for the canu assembler."
println " (default: $params.canu_genomesize)"
println " --flye Boolean controling the execution of the flye assembler."
println " (default: $params.flye)"
println " --metaflye Boolean controling the execution of the metaflye assembler."
println " (default: $params.metaflye)"
println " --ra Boolean controling the execution of the ra assembler."
println " (default: $params.ra)"
println " --raven Boolean controling the execution of the raven assembler."
println " (default: $params.raven)"
println " --wtdbg2 Boolean controling the execution of the wtdbg2 assembler."
println " (default: $params.wtdbg2)"
println ""
println "Execution resources parameters:"
println " --cpus Number of CPUs for the assembly and mapping processes, as an intiger."
println " This resource is double for each retry until max_cpus is reached."
Expand Down
Loading