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 // Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './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. // 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" // 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. // where "params.options" is a Groovy Map that MUST be provided via the addParams section of the including workflow.
@ -39,13 +33,6 @@ process SEQKIT_SPLIT2 {
input: input:
tuple val(meta), path(reads) 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: output:
tuple val(meta), path("*.fq.gz"), emit: reads tuple val(meta), path("*.fq.gz"), emit: reads
path("*.version.txt") , emit: version path("*.version.txt") , emit: version
@ -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. //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}" def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
if(meta.single_end){ // if(meta.single_end){
""" """
seqkit \ seqkit \
split2 \ split2 \
$options.args \ $options.args \
--threads $task.cpus \ --threads $task.cpus \
-1 $reads \ -1 $reads
-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]} \
-O $prefix
echo \$(seqkit --version 2>&1) | sed 's/^.*seqkit //; s/Using.*\$//' > ${software}.version.txt 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 name: seqkit_split2
## TODO nf-core: Add a description and keywords
description: Split single or paired-end fastq.gz files description: Split single or paired-end fastq.gz files
keywords: keywords:
- split - split
- fastq - fastq
tools: tools:
- seqkit: - seqkit:
## TODO nf-core: Add a description and other details for the software below
description: | description: |
Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen. Cross-platform and ultrafast toolkit for FASTA/Q file manipulation, written by Wei Shen.
homepage: https://github.com/shenwei356/seqkit homepage: https://github.com/shenwei356/seqkit

View file

@ -2,25 +2,25 @@
nextflow.enable.dsl = 2 nextflow.enable.dsl = 2
include { SEQKIT_SPLIT2_LENGTH } from '../../../../software/SEQKIT/SPLIT2/main.nf' addParams( options: ['args': '--by-length 26K'] ) //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_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 as SEQKIT_SPLIT2_PART } from '../../../../software/SEQKIT/SPLIT2/main.nf' addParams( options: ['args': '--by-part 2'] )
workflow test_seqkit_split2_length_single_end { // workflow test_seqkit_split2_length_single_end {
def input = [] // def input = []
input = [ [ id:'test', single_end:true ], // meta map // input = [ [ id:'test', single_end:true ], // meta map
file("${launchDir}/tests/data/dna/SRR396636_R1.fastq.gz", checkIfExists: true) ] // 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 { // workflow test_seqkit_split2_size_single_end {
def input = [] // def input = []
input = [ [ id:'test', single_end:true ], // meta map // input = [ [ id:'test', single_end:true ], // meta map
file("${launchDir}/tests/data/dna/SRR396636_R1.fastq.gz", checkIfExists: true) ] // 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 { workflow test_seqkit_split2_part_single_end {
def input = [] def input = []
@ -30,26 +30,26 @@ workflow test_seqkit_split2_part_single_end {
SEQKIT_SPLIT2_PART ( input ) SEQKIT_SPLIT2_PART ( input )
} }
workflow test_seqkit_split2_length_paired_end { // workflow test_seqkit_split2_length_paired_end {
def input = [] // def input = []
input = [ [ id:'test', single_end:false ], // meta map // input = [ [ id:'test', single_end:false ], // meta map
file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ] // file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ]
SEQKIT_SPLIT2_LENGTH ( input ) // SEQKIT_SPLIT2_LENGTH ( input )
} // }
workflow test_seqkit_split2_size_paired_end { // workflow test_seqkit_split2_size_paired_end {
def input = [] // def input = []
input = [ [ id:'test', single_end:false ], // meta map // input = [ [ id:'test', single_end:false ], // meta map
file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ] // file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ]
SEQKIT_SPLIT2_SIZE ( input ) // SEQKIT_SPLIT2_SIZE ( input )
} // }
workflow test_seqkit_split2_part_paired_end { // workflow test_seqkit_split2_part_paired_end {
def input = [] // def input = []
input = [ [ id:'test', single_end:false ], // meta map // input = [ [ id:'test', single_end:false ], // meta map
file("${launchDir}/tests/data/dna/SRR396636_*", checkIfExists: true) ] // 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 # - 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 # command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_length_single_end -c tests/config/nextflow.config
tags: # tags:
- seqkit # - seqkit
- seqkit_split2 # - seqkit_split2
- seqkit_split2_single_end # - seqkit_split2_single_end
- length # - length
files:
- path: output/seqkit/
md5sum: a41bfadacd2eeef1d31e05c135cc4f4e
- name: seqkit split2 single-end size # - 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 # command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_stest_seqkit_split2_size_single_endplit2_single_end -c tests/config/nextflow.config
tags: # tags:
- seqkit # - seqkit
- seqkit_split2 # - seqkit_split2
- seqkit_split2_single_end # - seqkit_split2_single_end
- size # - size
files: # files:
- path: output/seqkit/ # - path: output/seqkit/
- name: seqkit split2 single-end part - 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_part_single_end -c tests/config/nextflow.config
@ -29,32 +26,30 @@
files: files:
- path: output/seqkit/ - path: output/seqkit/
- name: seqkit split2 paired-end length # - 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 # command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_length_paired_end -c tests/config/nextflow.config
tags: # tags:
- seqkit # - seqkit
- seqkit_split2 # - seqkit_split2
- seqkit_split2_paired_end # - seqkit_split2_paired_end
- length # - length
files: # files:
- path: output/seqkit/ # - path: output/seqkit/
- name: seqkit split2 paired-end size # - 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 # command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_size_paired_end -c tests/config/nextflow.config
tags: # tags:
- seqkit # - seqkit
- seqkit_split2 # - seqkit_split2
- seqkit_split2_paired_end # - seqkit_split2_paired_end
- size # - size
files: # files:
- path: output/seqkit/ # - path: output/seqkit/
- name: seqkit split2 paired-end part # - 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 # command: nextflow run ./tests/software/seqkit/split2 -entry test_seqkit_split2_part_paired_end -c tests/config/nextflow.config
tags: # tags:
- seqkit # - seqkit
- seqkit_split2 # - seqkit_split2
- seqkit_split2_paired_end # - seqkit_split2_paired_end
- part # - part
files:
- path: output/seqkit/