mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Merge pull request #27 from FelixKrueger/fastqc
FastQC module is working and now accepting arguments
This commit is contained in:
commit
c627da09cc
4 changed files with 49 additions and 31 deletions
|
@ -1,20 +1,37 @@
|
|||
process fastqc {
|
||||
tag "FastQC - $sample_id"
|
||||
publishDir "${params.outdir}/fastqc", mode: 'copy',
|
||||
saveAs: {filename -> filename.indexOf(".zip") > 0 ? "zips/$filename" : "$filename"}
|
||||
nextflow.preview.dsl = 2
|
||||
|
||||
container 'quay.io/biocontainers/fastqc:0.11.8--2'
|
||||
process FASTQC {
|
||||
|
||||
// tag "FastQC - $sample_id"
|
||||
|
||||
input:
|
||||
tuple sample_id, path(reads)
|
||||
input:
|
||||
tuple val(name), path(reads)
|
||||
val (outputdir)
|
||||
// fastqc_args are best passed into the workflow in the following manner:
|
||||
// --fastqc_args="--nogroup -a custom_adapter_file.txt"
|
||||
val (fastqc_args)
|
||||
val (verbose)
|
||||
|
||||
output:
|
||||
path "*_fastqc.{zip,html}"
|
||||
output:
|
||||
tuple val(name), path ("*fastqc*"), emit: all
|
||||
path "*.zip", emit: report // e.g. for MultiQC later
|
||||
|
||||
// container 'quay.io/biocontainers/fastqc:0.11.8--2'
|
||||
|
||||
script:
|
||||
"""
|
||||
fastqc -q $reads
|
||||
publishDir "$outputdir",
|
||||
mode: "copy", overwrite: true
|
||||
|
||||
script:
|
||||
|
||||
if (verbose){
|
||||
println ("[MODULE] FASTQC ARGS: " + fastqc_args)
|
||||
}
|
||||
|
||||
"""
|
||||
module load fastqc
|
||||
fastqc $fastqc_args -q -t 2 $reads
|
||||
|
||||
fastqc --version &> fastqc.version.txt
|
||||
"""
|
||||
|
||||
fastqc --version &> fastqc.version.txt
|
||||
"""
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ tools:
|
|||
documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/
|
||||
input:
|
||||
-
|
||||
- sample_id:
|
||||
- name:
|
||||
type: string
|
||||
description: Sample identifier
|
||||
- reads:
|
||||
|
@ -29,4 +29,6 @@ output:
|
|||
description: FastQC report
|
||||
pattern: *_fastqc.{zip,html}
|
||||
authors:
|
||||
- @ewels
|
||||
-
|
||||
- @ewels
|
||||
- @FelixKrueger
|
||||
|
|
25
tools/fastqc/test/main.nf
Normal file → Executable file
25
tools/fastqc/test/main.nf
Normal file → Executable file
|
@ -1,22 +1,21 @@
|
|||
#!/usr/bin/env nextflow
|
||||
nextflow.preview.dsl = 2
|
||||
include '../../../nf-core/module_testing/check_process_outputs.nf' params(params)
|
||||
include '../main.nf' params(params)
|
||||
|
||||
params.outdir = "." // gets set in nextflow.config file (as './results/fastqc')
|
||||
params.fastqc_args = ''
|
||||
params.verbose = false
|
||||
|
||||
// TODO: check the output files in some way
|
||||
// include '../../../nf-core/module_testing/check_process_outputs.nf'
|
||||
include '../main.nf'
|
||||
|
||||
// Define input channels
|
||||
readPaths = [
|
||||
['SRR4238351', ['../../../test-datasets/tools/fastqc/input/SRR4238351_subsamp.fastq.gz']],
|
||||
['SRR4238355', ['../../../test-datasets/tools/fastqc/input/SRR4238355_subsamp.fastq.gz']],
|
||||
['SRR4238359', ['../../../test-datasets/tools/fastqc/input/SRR4238359_subsamp.fastq.gz']],
|
||||
['SRR4238379', ['../../../test-datasets/tools/fastqc/input/SRR4238379_subsamp.fastq.gz']]
|
||||
]
|
||||
Channel
|
||||
.from(readPaths)
|
||||
.map { row -> [ row[0], [ file(row[1][0]) ] ] }
|
||||
.set { ch_read_files }
|
||||
ch_read_files = Channel
|
||||
.fromFilePairs('../../../test-datasets/test*{1,2}.fastq.gz',size:-1)
|
||||
// .view() // to check whether the input channel works
|
||||
|
||||
// Run the workflow
|
||||
workflow {
|
||||
fastqc(ch_read_files)
|
||||
FASTQC (ch_read_files, params.outdir, params.fastqc_args, params.verbose)
|
||||
// .check_output()
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
||||
// docker.enabled = true
|
||||
params.outdir = './results/fastqc'
|
||||
|
|
Loading…
Reference in a new issue