R/gather_celltype_DEGs.r
    gather_celltype_DEGs.RdCollate DEGs detected in DGE analysis outputs, across all celltypes in a dataset (datasets/DGE analysis outputs should have common celltypes as specified below)
gather_celltype_DEGs(
  celltype_correspondence,
  pvalue = 0.05,
  Nperms = 20,
  sampled = "individuals",
  output_path = getwd()
)A named vector that maps a standard cell type label (e.g., "Endo", "Micro") to how that cell type appears in each dataset. Use NA if the cell type is not present in a given dataset.
P-value threshold for defining DEGs in the bulk dataset.
Number of permutations to perform for each down-sampling level. Default is 20.
Specifies the unit of down-sampling. Can be either "individuals" or "cells", depending on whether the analysis downsamples across samples or cells.
Saves combined list of DEGs (across all cell types) in a subdirectory inside the dataset directory
A clean directory path where down-sampled outputs and plots will be saved (should contain no subdirectories).