mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2025-01-08 15:02:09 -05:00
Merge pull request #24 from FelixKrueger/fastq_screen
Added FastQ Screen module
This commit is contained in:
commit
05c6d2557d
4 changed files with 101 additions and 0 deletions
38
tools/fastq_screen/main.nf
Normal file
38
tools/fastq_screen/main.nf
Normal 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
|
||||||
|
"""
|
||||||
|
|
||||||
|
}
|
31
tools/fastq_screen/meta.yml
Normal file
31
tools/fastq_screen/meta.yml
Normal 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
30
tools/fastq_screen/test/main.nf
Executable 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()
|
||||||
|
}
|
2
tools/fastq_screen/test/nextflow.config
Normal file
2
tools/fastq_screen/test/nextflow.config
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
// docker.enabled = true
|
||||||
|
params.outdir = './results'
|
Loading…
Reference in a new issue