cellink.tl.external.compute_ld_scores_for_sclinker#
- cellink.tl.external.compute_ld_scores_for_sclinker(annotation_prefixes, bim_prefix, ld_scores_dir, *, hapmap3_snps_prefix=None, hapmap3_snps_file=None, chromosomes=None, n_jobs=4, runner=None)#
Compute LD scores for all sc-linker annotations.
Calls the existing cellink
compute_ld_scores_with_annotations_from_bimfilefor each (program, strategy, chromosome) combination.Chromosome jobs are dispatched in parallel using a thread pool, each job is an independent Singularity/subprocess call so threads work well.
- Parameters:
annotation_prefixes (
dict[str,dict[str,str]]) – Output ofgenescores_to_annotations.bim_prefix (
str) – Prefix for per-chromosome BIM/PLINK files.ld_scores_dir (
str|Path) – Directory to write LD score files.hapmap3_snps_file (
str|Path|None(default:None)) – Path to a single HapMap3 SNP list file (e.g.hm3_no_MHC.list.txtfromget_1000genomes_hapmap3()). Used as--print-snpsfor every chromosome. Takes precedence overhapmap3_snps_prefix.hapmap3_snps_prefix (
str|None(default:None)) – Prefix for per-chromosome HapMap3 SNP files (e.g."refs/hm."). Usehapmap3_snps_fileinstead when you have a single combined file.chromosomes (
list[int] |None(default:None)) – Chromosomes to process. For a quick tutorial run use[21, 22].n_jobs (
int(default:4)) – Number of chromosomes to process in parallel. Each job is one Singularity subprocess call;n_jobs=4is a safe default on an HPC node. Set to 1 to disable parallelism.runner (default:
None) – cellink LDSCRunner. If None, uses global runner.
- Return type:
- Returns:
dict
{program: {strategy: ld_score_prefix}}where ld_score_prefix ends in.(chromosome appended by LDSC).