# function to normalize the countMatrix depending on the input
# single cell data will be processed using seurat
# bulk data will be processed using edgeR
# countMatrix IDs should be entrezIDs
library(Seurat)
library(edgeR)
# single cell data
preprocessCountMatrix <- function(countMatrix, scData){
if(scData=="TRUE"){
nbt.data <- log(data.matrix(countMatrix)+1)
nbt <- CreateSeuratObject(nbt.data)
seqwell <- NormalizeData(object = nbt)
seqwell <- ScaleData(object = seqwell)
seqwell <- FindVariableGenes(object = seqwell, do.plot = FALSE)
}
else{
}
return(seqwell)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.