computeLabelEdges: Compute Label Edges

View source: R/DataParsingFunctions.R

computeLabelEdgesR Documentation

Compute Label Edges

Description

computeLabelEdges generates a matrix of edges from each label to each cell. Edges are scaled by the passed weights and filters. Each filter can either apply just to specific peaks or to whole genes (filterGene, TRUE by default) and can be permissive or filtering out (filterOut, FALSE by default). Regions mapping peaks to genes must be provided to use filters. If filters are applied to specific peaks, peaks for the ATAC data must also be provided.

Usage

computeLabelEdges(
  labelGenes,
  ATACMat,
  ATACGenePeak,
  method = "Expression",
  filters,
  filterWeights,
  filterOut,
  filterGene,
  regions,
  peaks,
  whichMat = "bmat"
)

Arguments

labelGenes

data.frame with genes of interest in first column and corresponding labels in second column, optionally log-fold change in expression values in the third

ATACMat

either a cell-by-peak matrix, a SnapATAC object, or an ArchR project

ATACGenePeak

per label mapping of peaks to genes returned by mapPeaksToGenes()

method

scaling method, either "Expression","Correlation", or "None"

filters

list of GRanges lists for locations that pass filters

filterWeights

numeric vector of weights assigned to each filter

filterOut

boolean for each filter of whether those regions are permitted or filtered out

filterGene

boolean for each filter of whether it applies to genes as a whole or just overlapping peaks (note that weights do not apply to peaks)

regions

regions map peaks to genes

peaks

GRanges of peaks in ATACMat

whichMat

string determing whether to use "bmat" or "gmat" from snap object or "TileMatrix" or "GeneScoreMatrix" from ArchR project

Value

matrix of weights from each label to each cell

Examples

data("SampleCellWalkRData")
computeLabelEdges(SampleCellWalkRData$labelGenes,
                  SampleCellWalkRData$ATACMat,
                  SampleCellWalkRData$ATACGenePeak)


PFPrzytycki/CellWalkR documentation built on Oct. 26, 2023, 1:50 p.m.