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")
)

Arguments

mat

A matrix or sparseMatrix of class dgCMatrix to be imputed.

imputeWeights

An R object containing impute weights as returned by getImputeWeights(ArchRProj). See addImputeWeights() for more details.

threads

The number of threads to be used for parallel computing.

verbose

A boolean value indicating whether to use verbose output during execution of this function. Can be set to FALSE for a cleaner output.

logFile

The path to a file to be used for logging ArchR output.

Examples


# 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)