Merge pull request #24 from FelixKrueger/fastq_screen

Added FastQ Screen module
This commit is contained in:
Phil Ewels 2020-07-11 13:23:03 +02:00 committed by GitHub
commit 05c6d2557d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 101 additions and 0 deletions

View file

@ -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
"""
}

View file

@ -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

30
tools/fastq_screen/test/main.nf Executable file
View file

@ -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()
}

View file

@ -0,0 +1,2 @@
// docker.enabled = true
params.outdir = './results'