Make all these tests pass

This commit is contained in:
FriederikeHanssen 2021-02-23 14:09:46 +01:00
parent 25a2a16f2d
commit 5e365d5eff
4 changed files with 97 additions and 95 deletions

View file

@ -34,7 +34,7 @@ process SEQKIT_SPLIT2 {
tuple val(meta), path(reads)
output:
tuple val(meta), path("*.fq.gz"), emit: reads
tuple val(meta), path("*.split/*.fastq.gz"), emit: reads
path("*.version.txt") , emit: version
@ -44,7 +44,7 @@ process SEQKIT_SPLIT2 {
//TODO not sure if this is useful here, as the splits need to be named individually, and this would make the prefix the same and the outputname I am afraid.
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
// if(meta.single_end){
if(meta.single_end){
"""
seqkit \
split2 \
@ -54,15 +54,15 @@ process SEQKIT_SPLIT2 {
echo \$(seqkit --version 2>&1) | sed 's/^.*seqkit //; s/Using.*\$//' > ${software}.version.txt
"""
//} else {
// """
// seqkit \
// split2 \
// $options.args \
// --threads $task.cpus \
// -1 ${reads[0]} \
// -2 ${reads[1]}
// echo \$(seqkit --version 2>&1) | sed 's/^.*seqkit //; s/Using.*\$//' > ${software}.version.txt
// """
//}
} else {
"""
seqkit \
split2 \
$options.args \
--threads $task.cpus \
-1 ${reads[0]} \
-2 ${reads[1]}
echo \$(seqkit --version 2>&1) | sed 's/^.*seqkit //; s/Using.*\$//' > ${software}.version.txt
"""
}
}

View file

@ -42,7 +42,7 @@ input:
- reads:
type: file
description: FastQ files
pattern: "*.{fq.gz/fastq.gz}"
pattern: "*.fastq.gz"
## TODO nf-core: Add a description of all of the variables used as output
output:
- meta:
@ -53,7 +53,7 @@ output:
- reads:
type: file
description: Split fastq files
pattern: "*.{fq.gz}"
pattern: "*.fastq.gz"
- version:
type: file
description: File containing software version

View file

@ -2,54 +2,54 @@
nextflow.enable.dsl = 2
//include { SEQKIT_SPLIT2_LENGTH } from '../../../../software/SEQKIT/SPLIT2/main.nf' addParams( options: ['args': '--by-length 26K'] )
//include { SEQKIT_SPLIT2_SIZE } from '../../../../software/SEQKIT/SPLIT2/main.nf' addParams( options: ['args': '--by-size 5000' ] )
include { SEQKIT_SPLIT2 as SEQKIT_SPLIT2_LENGTH } from '../../../../software/SEQKIT/SPLIT2/main.nf' addParams( options: ['args': '--by-length 26K'] )
include { SEQKIT_SPLIT2 as SEQKIT_SPLIT2_SIZE } from '../../../../software/SEQKIT/SPLIT2/main.nf' addParams( options: ['args': '--by-size 5000' ] )
include { SEQKIT_SPLIT2 as SEQKIT_SPLIT2_PART } from '../../../../software/SEQKIT/SPLIT2/main.nf' addParams( options: ['args': '--by-part 2'] )
// workflow test_seqkit_split2_length_single_end {
// def input = []
// input = [ [ id:'test', single_end:true ], // meta map
// file("${launchDir}/tests/data/dna/SRR396636_R1.fastq.gz", checkIfExists: true) ]
// SEQKIT_SPLIT2_LENGTH ( input )
// }
// workflow test_seqkit_split2_size_single_end {
// def input = []
// input = [ [ id:'test', single_end:true ], // meta map
// file("${launchDir}/tests/data/dna/SRR396636_R1.fastq.gz", checkIfExists: true) ]
// SEQKIT_SPLIT2_SIZE ( input )
// }
workflow test_seqkit_split2_part_single_end {
workflow test_seqkit_split2_single_end_length {
def input = []
input = [ [ id:'test', single_end:true ], // meta map
file("${launchDir}/tests/data/dna/SRR396636_R1.fastq.gz", checkIfExists: true) ]
file("${launchDir}/tests/data/fastq/dna/SRR396636_R1.fastq.gz", checkIfExists: true) ]
SEQKIT_SPLIT2_LENGTH ( input )
}
workflow test_seqkit_split2_single_end_size {
def input = []
input = [ [ id:'test', single_end:true ], // meta map
file("${launchDir}/tests/data/fastq/dna/SRR396636_R1.fastq.gz", checkIfExists: true) ]
SEQKIT_SPLIT2_SIZE ( input )
}
workflow test_seqkit_split2_single_end_part {
def input = []
input = [ [ id:'test', single_end:true ], // meta map
file("${launchDir}/tests/data/fastq/dna/SRR396636_R1.fastq.gz", checkIfExists: true) ]
SEQKIT_SPLIT2_PART ( input )
}
// workflow test_seqkit_split2_length_paired_end {
// def input = []
// input = [ [ id:'test', single_end:false ], // meta map
// file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ]
workflow test_seqkit_split2_paired_end_length {
def input = []
input = [ [ id:'test', single_end:false ], // meta map
file("${launchDir}/tests/data/fastq/dna/SRR396636_*", checkIfExists: true) ]
// SEQKIT_SPLIT2_LENGTH ( input )
// }
SEQKIT_SPLIT2_LENGTH ( input )
}
// workflow test_seqkit_split2_size_paired_end {
// def input = []
// input = [ [ id:'test', single_end:false ], // meta map
// file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ]
workflow test_seqkit_split2_paired_end_size {
def input = []
input = [ [ id:'test', single_end:false ], // meta map
file("${launchDir}/tests/data/fastq/dna/SRR396636_*", checkIfExists: true) ]
// SEQKIT_SPLIT2_SIZE ( input )
// }
SEQKIT_SPLIT2_SIZE ( input )
}
// workflow test_seqkit_split2_part_paired_end {
// def input = []
// input = [ [ id:'test', single_end:false ], // meta map
// file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ]
workflow test_seqkit_split2_paired_end_part {
def input = []
input = [ [ id:'test', single_end:false ], // meta map
file("${launchDir}/tests/data/fastq/dna/SRR396636_*", checkIfExists: true) ]
// SEQKIT_SPLIT2_PART ( input )
// }
SEQKIT_SPLIT2_PART ( input )
}

View file

@ -1,23 +1,25 @@
# - name: seqkit split2 single-end length
# command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_length_single_end -c tests/config/nextflow.config
# tags:
# - seqkit
# - seqkit_split2
# - seqkit_split2_single_end
# - length
- name: seqkit split2 single-end length
command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_single_end_length -c tests/config/nextflow.config
tags:
- seqkit
- seqkit_split2
- seqkit_split2_single_end
- length
files:
- path: output/seqkit/
# - name: seqkit split2 single-end size
# command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_stest_seqkit_split2_size_single_endplit2_single_end -c tests/config/nextflow.config
# tags:
# - seqkit
# - seqkit_split2
# - seqkit_split2_single_end
# - size
# files:
# - path: output/seqkit/
- name: seqkit split2 single-end size
command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_single_end_size -c tests/config/nextflow.config
tags:
- seqkit
- seqkit_split2
- seqkit_split2_single_end
- size
files:
- path: output/seqkit/
- name: seqkit split2 single-end part
command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_part_single_end -c tests/config/nextflow.config
command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_single_end_part -c tests/config/nextflow.config
tags:
- seqkit
- seqkit_split2
@ -26,30 +28,30 @@
files:
- path: output/seqkit/
# - name: seqkit split2 paired-end length
# command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_length_paired_end -c tests/config/nextflow.config
# tags:
# - seqkit
# - seqkit_split2
# - seqkit_split2_paired_end
# - length
# files:
# - path: output/seqkit/
- name: seqkit split2 paired-end length
command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_paired_end_length -c tests/config/nextflow.config
tags:
- seqkit
- seqkit_split2
- seqkit_split2_paired_end
- length
files:
- path: output/seqkit/
# - name: seqkit split2 paired-end size
# command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_size_paired_end -c tests/config/nextflow.config
# tags:
# - seqkit
# - seqkit_split2
# - seqkit_split2_paired_end
# - size
# files:
# - path: output/seqkit/
- name: seqkit split2 paired-end size
command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_paired_end_size -c tests/config/nextflow.config
tags:
- seqkit
- seqkit_split2
- seqkit_split2_paired_end
- size
files:
- path: output/seqkit/
# - name: seqkit split2 paired-end part
# command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_part_paired_end -c tests/config/nextflow.config
# tags:
# - seqkit
# - seqkit_split2
# - seqkit_split2_paired_end
# - part
- name: seqkit split2 paired-end part
command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_paired_end_part -c tests/config/nextflow.config
tags:
- seqkit
- seqkit_split2
- seqkit_split2_paired_end
- part