mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Merge pull request #37 from ewels/master
Cutadapt - merge tests into one
This commit is contained in:
commit
abfd112964
6 changed files with 26 additions and 53 deletions
|
@ -14,7 +14,7 @@ process cutadapt {
|
||||||
reverse_fq = "trimmed_2.fastq"
|
reverse_fq = "trimmed_2.fastq"
|
||||||
|
|
||||||
|
|
||||||
if (params.singleEnd) {
|
if (params.single_end) {
|
||||||
processing = """
|
processing = """
|
||||||
cutadapt \
|
cutadapt \
|
||||||
-j ${task.cpus} \
|
-j ${task.cpus} \
|
||||||
|
@ -32,14 +32,10 @@ process cutadapt {
|
||||||
--pair-filter=any \
|
--pair-filter=any \
|
||||||
--output ${forward_fq} \
|
--output ${forward_fq} \
|
||||||
--paired-output ${reverse_fq} ${reads}
|
--paired-output ${reverse_fq} ${reads}
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
||||||
version = """
|
version = "cutadapt --version &> v_cutadapt.txt"
|
||||||
cutadapt --version &> v_cutadapt.txt
|
|
||||||
"""
|
|
||||||
|
|
||||||
return processing + version
|
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)
|
||||||
|
}
|
|
@ -2,8 +2,8 @@ docker.enabled = true
|
||||||
params.outdir = './results'
|
params.outdir = './results'
|
||||||
|
|
||||||
params{
|
params{
|
||||||
//preprocessing options
|
// Preprocessing options
|
||||||
cutadapt_min_length = 40
|
cutadapt_min_length = 40
|
||||||
cutadapt_min_quality = 25
|
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