Skip to content

Commit

Permalink
Message for duplicated samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago Silva authored and Tiago Silva committed Nov 17, 2023
1 parent 93fd0bd commit 84cf1d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/prepare.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84cf1d0

Please sign in to comment.