| get_normalized | R Documentation |
Given a SconeExperiment object created by a call to scone, it will
return a matrix of normalized counts (in log scale if log=TRUE).
get_normalized(x, method, ...)
## S4 method for signature 'SconeExperiment,character'
get_normalized(x, method, log = FALSE)
## S4 method for signature 'SconeExperiment,numeric'
get_normalized(x, method, log = FALSE)
x |
a |
method |
character or numeric. Either a string identifying the normalization scheme to be retrieved, or a numeric index with the rank of the normalization method to retrieve (according to scone ranking of normalizations). |
... |
additional arguments for specific methods. |
log |
logical. Should the data be returned in log-scale |
If scone was run with return_norm="in_memory",
this function simply retrieves the normalized data from the assays
slote of object.
If scone was run with return_norm="hdf5", this
function will read the normalized matrix from the specified hdf5 file.
If scone was run with return_norm="no", this
function will compute the normalized matrix on the fly.
The numeric method will always return the normalization
corresponding to row method of the scone_params slot. This
means that if scone was run with eval=TRUE,
get_normalized(x, 1) will return the top ranked method. If
scone was run with eval=FALSE,
get_normalized(x,1) will return the first normalization
in the order saved by scone.
A matrix of normalized counts in log-scale.
get_normalized(x = SconeExperiment, method = character): If
method is a character, it will return the normalized
matrix corresponding to the normalization scheme specified
by the character string.The string must be one of the
row.names of the slot scone_params.
get_normalized(x = SconeExperiment, method = numeric): If
method is a numeric, it will return the normalized
matrix according to the scone ranking.
set.seed(42)
mat <- matrix(rpois(500, lambda = 5), ncol=10)
colnames(mat) <- paste("X", 1:ncol(mat), sep="")
obj <- SconeExperiment(mat)
res <- scone(obj, scaling=list(none=identity, uq=UQ_FN),
evaluate=TRUE, k_ruv=0, k_qc=0,
eval_kclust=2, bpparam = BiocParallel::SerialParam())
top_norm = get_normalized(res,1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.