From 625fbbc0531fb1717349c7f1b1c677a3b8619767 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Fri, 13 Sep 2024 11:14:20 +0100 Subject: [PATCH] Fix tximport summarizedexperiment (#6638) * SummarizedExperiment: don't sanitise column names * tximport: explicitly disable name sanitisation --- .../summarizedexperiment/templates/summarizedexperiment.r | 2 +- modules/nf-core/tximeta/tximport/templates/tximport.r | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/summarizedexperiment/summarizedexperiment/templates/summarizedexperiment.r b/modules/nf-core/summarizedexperiment/summarizedexperiment/templates/summarizedexperiment.r index 6c705350ace..60ea3179fc2 100644 --- a/modules/nf-core/summarizedexperiment/summarizedexperiment/templates/summarizedexperiment.r +++ b/modules/nf-core/summarizedexperiment/summarizedexperiment/templates/summarizedexperiment.r @@ -13,7 +13,7 @@ library(SummarizedExperiment) #' #' @return output Data frame -read_delim_flexible <- function(file, header = TRUE, row.names = NULL, check.names = TRUE, stringsAsFactors = FALSE){ +read_delim_flexible <- function(file, header = TRUE, row.names = NULL, check.names = FALSE, stringsAsFactors = FALSE){ ext <- tolower(tail(strsplit(basename(file), split = "\\\\.")[[1]], 1)) diff --git a/modules/nf-core/tximeta/tximport/templates/tximport.r b/modules/nf-core/tximeta/tximport/templates/tximport.r index e8235c8b052..5986c05d946 100755 --- a/modules/nf-core/tximeta/tximport/templates/tximport.r +++ b/modules/nf-core/tximeta/tximport/templates/tximport.r @@ -26,7 +26,7 @@ library(tximport) #' @return A data frame combining the first two columns of the rowData with the assay data from the specified slot. build_table <- function(se.obj, slot) { - cbind(rowData(se.obj)[,1:2], assays(se.obj)[[slot]]) + data.frame(cbind(rowData(se.obj)[,1:2], assays(se.obj)[[slot]]), check.names = FALSE) } #' Write a table to a file from a SummarizedExperiment object with given parameters