run.mnn {iCellR} | R Documentation |
Run MNN alignment on the main data.
Description
This function takes an object of class iCellR and runs MNN alignment. It's a wrapper for scran.
Usage
run.mnn(
x = NULL,
method = "base.mean.rank",
top.rank = 500,
gene.list = "character",
data.type = "main",
k = 20,
cos.norm = TRUE,
ndist = 3,
d = 50,
approximate = FALSE,
irlba.args = list(),
subset.row = NULL,
auto.order = FALSE,
pc.input = FALSE,
compute.variances = FALSE,
assay.type = "logcounts",
get.spikes = FALSE,
BNPARAM = NULL,
BPPARAM = SerialParam()
)
Arguments
x |
An object of class iCellR. |
method |
Choose from "base.mean.rank" or "gene.model", default is "base.mean.rank". If gene.model is chosen you need to provide gene.list. |
top.rank |
A number taking the top genes ranked by base mean, default = 500. |
gene.list |
A charactor vector of genes to be used for PCA. If "clust.method" is set to "gene.model", default = "my_model_genes.txt". |
data.type |
Choose from "main" and "imputed", default = "main" |
k |
An integer scalar specifying the number of nearest neighbors to consider when identifying MNNs. |
cos.norm |
A logical scalar indicating whether cosine normalization should be performed on the input data prior to calculating distances between cells. |
ndist |
A numeric scalar specifying the threshold beyond which neighbours are to be ignored when computing correction vectors. Each threshold is defined in terms of the number of median distances. |
d |
Number of dimentions to pass to ‘multiBatchPCA’. |
approximate |
Further arguments to pass to ‘multiBatchPCA’. Setting ‘approximate=TRUE’ is recommended for large data sets with many cells. |
irlba.args |
Further arguments to pass to ‘multiBatchPCA’. Setting ‘approximate=TRUE’ is recommended for large data sets with many cells. |
subset.row |
See ‘?"scran-gene-selection"’. |
auto.order |
Logical scalar indicating whether re-ordering of batches should be performed to maximize the number of MNN pairs at each step. Alternatively an integer vector containing a permutation of ‘1:N’ where ‘N’ is the number of batches. |
pc.input |
Logical scalar indicating whether the values in ‘...’ are already low-dimensional, e.g., the output of ‘multiBatchPCA’. |
compute.variances |
Logical scalar indicating whether the percentage of variance lost due to non-orthogonality should be computed. |
assay.type |
A string or integer scalar specifying the assay containing the expression values, if SingleCellExperiment objects are present in ‘...’. |
get.spikes |
See ‘?"scran-gene-selection"’. Only relevant if ‘...’ contains SingleCellExperiment objects. |
BNPARAM |
A BiocNeighborParam object specifying the nearest neighbor algorithm. Defaults to an exact algorithm if ‘NULL’, see ‘?findKNN’ for more details. |
BPPARAM |
A BiocParallelParam object specifying whether the PCA and nearest-neighbor searches should be parallelized. |
Value
An object of class iCellR.