Obtain the average correlation (across celltypes) at a specified cutoff p-value

plot_mean_correlation(
  main_dataset,
  SCEs,
  sampleIDs,
  celltypeIDs,
  celltype_correspondence,
  dataset_names,
  N_randperms = 5,
  N_subsets = 5,
  pvals = c(0.05, 0.025, 0.01, 0.001, 1e-04),
  sex_DEGs = FALSE,
  output_path = getwd()
)

Arguments

main_dataset

name of the dataset used to select significant DEGs from, and for which random permutations and subset pairs will be created (to be specified as a string, name as in dataset_names)

SCEs

list of the input data (elements should be SCE objects)

sampleIDs

list or vector of sample IDs (in order of SCEs)

celltypeIDs

list or vector of cell type IDs (in order of SCEs)

celltype_correspondence

list of different names specifying each cell type

dataset_names

names of the datasets as they appear in the correlation plot (in order of SCEs)

N_randperms

number of random permutations of the dataset to be created

N_subsets

number of pairs of random subsets of the dataset to be created

pvals

the cut-off p-value which will be used to select DEGs

sex_DEGs

If TRUE, only keep genes present on sex chromosmomes. Queries hspanies gene Ensembl dataset.

output_path

base path in which outputs will be stored Saves mean correlation matrix (and actual values) in the appropriate directory