#' get.multipcf
#'
#' `get.multipcf` uses the multi-sample pcf algorithm to segment the LogR ratios across multiple samples.
#'
#' @param raw.LogR The table showing the logR ratios directly from conumee.
#' @return Returns the list of segmented LogR with different gamma values
#' @importFrom magrittr %>%
#'
#' @export
get.multipcf <- function(raw.LogR) {
LogR_for_pcf <- raw.LogR[,c(1,4,6:ncol(raw.LogR))]
LogR_for_pcf <- LogR_for_pcf %>% dplyr::mutate(chr = sub("chr" , "", chr))
wins.data <- copynumber::winsorize(LogR_for_pcf, k = 15, return.outliers = F, verbose = F)
multi.seg.list <- list()
multi.seg.estimates.list <- list()
if (ncol(wins.data) >= 4) {
for (gamma in c("05", "06", "07", "08", "09", "10", "15")) {
multi.seg.list[[gamma]] <- copynumber::multipcf(data = wins.data,
gamma = as.numeric(gamma),
verbose = F, return.est = T, fast = T)
multi.seg.estimates.list[[gamma]] <-
cbind(raw.LogR[, c(1:3)],multi.seg.list[[gamma]]$estimates[,-c(1:2)])
}
}
return(multi.seg.estimates.list)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.