mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
FastQC module is working and now accepting arguments
This commit is contained in:
parent
f62fad63ca
commit
f8916eb9b5
4 changed files with 49 additions and 31 deletions
|
@ -1,20 +1,37 @@
|
||||||
process fastqc {
|
nextflow.preview.dsl = 2
|
||||||
tag "FastQC - $sample_id"
|
|
||||||
publishDir "${params.outdir}/fastqc", mode: 'copy',
|
|
||||||
saveAs: {filename -> filename.indexOf(".zip") > 0 ? "zips/$filename" : "$filename"}
|
|
||||||
|
|
||||||
container 'quay.io/biocontainers/fastqc:0.11.8--2'
|
process FASTQC {
|
||||||
|
|
||||||
|
// tag "FastQC - $sample_id"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple sample_id, path(reads)
|
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:
|
output:
|
||||||
path "*_fastqc.{zip,html}"
|
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:
|
publishDir "$outputdir",
|
||||||
"""
|
mode: "copy", overwrite: true
|
||||||
fastqc -q $reads
|
|
||||||
|
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/
|
documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/
|
||||||
input:
|
input:
|
||||||
-
|
-
|
||||||
- sample_id:
|
- name:
|
||||||
type: string
|
type: string
|
||||||
description: Sample identifier
|
description: Sample identifier
|
||||||
- reads:
|
- reads:
|
||||||
|
@ -29,4 +29,6 @@ output:
|
||||||
description: FastQC report
|
description: FastQC report
|
||||||
pattern: *_fastqc.{zip,html}
|
pattern: *_fastqc.{zip,html}
|
||||||
authors:
|
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
|
#!/usr/bin/env nextflow
|
||||||
nextflow.preview.dsl = 2
|
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
|
// Define input channels
|
||||||
readPaths = [
|
ch_read_files = Channel
|
||||||
['SRR4238351', ['../../../test-datasets/tools/fastqc/input/SRR4238351_subsamp.fastq.gz']],
|
.fromFilePairs('../../../test-datasets/test*{1,2}.fastq.gz',size:-1)
|
||||||
['SRR4238355', ['../../../test-datasets/tools/fastqc/input/SRR4238355_subsamp.fastq.gz']],
|
// .view() // to check whether the input channel works
|
||||||
['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 }
|
|
||||||
|
|
||||||
// Run the workflow
|
// Run the workflow
|
||||||
workflow {
|
workflow {
|
||||||
fastqc(ch_read_files)
|
FASTQC (ch_read_files, params.outdir, params.fastqc_args, params.verbose)
|
||||||
// .check_output()
|
// .check_output()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
docker.enabled = true
|
// docker.enabled = true
|
||||||
params.outdir = './results'
|
params.outdir = './results/fastqc'
|
||||||
|
|
Loading…
Reference in a new issue