mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
FastQC: actually run a test
This commit is contained in:
parent
ef486a908b
commit
eb41e5ebba
7 changed files with 48 additions and 24 deletions
14
nf-core/module_testing/check_process_outputs.nf
Normal file
14
nf-core/module_testing/check_process_outputs.nf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env nextflow
|
||||
nextflow.preview.dsl = 2
|
||||
|
||||
cheers = Channel.from 'Bonjour', 'Ciao', 'Hello', 'Hola'
|
||||
|
||||
process check_output {
|
||||
input:
|
||||
val x from cheers
|
||||
|
||||
script:
|
||||
"""
|
||||
echo '$x world!'
|
||||
"""
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
process fastqc {
|
||||
tag "$sample_id"
|
||||
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'
|
||||
container 'quay.io/biocontainers/fastqc:0.11.8--2'
|
||||
|
||||
input:
|
||||
set val(sample_id), file(reads)
|
||||
tuple sample_id, path(reads)
|
||||
|
||||
output:
|
||||
file "*_fastqc.{zip,html}"
|
||||
path "*_fastqc.{zip,html}"
|
||||
|
||||
script:
|
||||
"""
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
#!/usr/bin/env nextflow
|
||||
echo true
|
||||
nextflow.preview.dsl = 2
|
||||
include '../../../nf-core/module_testing/check_process_outputs.nf' params(params)
|
||||
include '../main.nf' params(params)
|
||||
|
||||
cheers = Channel.from 'Bonjour', 'Ciao', 'Hello', 'Hola'
|
||||
// Define input channels
|
||||
readPaths = [
|
||||
['SRR389222_sub1', ['https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub1.fastq.gz']],
|
||||
['SRR389222_sub2', ['https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub2.fastq.gz']],
|
||||
['SRR389222_sub3', ['https://github.com/nf-core/test-datasets/raw/methylseq/testdata/SRR389222_sub3.fastq.gz']]
|
||||
]
|
||||
Channel
|
||||
.from(readPaths)
|
||||
.map { row -> [ row[0], [row[1][0]]] }
|
||||
.set { ch_read_files }
|
||||
|
||||
process sayHello {
|
||||
input:
|
||||
val x from cheers
|
||||
script:
|
||||
"""
|
||||
echo '$x world!'
|
||||
"""
|
||||
// Run the workflow
|
||||
workflow {
|
||||
fastqc(ch_read_files)
|
||||
// .check_output()
|
||||
}
|
||||
|
|
2
tools/fastqc/test/nextflow.config
Normal file
2
tools/fastqc/test/nextflow.config
Normal file
|
@ -0,0 +1,2 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
|
@ -1,13 +1,13 @@
|
|||
process samtools_index {
|
||||
tag "${bam.baseName}"
|
||||
|
||||
container: 'quay.io/biocontainers/samtools:1.9--h10a08f8_12'
|
||||
container 'quay.io/biocontainers/samtools:1.9--h10a08f8_12'
|
||||
|
||||
input:
|
||||
set file(bam)
|
||||
path(bam)
|
||||
|
||||
output:
|
||||
file "*.sorted.bam"
|
||||
path "*.sorted.bam"
|
||||
|
||||
script:
|
||||
def suff_mem = ("${(task.memory.toBytes() - 6000000000) / task.cpus}" > 2000000000) ? 'true' : 'false'
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
process samtools_index {
|
||||
tag "${bam.baseName}"
|
||||
|
||||
container: 'quay.io/biocontainers/samtools:1.9--h10a08f8_12'
|
||||
container 'quay.io/biocontainers/samtools:1.9--h10a08f8_12'
|
||||
|
||||
input:
|
||||
set file(bam)
|
||||
path(bam)
|
||||
|
||||
output:
|
||||
file "*.bam.bai"
|
||||
path "*.bam.bai"
|
||||
|
||||
script:
|
||||
"""
|
||||
|
|
|
@ -7,15 +7,15 @@ process fastqc {
|
|||
else filename
|
||||
}
|
||||
|
||||
container: 'quay.io/biocontainers/trim-galore:0.6.5--0'
|
||||
container 'quay.io/biocontainers/trim-galore:0.6.5--0'
|
||||
|
||||
input:
|
||||
set val(sample_id), file(reads)
|
||||
tuple sample_id, path(reads)
|
||||
|
||||
output:
|
||||
set val(name), file("*fq.gz")
|
||||
file "*trimming_report.txt"
|
||||
file "*_fastqc.{zip,html}"
|
||||
tuple name, path("*fq.gz")
|
||||
path "*trimming_report.txt"
|
||||
path "*_fastqc.{zip,html}"
|
||||
|
||||
script:
|
||||
c_r1 = clip_r1 > 0 ? "--clip_r1 ${clip_r1}" : ''
|
||||
|
|
Loading…
Reference in a new issue