### From EWCE::generate_celltype_data()
calc_specificity <- function(X) {
normalised_meanExp <- t(t(X) * (1 / colSums(X)))
spec <- normalised_meanExp / (apply(normalised_meanExp, 1, sum) + 1e-12)
return(spec)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.