From 2654c52ed14fa3410b68caae72108d0249510452 Mon Sep 17 00:00:00 2001 From: FriederikeHanssen Date: Wed, 17 Feb 2021 17:15:02 +0100 Subject: [PATCH] Use list of reads as input, similar to dedup/extract --- software/seqkit/split2/main.nf | 10 +++++----- software/seqkit/split2/meta.yml | 8 ++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/software/seqkit/split2/main.nf b/software/seqkit/split2/main.nf index b9413537..d429cffc 100644 --- a/software/seqkit/split2/main.nf +++ b/software/seqkit/split2/main.nf @@ -37,7 +37,7 @@ process SEQKIT_SPLIT2 { } input: - tuple val(meta), path(read1), path(read2) + 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". @@ -57,13 +57,13 @@ 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){ //TODO: I guess since optionally inputs are not possible right now, we need two modules, one for single_end and one for paired_end + if(meta.single_end){ """ seqkit \ split2 \ $options.args \ --threads $task.cpus \ - -1 $read1 \ + -1 $reads \ -O $prefix @@ -75,8 +75,8 @@ process SEQKIT_SPLIT2 { split2 \ $options.args \ --threads $task.cpus \ - -1 $read1 \ - -2 $read2 \ + -1 ${reads[0]} \ + -2 ${reads[1]} \ -O $prefix echo \$(seqkit --version 2>&1) | sed 's/^.*seqkit //; s/Using.*\$//' > ${software}.version.txt diff --git a/software/seqkit/split2/meta.yml b/software/seqkit/split2/meta.yml index 002ac970..7280abc4 100644 --- a/software/seqkit/split2/meta.yml +++ b/software/seqkit/split2/meta.yml @@ -41,13 +41,9 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - read1: + - reads: type: file - description: First FastQ file - pattern: "*.{fq.gz/fastq.gz}" - - read2: - type: file - description: Second FastQ file + description: FastQ files pattern: "*.{fq.gz/fastq.gz}" ## TODO nf-core: Add a description of all of the variables used as output output: