R/run_aracne.R

Defines functions run_aracne

Documented in run_aracne

# if (!requireNamespace("BiocManager", quietly = TRUE))
#   install.packages("BiocManager")
# BiocManager::install("minet")


#' Wrapper for ARACNE method
#' 
#' Conducts co-expression analysis using ARACNE
#' @param x The n by p matrix of counts.
#' @return A p by p matrix of association scores.
#' @export
run_aracne <- function(x, method = "spearman", disc = "none", nbins = NULL, 
                       eps = 0, ...) {
  
  mim <- minet::build.mim(x, estimator = method, disc = disc, nbins = nbins)
  scores <- minet::aracne(mim, eps = eps)
  
  colnames(scores) <- colnames(x)
  rownames(scores) <- NULL
  
  return(scores)
}
tgrimes/dnapath2 documentation built on May 21, 2020, 5:53 p.m.