Computing the rank based on "specificity_proportion"
Taking the mean of these two ranks.
Sorting the table by the new column "mean_rank" and selecting the top n_genes
The idea behind this is that the genes that are both heavily influencing GWAS gene scores and CTD specificity scores will contribute the most to cell-type-specific enrichment.
Previously, get_driver_genes was only selecting genes based on "ADJ_ZSTAT" after filtering by the top specificity decile, but this two-step process used arbitrary cutoffs and didn't quite capture the driver gene idea as well.
Determine driver genes by:
"ADJ_ZSTAT"
"specificity_proportion"
"mean_rank"
and selecting the topn_genes
The idea behind this is that the genes that are both heavily influencing GWAS gene scores and CTD specificity scores will contribute the most to cell-type-specific enrichment.
Previously,
get_driver_genes
was only selecting genes based on"ADJ_ZSTAT"
after filtering by the top specificity decile, but this two-step process used arbitrary cutoffs and didn't quite capture the driver gene idea as well.