From c55383dd8268f3fa8024ad8bcd01c582448fc3b3 Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 29 Oct 2024 17:02:30 +0800 Subject: [PATCH] Fix mode --- R/bambu.R | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/R/bambu.R b/R/bambu.R index 34d9a166..df4fe6cb 100644 --- a/R/bambu.R +++ b/R/bambu.R @@ -142,23 +142,25 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL, fusionMode = FALSE, verbose = FALSE, demultiplexed = FALSE, spatial = NULL, quantData = NULL, sampleNames = NULL, cleanReads = FALSE, dedupUMI = FALSE, clusters = NULL) { message(paste0("Running Bambu-v", "3.3.0")) - if(mode == "bulk"){ - lowMemory = TRUE - } - if(mode == "multiplexed"){ - if(is.null(demultiplex)) demultiplex = TRUE - cleanReads = TRUE - opt.em = list(degradationBias = FALSE) - quant = FALSE - } - if(mode == "fusion"){ - NDR = 1 - fusionMode = TRUE - } - if(mode == "debug"){ - verbose = TRUE - trackReads = TRUE - returnDistTable = TRUE + if(!is.null(mode)){ + if(mode == "bulk"){ + lowMemory = TRUE + } + if(mode == "multiplexed"){ + if(is.null(demultiplex)) demultiplex = TRUE + cleanReads = TRUE + opt.em = list(degradationBias = FALSE) + quant = FALSE + } + if(mode == "fusion"){ + NDR = 1 + fusionMode = TRUE + } + if(mode == "debug"){ + verbose = TRUE + trackReads = TRUE + returnDistTable = TRUE + } } if(is.null(annotations)) { annotations = GRangesList() } else annotations <- checkInputs(annotations, reads,