The information is currently stored in GRN@connections$TF_genes.filtered. Note that raw p-values are not adjusted.

  corMethod = "pearson",
  addRobustRegression = FALSE,
  nCores = 1,
  forceRerun = FALSE



Object of class GRN


Character. pearson or spearman. Default pearson. Method for calculating the correlation coefficient. See cor for details.


TRUE or FALSE. EXPERIMENTAL. Default FALSE. Use a robust regression in addition to a non-robust one? Significantly increases overall running time. If set to TRUE, the package robust is required (as it is listed under Suggests, it may not be installed).


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.


An updated GRN object, with additional information added from this function.


# See the Workflow vignette on the GRaNIE website for examples
GRN = loadExampleObject()
#> Downloading GRaNIE example object from
#> 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 = add_TF_gene_correlation(GRN, forceRerun = FALSE)
#> INFO [2023-03-06 16:39:14] Data already exists in object. Set forceRerun = TRUE to regenerate and overwrite.
#> INFO [2023-03-06 16:39:14] Finished successfully. Execution time: 0 secs