Cutadapt - merge tests into one

This commit is contained in:
Phil Ewels 2020-07-11 17:09:06 +02:00
parent 7ae79df07c
commit f36902b9af
6 changed files with 26 additions and 53 deletions

View file

@ -14,7 +14,7 @@ process cutadapt {
reverse_fq = "trimmed_2.fastq"
if (params.singleEnd) {
if (params.single_end) {
processing = """
cutadapt \
-j ${task.cpus} \
@ -32,14 +32,10 @@ process cutadapt {
--pair-filter=any \
--output ${forward_fq} \
--paired-output ${reverse_fq} ${reads}
"""
}
version = """
cutadapt --version &> v_cutadapt.txt
"""
version = "cutadapt --version &> v_cutadapt.txt"
return processing + version
}

View file

@ -0,0 +1,21 @@
#!/usr/bin/env nextflow
nextflow.preview.dsl = 2
include '../main.nf' params(params)
// Define input channels
paired_end_input = Channel.fromFilePairs('../../../test-datasets/tools/cutadapt/input/*_{1,2}.fastq' )
// TODO: params.single_end is set to false in nextflow config
// But most of this module is not functional currently anyway....
single_end_input = Channel.from([
['SRR4238351', '../../../test-datasets/tools/cutadapt/input/SRR4238351_subsamp.fastq.gz'],
['SRR4238355', '../../../test-datasets/tools/cutadapt/input/SRR4238355_subsamp.fastq.gz'],
['SRR4238359', '../../../test-datasets/tools/cutadapt/input/SRR4238359_subsamp.fastq.gz'],
['SRR4238379', '../../../test-datasets/tools/cutadapt/input/SRR4238379_subsamp.fastq.gz']
]).map { row -> [ row[0], [ file(row[1]) ] ] }
// Run the workflow
workflow {
cutadapt(paired_end_input)
cutadapt(single_end_input)
}

View file

@ -1,9 +1,9 @@
docker.enabled = true
params.outdir = './results'
params{
//preprocessing options
params{
// Preprocessing options
cutadapt_min_length = 40
cutadapt_min_quality = 25
singleEnd = true
single_end = false
}

View file

@ -1,14 +0,0 @@
#!/usr/bin/env nextflow
nextflow.preview.dsl = 2
include '../main.nf' params(params)
// Define input channels
Channel
.fromFilePairs('../../../test-datasets/tools/cutadapt/input/*_{1,2}.fastq' )
.set { ch_read_files }
// Run the workflow
workflow {
cutadapt(ch_read_files)
}

View file

@ -1,9 +0,0 @@
docker.enabled = true
params.outdir = './results'
params{
//preprocessing options
cutadapt_min_length = 40
cutadapt_min_quality = 25
singleEnd = false
}

View file

@ -1,21 +0,0 @@
#!/usr/bin/env nextflow
nextflow.preview.dsl = 2
include '../main.nf' params(params)
// Define input channels
readPaths = [
['SRR4238351', '../../../test-datasets/tools/cutadapt/input/SRR4238351_subsamp.fastq.gz'],
['SRR4238355', '../../../test-datasets/tools/cutadapt/input/SRR4238355_subsamp.fastq.gz'],
['SRR4238359', '../../../test-datasets/tools/cutadapt/input/SRR4238359_subsamp.fastq.gz'],
['SRR4238379', '../../../test-datasets/tools/cutadapt/input/SRR4238379_subsamp.fastq.gz']
]
Channel
.from(readPaths)
.map { row -> [ row[0], [ file(row[1]) ] ] }
.set { ch_read_files }
// Run the workflow
workflow {
cutadapt(ch_read_files)
}