From 33755d9ab2f4d3a9cfc14f0fce5cb105ffd2cfe7 Mon Sep 17 00:00:00 2001 From: Victor Le Bars Date: Wed, 10 Jan 2024 10:02:12 +0100 Subject: [PATCH] add stranded option for bambu in param --- bin/run_bambu.R | 9 ++++++++- modules/bambu/bambu.nf | 1 + nextflow.config | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/run_bambu.R b/bin/run_bambu.R index e68d601..aa5a973 100755 --- a/bin/run_bambu.R +++ b/bin/run_bambu.R @@ -14,7 +14,13 @@ genomeseq <- strsplit(grep('--fasta*', args, value = TRUE), split = '=')[[1 genomeSequence <- Rsamtools::FaFile(genomeseq) Rsamtools::indexFa(genomeseq) annot_gtf <- strsplit(grep('--annotation*', args, value = TRUE), split = '=')[[1]][[2]] -readlist <- args[5:length(args)] +bambu_strand <- strsplit(grep('--bambu_strand*', args, value = TRUE), split = '=')[[1]][[2]] +if (bambu_strand=="true"){ + bambu_strand=TRUE +} else { + bambu_strand=FALSE +} +readlist <- args[6:length(args)] print("BAMs:") readlist @@ -30,6 +36,7 @@ se <- bambu( ncore = ncore, verbose = TRUE, NDR = 1, + stranded = bambu_strand, opt.discovery = list(min.txScore.singleExon = 0) ) diff --git a/modules/bambu/bambu.nf b/modules/bambu/bambu.nf index 4195a77..e359872 100755 --- a/modules/bambu/bambu.nf +++ b/modules/bambu/bambu.nf @@ -25,6 +25,7 @@ process BAMBU { --ncore=${params.maxCpu} \ --annotation=${ref} \ --fasta=${fa} \ + --bambu_strand=${params.bambu_strand} \ *.bam sed -i 's/*/./g' extended_annotations.gtf diff --git a/nextflow.config b/nextflow.config index fa22833..e9fa7fe 100755 --- a/nextflow.config +++ b/nextflow.config @@ -11,6 +11,7 @@ params { operation = "intersection" tfkmers_model = null tfkmers_tokenizer = null + bambu_strand = true } process {