cellink.tl.external.run_sclinker_heritability#
- cellink.tl.external.run_sclinker_heritability(ld_prefixes, sumstats_files, ref_ld_chr, w_ld_chr, out_dir, *, annotation_prefixes=None, frqfile_chr=None, runner=None)#
Run S-LDSC
--h2 --overlap-annotfor every (program, strategy, trait).Important: sc-linker uses
--h2(standard partitioned heritability), not--h2-cts. The--ref-ld-chrisbaseline,{program_ldscore}and--overlap-annotis always used.--overlap-annotrequires that.annot.gzfiles exist at the same prefix as the LD score files. Cellink writes them to a separateannotations/directory, so this function symlinks them into the LD score directory automatically viaannotation_prefixes.- Parameters:
ld_prefixes (
dict[str,dict[str,str]]) – Output ofcompute_ld_scores_for_sclinker:{program: {strategy: ld_score_prefix}}.sumstats_files (
list[str]) – List of munged.sumstats.gzfiles (use absolute paths so the path survives Singularity bind-mount remapping).ref_ld_chr (
str) – Baseline-LD prefix (e.g. fromget_1000genomes_ld_scores()).w_ld_chr (
str) – Regression weights prefix.out_dir (
str|Path) – Directory to write.logoutput files.annotation_prefixes (
dict[str,dict[str,str]] |None(default:None)) – Output ofgenescores_to_annotations:{program: {strategy: annot_prefix}}. Pass this so LDSC can find the.annot.gzfiles for--overlap-annot. If None, the function infers the location by replacingldscoreswithannotationsinld_prefix.frqfile_chr (
str|None(default:None)) – Allele frequency file prefix (required with--overlap-annot).runner (default:
None) –LDSCRunnerinstance. If None, uses the global runner.
- Return type:
- Returns:
dict
{program: {strategy: {trait: log_path}}}.