Collate 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(
  inpath,
  range_downsampled,
  celltype_names,
  datasets2,
  celltype_names2,
  Nperms = 20,
  pvalue = 0.05
)

Arguments

inpath

path storing the down-sampled DGE analysis for each single-cell dataset, generated for bulk analysis

range_downsampled

vector or list containing values which the data will be downsampled at, in ascending order

celltype_names

list of the names specifying cell types in each DGE analysis output (in order they appear in the directory)

datasets2

list of datasets to be used, with celltype names (in DGE analysis outputs) as celltype_names2

celltype_names2

alt. list of the names specifying cell types in each DGE analysis output (in order they appear in the directory), if all are not the same as celltype

Nperms

number of permutations of DGE analysis outputs for each sample

pvalue

the cut-off p-value used to select DEGs Saves combined list of DEGs (across all cell types) in a subdirectory inside the dataset directory