mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Cutadapt - merge tests into one
This commit is contained in:
parent
7ae79df07c
commit
f36902b9af
6 changed files with 26 additions and 53 deletions
|
@ -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
|
||||
}
|
||||
|
|
21
software/cutadapt/test/main.nf
Normal file
21
software/cutadapt/test/main.nf
Normal 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)
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -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)
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
docker.enabled = true
|
||||
params.outdir = './results'
|
||||
|
||||
params{
|
||||
//preprocessing options
|
||||
cutadapt_min_length = 40
|
||||
cutadapt_min_quality = 25
|
||||
singleEnd = false
|
||||
}
|
|
@ -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)
|
||||
}
|
Loading…
Reference in a new issue