Code in this directory can be run as follows:

## Co-expression enrichment analysis of NDD genes in six major cell types.

source("calculate_score.R")

source("plot_score.R")

source("plot_sample_size.R")

source("plot_P.R")

source("plot_P_1.R")

## Co-expression enrichment analysis of NDD genes in six major cell types at different co-expression thresholds.

source("calculate_score_threshold.R")

source("plot_score_threshold.R")

## Co-expression enrichment analysis of dnLoF-ASD genes in NPCs and dnMis-Epi genes in interneurons at varying co-expression thresholds.

source("calculate_score_ASD.R")

source("plot_score_ASD.R")

source("calculate_score_Epi.R")

source("plot_score_Epi.R")

## Co-expression enrichment analysis of dnLoF-ASD genes in NPCs and dnMis-Epi genes in interneurons using different measures of association.

source("calculate_score_NPC.R")

source("plot_score_NPC.R")

source("calculate_score_In.R")

source("plot_score_In.R")

## Co-expression enrichment analysis of GO biological process terms in NPCs calculated using Spearmans correlation and proportionality phi_s.

source("GO.R")

source("calculate_score_GO_NPCs_Spearman.R")

source("calculate_score_GO_NPCs_phi_s.R")

source("calculate_score_GO_NPCs.R")

source("plot_score_GO_NPCs.R")

## Co-expression enrichment analysis of NDD genes in six major cell types by controlling for gene set size.

source("calculate_score_gene.R")

source("plot_score_gene.R")

## Co-expression enrichment analysis of NDD genes in six major cell types by controlling for expression level dependence.

source("calculate_score_expression.R")

source("plot_score_expression.R")

## Co-expression enrichment analysis of ASD and DD gene sets with dnMis mutations in six major cell types by controlling for missense severity.

source("calculate_score_CADD.R")

source("plot_score_CADD.R")

## Co-expression enrichment analysis of NDD genes in six major cell types by downsampling.

source("calculate_score_downsample.R")

source("plot_score_downsample.R")

## Spearmans correlation analysis of NDD genes in six major cell types by downsampling.

source("calculate_cor.R")

source("calculate_cor_1.R")

source("plot_cor.R")

## Examples of dnLoF-ASD gene pairs that show higher co-expression in NPCs than in the other five major cell types.

source("plot_ASD_ADNP_CHD8.R")

source("plot_ASD_ARID1B_KMT2C.R")

source("plot_ASD_KDM6B_SUV420H1.R")

source("plot_ASD_KMT2A_KMT2C.R")

## Examples of dnMis-Epi gene pairs that show higher co-expression in interneurons than in the other five major cell types.

source("plot_Epi_FASN_RANGAP1.R")

source("plot_Epi_FASN_SCN2A.R")

source("plot_Epi_GABBR2_GABRB3.R")

source("plot_Epi_RANGAP1_SCN2A.R")
