extract_assay <- function(name, Assay, groups,
groupinfo = NULL, addgroupnames = TRUE){
allassays <- assays(name)
selectedassay <- allassays[[Assay]]
x <- groupinfo
x <- x[x$group %in% groups,,drop = FALSE]
y <- name[[Assay]]
y = y[rownames(y) %in% rownames(x),]
x <- x[match(rownames(y), rownames(x)),,drop = FALSE]
if(addgroupnames){
y <- cbind(y,x)
}
return(y)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.