title: "deconvolute_using_NNLS"
author: "Zach Dubrine,Thomas Goralski"
date: '2022-04-01'
output: html_document
#' @title Deconvolution using non-negative least squares
#'
#' @description used the generate the average expression profile of each cell type
#'
#' @param cluster_markers generated by Average Expression function
#' @param spots generated by generate spots function
#'
#' @export
deconvolute_using_NNLS<-function(cluster_markers, spots, L1 = 0.01){
stopifnot(nrow(cluster_markers) == nrow(spots))
stopifnot(rownames(cluster_markers) == rownames(spots))
RcppML::predict.nmf(cluster_markers, spots, L1, mask = new("ngCMatrix"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.