This function will correlate 2 matrices within an ArchRProject by name matching.

correlateMatrices(
  ArchRProj = NULL,
  useMatrix1 = NULL,
  useMatrix2 = NULL,
  useSeqnames1 = NULL,
  useSeqnames2 = NULL,
  removeFromName1 = c("underscore", "dash"),
  removeFromName2 = c("underscore", "dash"),
  log2Norm1 = TRUE,
  log2Norm2 = TRUE,
  reducedDims = "IterativeLSI",
  dimsToUse = 1:30,
  scaleDims = NULL,
  corCutOff = 0.75,
  k = 100,
  knnIteration = 500,
  overlapCutoff = 0.8,
  seed = 1,
  threads = getArchRThreads(),
  verbose = TRUE,
  logFile = createLogFile("correlateMatrices")
)

Arguments

ArchRProj

An ArchRProject object.

useMatrix1

A character describing the first matrix to use. See getAvailableMatrices for valid options.

useMatrix2

A character describing the second matrix to use. See getAvailableMatrices for valid options.

useSeqnames1

A character vector describing which seqnames to use in matrix 1.

useSeqnames2

A character vector describing which seqnames to use in matrix 2.

removeFromName1

A character vector describing how to filter names in matrix 1. Options include "underscore", "dash", "numeric" and "dot". The string portion prior to these will be kept.

removeFromName2

A character vector describing how to filter names in matrix 2. Options include "underscore", "dash", "numeric" and "dot". The string portion prior to these will be kept.

log2Norm1

A boolean describing whether to log2 normalize matrix 1.

log2Norm2

A boolean describing whether to log2 normalize matrix 2.

reducedDims

The name of the reducedDims object (i.e. "IterativeLSI") to use from the designated ArchRProject.

dimsToUse

A vector containing the dimensions from the reducedDims object to use in computing the embedding.

scaleDims

A boolean value that indicates whether to z-score the reduced dimensions for each cell. This is useful for minimizing the contribution of strong biases (dominating early PCs) and lowly abundant populations. However, this may lead to stronger sample-specific biases since it is over-weighting latent PCs. If set to NULL this will scale the dimensions based on the value of scaleDims when the reducedDims were originally created during dimensionality reduction. This idea was introduced by Timothy Stuart.

corCutOff

A numeric cutoff for the correlation of each dimension to the sequencing depth. If the dimension has a correlation to sequencing depth that is greater than the corCutOff, it will be excluded from analysis.

k

The number of k-nearest neighbors to use for creating single-cell groups for correlation analyses.

knnIteration

The number of k-nearest neighbor groupings to test for passing the supplied overlapCutoff.

overlapCutoff

The maximum allowable overlap between the current group and all previous groups to permit the current group be added to the group list during k-nearest neighbor calculations.

seed

A number to be used as the seed for random number generation required in knn determination. It is recommended to keep track of the seed used so that you can reproduce results downstream.

threads

The number of threads to be used for parallel computing.

verbose

A boolean value that determines whether standard output should be printed.

logFile

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