diff --git a/tools/fastq_screen/main.nf b/tools/fastq_screen/main.nf new file mode 100644 index 00000000..be088ff5 --- /dev/null +++ b/tools/fastq_screen/main.nf @@ -0,0 +1,38 @@ +nextflow.preview.dsl=2 + +process FASTQ_SCREEN { + + // depending on the number of genomes and the type of genome (e.g. plants!), memory needs to be ample! + // label 'bigMem' + // label 'multiCore' + + input: + tuple val(name), path(reads) + val (outputdir) + // fastq_screen_args are best passed in to the workflow in the following manner: + // --fastq_screen_args="--subset 200000 --force" + val (fastq_screen_args) + val (verbose) + + output: + path "*png", emit: png + path "*html", emit: html + path "*txt", emit: report + + publishDir "$outputdir", + mode: "link", overwrite: true + + script: + println(name) + println(reads) + println(outputdir) + if (verbose){ + println ("[MODULE] FASTQ SCREEN ARGS: "+ fastq_screen_args) + } + + """ + module load fastq_screen + fastq_screen $fastq_screen_args $reads + """ + +} \ No newline at end of file diff --git a/tools/fastq_screen/meta.yml b/tools/fastq_screen/meta.yml new file mode 100644 index 00000000..4b4e56bd --- /dev/null +++ b/tools/fastq_screen/meta.yml @@ -0,0 +1,31 @@ +name: FastQ Screen +description: Run FastQ Screen on sequenced reads for Species Identification +keywords: + - Quality Control + - Species Screen + - Contamination +tools: + - fastqc: + description: | + FastQ Screen allows you to screen a library of sequences in + FastQ format against a set of sequence databases so you can + see if the composition of the library matches with what you expect. + homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastq_screen/ + documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastq_screen/_build/html/index.html +input: + - + - sample_id: + type: string + description: Sample identifier + - reads: + type: file + description: Input FastQ file +output: + - + - report: + type: file + description: FastQ Screen report + pattern: *_screen.{txt,html,png} + optional_pattern: *_screen.bisulfite_orientation.png +authors: + - @FelixKrueger diff --git a/tools/fastq_screen/test/main.nf b/tools/fastq_screen/test/main.nf new file mode 100755 index 00000000..be2b486e --- /dev/null +++ b/tools/fastq_screen/test/main.nf @@ -0,0 +1,30 @@ +#!/usr/bin/env nextflow +nextflow.preview.dsl = 2 + +params.outdir = "." +params.fastq_screen_args = '' +// fastq_screen_args are best passed in to the workflow in the following manner: +// --fastq_screen_args="--subset 200000 --force" + +params.verbose = false + +if (params.verbose){ + println ("[WORKFLOW] FASTQ SCREEN ARGS ARE: " + params.fastq_screen_args) +} + +// TODO: include '../../../nf-core/module_testing/check_process_outputs.nf' +include '../main.nf' + +// Define input channels + +ch_read_files = Channel + .fromFilePairs('../../../test-datasets/Ecoli*{1,2}.fastq.gz',size:-1) + // .view() // to check whether the input channel works + +// Run the workflow +workflow { + main: + FASTQ_SCREEN(ch_read_files, params.outdir, params.fastq_screen_args, params.verbose) + + // TODO .check_output() +} diff --git a/tools/fastq_screen/test/nextflow.config b/tools/fastq_screen/test/nextflow.config new file mode 100644 index 00000000..63c458ca --- /dev/null +++ b/tools/fastq_screen/test/nextflow.config @@ -0,0 +1,2 @@ +// docker.enabled = true +params.outdir = './results'