normSca | R Documentation |
This function is called by the preprocess
function and performs
log-normalisation and scaling of a counts matrix.
normSca(x, lib.size = lib.size, log = TRUE, prior.count = 0.5)
x |
a matrix of counts |
lib.size |
the library size |
log |
logical, indicates whether the output should be on the log2 scale or counts scale. Default is TRUE. |
prior.count |
The prior count to add if the data is log2 normalised. Default is a small count of 0.5. |
a dataframe of log-normalised and scaled counts
y <- matrix(rnbinom(1000, size=2, mu= 20),ncol=10) colnames(y)<- paste("Cell",1:10, sep="") row.names(y)<-paste("Gene",1:100,sep="") norm.data <- normSca(y,lib.size=colSums(y)) #Visualise the counts vs scaled data boxplot(y) boxplot(norm.data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.