If the source was set to JASPAR in addTFBS, the argument nCores is ignored.

overlapPeaksAndTFBS(GRN, nCores = 2, forceRerun = FALSE, ...)



Object of class GRN


Integer >0. Default 1. Number of cores to use. A value >1 requires the BiocParallel package (as it is listed under Suggests, it may not be installed yet).


TRUE or FALSE. Default FALSE. Force execution, even if the GRN object already contains the result. Overwrites the old results.


No default. Only relevant if source = "JASPAR" has been selected in addTFBS, ignored otherwise. Additional arguments for motifmatchr::matchMotifs such as custom background nucleotide frequencies or p-value cutoffs. For more information, type ?motifmatchr::matchMotifs


An updated GRN object, with added data from this function (GRN@data$TFs$TF_peak_overlap in particular)


# See the Workflow vignette on the GRaNIE website for examples
GRN = loadExampleObject()
#> Downloading GRaNIE example object from https://git.embl.de/grp-zaugg/GRaNIE/-/raw/master/data/GRN.rds
#> INFO [2023-12-10 14:47:40] Storing GRN@data$RNA$counts matrix as sparse matrix because fraction of 0s is > 0.1 (0.44)
#> Finished successfully. You may explore the example object. Start by typing the object name to the console to see a summaty. Happy GRaNIE'ing!
GRN = overlapPeaksAndTFBS(GRN, nCores = 2, forceRerun = FALSE)
#> INFO [2023-12-10 14:47:40] Data already exists in object or the specified file already exists. Set forceRerun = TRUE to regenerate and overwrite.
#> INFO [2023-12-10 14:47:40] Finished successfully. Execution time: 0 secs