Hi,
momf.computeRef function returns error due to lack of names in weight vector. This implementation should solve it.
momf.computeRef <- function(sc_counts, cell_type){
U <- sapply(unique(cell_type), function(ct){
y = sc_count[ ,cell_type %in% ct, drop = FALSE]
weight = sum(y)/sum(sc_count)
rowSums(y)/sum(y)*weight
})
U <- 1000000 * U
colnames(U) <- unique(cell_type)
rownames(U) <- rownames(sc_count)
# return estimated mean for each cell type
return(U)
}
P.D: I would also be straight forward to implement this function in parelel.
Thanks
Hi,
momf.computeRef function returns error due to lack of names in weight vector. This implementation should solve it.
P.D: I would also be straight forward to implement this function in parelel.
Thanks