# Required:
# library(DWLasso)
#' Wrapper for degree-weighted lasso method
#'
#' Conducts co-expression analysis using DWLasso
#' @param x The n by p matrix of counts.
#' @param lambda1 A penalty parameter that controls degree sparsity of the
#' inferred network.
#' @param lambda2 A penalty parameter that controls overall sparsity of the
#' inferred network.
#' @param ... Additional arguments passed to `DWLasso::DWLasso()`.
#' @return A p by p matrix of association scores.
#' @export
run_dwlasso <- function(x,
lambda1 = 0.4,
lambda2 = 2,
...) {
result <- DWLasso::DWLasso(x)
scores <- result$mat
scores <- (scores + t(scores)) / 2
colnames(scores) <- colnames(x)
return(scores)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.