From 84cf1d0b50367b3c2a67ae4173d5f0f9b6a48b0a Mon Sep 17 00:00:00 2001 From: Tiago Silva Date: Fri, 17 Nov 2023 15:43:31 -0300 Subject: [PATCH] Message for duplicated samples --- R/prepare.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/prepare.R b/R/prepare.R index 2d06a7ed5..f9e317952 100644 --- a/R/prepare.R +++ b/R/prepare.R @@ -863,6 +863,12 @@ readDNAmethylation <- function( df <- file_equal_probes %>% map_df(2) colnames(df) <- file_equal_probes %>% map_chr(.f = function(y) colnames(y)[2]) df$V1 <- file_equal_probes[[1]]$V1 + if (any(duplicated(colnames(df)))){ + message("oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo") + message("Duplicated samples names were found. Adding _rep suffix to name") + message("oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo") + } + colnames(df)[duplicated(colnames(df))] <- paste0(colnames(df)[duplicated(colnames(df))],"_rep") df }) %>% purrr::reduce(dplyr::full_join,by = "V1") %>% as.data.frame() rownames(df) <- df$V1