RunBlockCorr
Description
Run spatial dissimilarity test for features and their binding features in parallel.
Usage
RunBlockCorr(
object = NULL,
bind.name = "gene_name",
features = NULL,
assay = NULL,
min.cells = 10,
bind.assay = NULL,
bind.features = NULL,
min.cells.bind = 10,
prefix = NULL,
subset = NULL,
min.features.per.block = 1,
scale.factor = 10000,
mode = c(1, 2, 3),
method = c("D", "D2", "Lee"),
library.size = NULL,
wm.name = NULL,
perm = 100,
seed = 999,
threads = 0,
verbose = TRUE,
debug = FALSE,
cells = NULL,
idents = NULL,
node = NULL,
reduction = "pca",
dims = 1:10,
k.param = 20,
prune.SNN = 1/50,
n.trees = 50,
nn.eps = 0,
nn.method = "annoy",
annoy.metric = "euclidean"
)
Arguments
object
|
Seurat object |
bind.name
|
Title name for binding features in the meta table. Consider most users start Yano to perform alternative splicing analysis, the default bind.name set to “gene_name”. |
features
|
Vector of features to calculate. Default is AutoCorrFeatures(object). |
assay
|
Work assay. |
min.cells
|
Features detected in few than minimal number of cells will be skipped. Default is 10. |
bind.assay
|
Name of binding assay. |
bind.features
|
List of bind features. Default use all. |
min.cells.bind
|
Binding features detected in few than minimal number of cells will be skipped. Default is 10. |
prefix
|
Prefix name for output scores and values. Default is same with bind.name. |
scale.factor
|
Scale factor to normalise counts. Default is 1e4. For mode 1, this function will use data from Layer ‘data’. For mode 2 and 3, will use data from Layer ‘counts’. The counts will further be normalised with sample size and scale factor for spatial dissimilarity test. |
mode
|
Test mode. For mode 1, X (test feature) vs Y (binding feature). For mode 2, X vs (Y-X). For mode 3, X vs (Y+X). Please note, when set to mode 2 or 3, will use raw counts to update expression value of binding features. Then normalise the counts before testing. For mode 1, will use Layer ‘data’. Default is mode 1. |
method
|
Method to use. Support D, D2 and Lee. D = sqrt(Lx)(1 − rxy). D2 = sqrt(Lx)*sqr**t(Ly)(1 − rxy*). Lee for Lee’s Score. In default use D method, see the manual for details. |
library.size
|
Library size for each cell, used for normalise counts when mode is 2 or 3. If not set, use colSum(counts) instead. |
wm.name
|
Weight matrix name, this matrix (graph) generated by RunAutoCorr .
|
perm
|
Permutations for evaluating mean and sd of D/L scores. Default is 100. |
seed
|
Seed for generate random number. Default is 999. |
threads
|
Threads. If set to 0 (default), will auto check the CPU cores and set threads = number of CPU cores -1. |
debug
|
Print debug message. Will auto set thread to 1. Default is FALSE. |
cells
|
Calculate scores for predefined cells. Will reconstruct the SNN graph and weight matrix for these cells with ‘reduction’ space (usually be pca or harmony). Only weight matrix that calculated by SNN is supported if cells/idents/node is defined. |
idents
|
Calculate scores for these cell groups. The idents should be a vector of group names in Idnets(object). |
node
|
A node to find markers for and all its children; requires BuildClusterTree to have been run previously. Only can be used if test all groups.
|
reduction
|
Dimension reduction name for constructing SNN graph and weight matrix. Default is ‘pca’. This and following parameters only actived when cells is set, because need to recalculate the SNN graph for the defined cells. |
dims
|
Dimensions of reduction used to construct SNN graph. |
k.param
|
Defines k for the k-nearest neighbor algorithm. |
prune.SNN
|
Sets the cutoff for acceptable Jaccard index when computing the neighborhood overlap for the SNN construction. Any edges with values less than or equal to this will be set to 0 and removed from the SNN graph. Essentially sets the stringency of pruning (0 — no pruning, 1 — prune everything). Default is 1/50. |
n.trees
|
More trees gives higher precision when using annoy approximate nearest neighbor search. Default is 50. |
nn.eps
|
Error bound when performing nearest neighbor seach using RANN; default of 0.0 implies exact nearest neighbor search |
nn.method
|
Method for nearest neighbor finding. Options include: rann, annoy(default). |
annoy.metric
|
Distance metric for annoy. Options include: euclidean (default), cosine, manhattan, and hamming |
versbose
|
Print log message. Default is TRUE. |