#'Annotate a ExpressioSet
#' @param eset An ExpressionSet
#' @return eSet with Featuredata upadted
#'
#' @export
EnsemblAnnotate <- function(eset, transcriptdb,ensemblonly=T){
gns <- AnnotationDbi::select(transcriptdb, keys=featureNames(eset), columns=c("SYMBOL","GENENAME",'ENTREZID','ENSEMBL'), keytype="PROBEID")
gns_cts <- count(gns,PROBEID)
colnames(gns_cts)[2] <- "GenestoProbe"
gns <- gns[!duplicated(gns[,1]),]
gnsmerg <-inner_join(gns,gns_cts,by='PROBEID')
rownames(gnsmerg)<-gnsmerg$PROBEID
colnames(gnsmerg)[1] ='ID'
fData(eset) <- gnsmerg
return(eset)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.