This function generates various plots for a list of GRaNIE objects based on feature overlap data. It supports plotting unique and common features, and can handle different types of relationships such as TF-peak, TF-gene, etc.

plotCorrelationData(
  GRN.list,
  featureOverlap,
  type = "TF-peak",
  nMax = 50,
  outputFile_prefix = "upsetPlot_correlationPlots",
  plotUnique = TRUE,
  plotCommon = TRUE,
  plotAllOtherSubsets = FALSE,
  forceRerun = TRUE
)

Arguments

GRN.list

A list of GRaNIE objects. This list can either be manually defined by constructing a list that contains an arbitrary number of GRaNIE objects or the helper functions generateGRNList_custom or generateGRNList_Seurat can be used to automatically populate that list given a specific root directory in which GRaNIE objects are located.

featureOverlap

A data frame containing the feature overlap data with at least two columns.

type

A character string specifying the type of relationship to plot. Options are "TF-peak", "TF-gene", "TF-peak-gene", "peak-gene". Default is "TF-peak".

nMax

An integer specifying the maximum number of features to plot. Default is 50.

outputFile_prefix

A character string specifying the prefix for the output file names. Default is "upsetPlot_correlationPlots".

plotUnique

A logical value indicating whether to plot unique features for each GRN. Default is TRUE.

plotCommon

A logical value indicating whether to plot common features shared by all GRNs. Default is TRUE.

plotAllOtherSubsets

A logical value indicating whether to plot all other subsets of features. Default is FALSE.

forceRerun

A logical value indicating whether to force rerun the function and re-generate the output even if the output files already exist on disk or in the object. Default is FALSE.

Value

None. The function generates and saves plots to the specified output files.

Examples

if (FALSE) {
GRN.list <- list(GRN1, GRN2, GRN3)
featureOverlap <- data.frame(TF.ID = c("TF1", "TF2"), peak.ID = c("peak1", "peak2"), GRN1 = c(1, 0), GRN2 = c(1, 1), GRN3 = c(0, 1))
plotCorrelationData(GRN.list, featureOverlap)
}