This package is designed to perform optimal transport and hypothesis testing on kernel matrices when performing kernel regression. The software is optimized for calculating distance between pairs of samples based on the pairs of mutated gene statuses.
Click to expand!
# Dependencies
req_packs = c("devtools","Rcpp","RcppArmadillo","reshape2",
"ggdendro","smarter","MiRKAT","ggplot2","ROKET")
all_packs = as.character(installed.packages()[,1])
rerun = 0
build_vign = ifelse(Sys.getenv("RSTUDIO_PANDOC") == "",FALSE,TRUE)
for(pack in req_packs){
if( pack %in% all_packs ){
library(package = pack,character.only = TRUE)
next
}
bb = NULL
if( pack %in% c("smarter","ROKET") ){
repo = sprintf("pllittle/%s",pack)
bb = tryCatch(devtools::install_github(repo = repo,
build_vignettes = build_vign,
dependencies = TRUE),
error = function(ee){"error"})
} else {
bb = tryCatch(install.packages(pkgs = pack,
dependencies = TRUE),
error = function(ee){"error"})
}
if( !is.null(bb) && bb == "error" )
stop(sprintf("Error for package = %s",pack))
rerun = 1
}
if( rerun == 1 ) stop("Re-run above code")
By default, the software runs a single thread and loops through all pairs of samples for distance calculations. However if OpenMP is installed, the user can make use of multi-threaded calculations.
# An Introduction
vignette(topic = "intro",package = "ROKET")
Little, P., Hsu, L., Sun, W. (2022). Associating Somatic Mutation with Clinical Outcomes through Kernel Regression and Optimal Transport. Biometrics. [HTML, PDF, SUPP]
R package and code to perform the manuscript's workflow are provided here.