Skip to content

Commit e3326d4

Browse files
authored
Merge pull request #1619 from bigomics/fix-prefix
improve prefix matching
2 parents c0b18d7 + 8c28c75 commit e3326d4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

components/board.upload/R/upload_module_preview_counts.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,12 @@ upload_table_preview_counts_server <- function(id,
471471
combined_df <- NULL
472472
for (i in 1:length(data_cache)) {
473473
df <- data_cache[[i]]
474-
prefix <- switch(datatypes[i],
475-
"RNA-seq" = "gx",
476-
"Proteomics" = "px",
477-
"Metabolomics" = "mx",
478-
"mx" # default fallback
479-
)
474+
dt <- tolower(datatypes[i])
475+
prefix <- "gx"
476+
if(grepl("proteomics",dt)) prefix <- "px"
477+
if(grepl("metabolomics|lipidomics",dt)) prefix <- "mx"
478+
if(grepl("microarray|micro.array|rna|rnatranscriptomics",dt)) prefix <- "gx"
479+
if(grepl("mirna|mi.rna",dt)) prefix <- "mi"
480480
rownames(df) <- paste0(prefix, ":", rownames(df))
481481
df <- df[, common_cols, drop = FALSE]
482482
combined_df <- rbind(combined_df, df)

0 commit comments

Comments
 (0)