Skip to contents

This function calculates aggregated log-PSSM energies (as derived by the misha package's create_pssm_energy module) for a set of peaks (default - all peaks in the dataset) and for a set of motifs (default - all available)

Usage

generate_motif_pssm_matrix(
  atac = NULL,
  peak_width = 200,
  pssm_path = NULL,
  datasets_of_interest = NULL,
  motif_tracks = NULL,
  motif_regex = NULL,
  parallel = getOption("mcatac.parallel"),
  nc = getOption("mcatac.parallel.nc")
)

Arguments

atac
  • an ScPeaks/McPeaks or PeakIntervals object

peak_width

(optional) - size of region around peak centers to extract motif energies for

pssm_path

(optional) - path to directory containing misha-formatted pssm files (e.g. motifs.key and motifs.data)

datasets_of_interest

(optional) - names of pssm datasets (name.key-name.data file combinations) to calculate PSSM values for

motif_tracks

(optional) - misha track names for which to extract motif PSSMs

motif_regex

(optional) - a vector of regular expressions for which to match motif track names and extract motif PSSMs

parallel

(optional) - whether to use parallel computations

nc

(optional) - number of cores to use for parallel computations

Value

a matrix of peaks (rows) vs. aggregated motif energies (columns)

Examples

if (FALSE) {
peak_motif_mat <- generate_motif_pssm_matrix(
    peak_set = head(atac_sc@peaks),
    motif_regex = c("Bcl", "Atf"),
    datasets_of_interest = c("homer", "jaspar", "jolma"),
    parallel = F
)
}