Either this or generateGRNList_Seurat can be used to automatically populate a list with GRaNIE objects for further analysis using the functions from this package that have the GRN.list argument.

generateGRNList_custom(
  rootDirs,
  prefix = "output_pseudobulk_clusterRes",
  suffix = "_mean_RNA_none_ATAC_none",
  compression = c("qs", "rds"),
  slotsToDelete = c("annotation", "visualization", "graph", "stats"),
  shortenNames = TRUE,
  sort = NULL
)

Arguments

rootDirs

A character vector of root directories to search for GRN output folders.

prefix

A character string specifying the prefix to filter directories. Default is "output_pseudobulk_clusterRes".

suffix

A character string specifying the suffix to filter directories. Default is "_mean_RNA_none_ATAC_none".

compression

A character vector specifying the compression format of the GRN files. Options are "qs" or "rds". Default is c("qs", "rds").

slotsToDelete

A character vector specifying the slots to delete from the GRN objects. Default is c("annotation", "visualization", "graph", "stats").

shortenNames

A logical value indicating whether to shorten the names of the GRN objects by removing the prefix and suffix. Default is TRUE.

sort

A character string specifying the sorting method for the GRN list. Currently supports "numeric". Default is NULL.

Value

A list of GRaNIE objects with specified slots deleted and optionally sorted and renamed.

Details

This function identifies GRaNIE objects from the specified directories and adds them to a list. It filters directories based on given prefix and suffix, reads the GRN objects, and optionally deletes specified slots.

Examples

if (FALSE) {
rootDirs <- c("/path/to/dir1", "/path/to/dir2")
grn_list <- generateGRN_custom(rootDirs)
}