Skip to content

Commit

Permalink
quick update
Browse files Browse the repository at this point in the history
  • Loading branch information
philouail committed Sep 23, 2024
1 parent 0a27d69 commit 5b887ff
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions R/MsExperiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ setMethod("readMsObject",
# merging
ord <- match(assay_data$`Sample Name`, sample_info$`Sample Name`)
merged_data <- cbind(assay_data, sample_info[ord, ])
names(merged_data) <- gsub(" ", "_", names(merged_data))
if (keepProtocol || keepOntology || simplify)
merged_data <- .clean_merged(x = merged_data,
keepProtocol = keepProtocol,
Expand Down Expand Up @@ -284,18 +283,9 @@ setMethod("readMsObject",

#####HELPERS

#' function that takes the extra parameters and clean the metadata if asked by
#' Function that takes the extra parameters and clean the metadata if asked by
#' the user.
#'
#' Note: the subsetting of the merged data is done here, which WILL rename the
#' duplicated columns. I could fix that by first transforming the data.frame into
#' a list but I am not sure that it is useful.. The user might do some
#' subsetting too later and then the same thing will happen. Might as well have
#' it from the beginning.
#'
#' Note2: I would move that function later, keeping it her for review to help
#' clarity
#'
#' @noRd
.clean_merged <- function(x, keepProtocol, keepOntology, simplify) {
# remove ontology
Expand Down

0 comments on commit 5b887ff

Please sign in to comment.