Calculate the ratio of variance explained by ICA or PCA to CCA
CalcVarExpRatio(object, reduction.type = "pca", grouping.var, dims.use)
Seurat object
type of dimensional reduction to compare to CCA (pca, pcafast, ica)
variable to group by
Vector of dimensions to project onto (default is the 1:number stored for cca)
Returns Seurat object with ratio of variance explained stored in object@meta.data$var.ratio