magicBatch.Rd
This is an implementation of the Marcov Affinity-based Graph Imputation of Cells (MAGIC) algorithm described in Van Dijk, David et al, modified for flexibility. It includes the mar_mat_input argument, which allows the data used to compute the diffusion operator and the data to be imputed to be specified independently. This allows any low-dimensional representation of the data, including batch-corrected data, to be directly used to calculate the powered Marcov affinity matrix.
An expression matrix where cells correspond to rows and genes correspond to columns
A vector of features to use for imputation.
A matrix where cells correspond to rows and components or features correspond to columns. If left unspecified, the Marcov matrix calculation is initialized with PCA of data.
Whether to return the Markov matrix
An integer specifying the number of PCA components that should be used
An integer or a vector of integers to be used to power the marcov affinity matrix
Number of diffusion map components to compute. If set to 0, this diffusion map will not be computed.
The number of nearest neighbors used to construct the knn graph
This controls the standard deviation used in the Gaussian kernel width for a given cell, which is set to the distance to the ka-th nearest neighbor.
Epsilon parameter used in MAGIC
Percentile to rescale data to after imputation
A string passed to the rescale_method argument of the rescale_data function. Two methods are available: "adaptive" or "classic" See rescale_data function for details.
A character string passed to the "command" argument of the system2 function in order to invoke python. E.g. "/usr/local/bin/python3" on a Mac.
A list
that includes the following elements:
A cell by gene matrix
of the imputed gene expression values.
A cell by diffusion map component matrix
.
A cell by cell matrix
of the markov affinity matrix.