This function gets a given data matrix from an ArchRProject and returns it as a SummarizedExperiment. This function will return the matrix you ask it for, without altering that matrix unless you tell it to. For example, if you added your PeakMatrix using addPeakMatrix() with binarize = TRUE, then getMatrixFromProject() will return a binarized PeakMatrix. Alternatively, you could set binarize = TRUE in the parameters passed to getMatrixFromProject() and the PeakMatrix will be binarized as you pull it out. No other normalization is applied to the matrix by this function.

getMatrixFromProject(
  ArchRProj = NULL,
  useMatrix = "GeneScoreMatrix",
  useSeqnames = NULL,
  excludeChr = NULL,
  verbose = TRUE,
  binarize = FALSE,
  threads = getArchRThreads(),
  logFile = createLogFile("getMatrixFromProject")
)

Arguments

ArchRProj

An ArchRProject object to get data matrix from.

useMatrix

The name of the data matrix to retrieve from the given ArrowFile. Options include "TileMatrix", "GeneScoreMatrix", etc.

useSeqnames

A character vector of chromosome names to be used to subset the data matrix being obtained.

excludeChr

A character vector containing the seqnames of the chromosomes that should be excluded from this analysis.

verbose

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

binarize

A boolean value indicating whether the matrix should be binarized before return. This is often desired when working with insertion counts. Note that if the matrix has already been binarized previously, this should be set to TRUE.

logFile

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

Examples


#Get Test Project
proj <- getTestProject()

# Get Fragments
se <- getMatrixFromProject(proj)