From 1a683acca78d3290ce76f4a84dcc8085ed2de639 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Mon, 12 Aug 2024 16:52:48 +0200 Subject: [PATCH] Fix usage of getGenomeAttribute --- workflows/scrnaseq.nf | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/workflows/scrnaseq.nf b/workflows/scrnaseq.nf index 3ccab9ec..3608c9d5 100644 --- a/workflows/scrnaseq.nf +++ b/workflows/scrnaseq.nf @@ -32,8 +32,12 @@ workflow SCRNASEQ { error "Only cellranger supports `protocol = 'auto'`. Please specify the protocol manually!" } - ch_genome_fasta = params.fasta ? file(params.fasta, checkIfExists: true) : ( params.genome ? file( getGenomeAttribute('fasta'), checkIfExists: true ) : [] ) - ch_gtf = params.gtf ? file(params.gtf , checkIfExists: true) : ( params.genome ? file( getGenomeAttribute('gtf') , checkIfExists: true ) : [] ) + params.fasta = getGenomeAttribute('fasta') + params.gtf = getGenomeAttribute('gtf') + params.star_index = getGenomeAttribute('star') + + ch_genome_fasta = params.fasta ? file(params.fasta, checkIfExists: true) : [] + ch_gtf = params.gtf ? file(params.gtf, checkIfExists: true) : [] // general input and params ch_transcript_fasta = params.transcript_fasta ? file(params.transcript_fasta): [] @@ -67,8 +71,8 @@ workflow SCRNASEQ { ch_salmon_index = params.salmon_index ? file(params.salmon_index) : [] //star params - star_index = params.star ? file(params.star_index, checkIfExists: true) : ( params.genome ? file( getGenomeAttribute('star'), checkIfExists: true ) : [] ) - ch_star_index = [[id: star_index.baseName], star_index] + star_index = params.star_index ? file(params.star_index, checkIfExists: true) : null + ch_star_index = star_index ? [[id: star_index.baseName], star_index] : [] star_feature = params.star_feature //cellranger params