Compute Single-Cell Level Scores (c_i)

get_cs(topic_res, ldsc_res_dir, trait, nTopics)

Arguments

topic_res

Results from run_fastTopics_res, with Pmat (J×K) and Lmat (I×K)

ldsc_res_dir

Directory containing k*_output/results/Trait.results

trait

Trait name used in LDSC results files.

nTopics

Number of topics (K).

Value

A list with

  • cs: cell scores (vector of length I)

  • z_cell: z-score accounting for variance

  • p_cell: p-value for assessing score reliability

  • ldsc_res_table: the raw tau_display table from S-LDSC

  • ash_res: results from running ASH on S-LDSC enrichment estimates

  • cs_dat: intermediate estimates for calculating cell score