imputeMatrix.Rd
This function gets imputation weights from an ArchRProject to impute a numerical matrix
imputeMatrix(
mat = NULL,
imputeWeights = NULL,
threads = getArchRThreads(),
verbose = FALSE,
logFile = createLogFile("imputeMatrix")
)
A matrix or sparseMatrix of class dgCMatrix to be imputed.
An R object containing impute weights as returned by getImputeWeights(ArchRProj)
. See addImputeWeights()
for more details.
The number of threads to be used for parallel computing.
A boolean value indicating whether to use verbose output during execution of this function. Can be set to FALSE for a cleaner output.
The path to a file to be used for logging ArchR output.
# Get Test ArchR Project
proj <- getTestProject()
# Add Impute Weights
proj <- addImputeWeights(proj)
# Get Impute Weights
iW <- getImputeWeights(proj)
# Get Matrix
se <- getMatrixFromProject(proj, useMatrix = "GeneScoreMatrix")
# Impute
mat <- imputeMatrix(assay(se), iW)