Try to make a single test pass

This commit is contained in:
FriederikeHanssen 2021-02-23 13:34:50 +01:00
parent a0c9777d60
commit 25a2a16f2d
4 changed files with 88 additions and 112 deletions

View file

@ -1,12 +1,6 @@
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'
// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :)
// https://github.com/nf-core/modules/tree/master/software
// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace:
// https://nf-co.re/join
// TODO nf-core: The key words "MUST", "MUST NOT", "SHOULD", etc. are to be interpreted as described in RFC 2119 (https://tools.ietf.org/html/rfc2119).
// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters.
// All other parameters MUST be provided as a string i.e. "options.args"
// where "params.options" is a Groovy Map that MUST be provided via the addParams section of the including workflow.
@ -39,16 +33,9 @@ process SEQKIT_SPLIT2 {
input:
tuple val(meta), path(reads)
// TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group"
// MUST be provided as an input via a Groovy Map called "meta".
// This information may not be required in some instances e.g. indexing reference genome files:
// https://github.com/nf-core/modules/blob/master/software/bwa/index/main.nf
// TODO nf-core: Where applicable please provide/convert compressed files as input/output
// e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc.
output:
tuple val(meta), path("*.fq.gz"), emit: reads
path("*.version.txt") , emit: version
path("*.version.txt") , emit: version
script:
@ -57,29 +44,25 @@ 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 \
$options.args \
--threads $task.cpus \
-1 $reads \
-O $prefix
-1 $reads
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]} \
-O $prefix
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

@ -1,12 +1,10 @@
name: seqkit_split2
## TODO nf-core: Add a description and keywords
description: Split single or paired-end fastq.gz files
keywords:
- split
- fastq
tools:
- seqkit:
## TODO nf-core: Add a description and other details for the software below
description: |
Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen.
homepage: https://github.com/shenwei356/seqkit

View file

@ -2,25 +2,25 @@
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_PART } from '../../../../software/SEQKIT/SPLIT2/main.nf' addParams( options: ['args': '--by-part 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_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) ]
// 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 )
}
// 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) ]
// 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 )
}
// SEQKIT_SPLIT2_SIZE ( input )
// }
workflow test_seqkit_split2_part_single_end {
def input = []
@ -30,26 +30,26 @@ workflow test_seqkit_split2_part_single_end {
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_length_paired_end {
// def input = []
// input = [ [ id:'test', single_end:false ], // meta map
// file("${launchDir}/tests/data/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_size_paired_end {
// def input = []
// input = [ [ id:'test', single_end:false ], // meta map
// file("${launchDir}/tests/data/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_part_paired_end {
// def input = []
// input = [ [ id:'test', single_end:false ], // meta map
// file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ]
SEQKIT_SPLIT2_PART ( input )
}
// SEQKIT_SPLIT2_PART ( input )
// }

View file

@ -1,23 +1,20 @@
- 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
files:
- path: output/seqkit/
md5sum: a41bfadacd2eeef1d31e05c135cc4f4e
# - 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 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_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 part
command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_part_single_end -c tests/config/nextflow.config
@ -29,32 +26,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_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 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_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 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
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