cellink.tl.external.get_plink_commands_per_cell#
- cellink.tl.external.get_plink_commands_per_cell(adata, gwas_file, plink_bfile, prs_dir, ld_bfile=None, p_thresholds=None, r2_thresholds=None, clump_kb=250, maf=0.01, plink_cmd='plink', plink_threads=4)#
Generate the PLINK shell commands for all cells without running them.
Pre-generates per-cell filtered GWAS files in
prs_dir(requires the AnnData object), then returns one self-contained shell command per cell. Use this to submit per-cell PLINK jobs as a cluster array job instead of running them in-process. For SLURM submission seewrite_slurm_array_job().- Parameters:
adata (AnnData) – Reference scATAC-seq AnnData with peak coordinates in
adata.var.gwas_file (str or Path) – Post-QC GWAS summary statistics.
plink_bfile (str or Path) – PLINK binary prefix for scoring.
prs_dir (str or Path) – Directory where per-cell GWAS files and score files will be written.
ld_bfile (str or Path, optional) – PLINK binary prefix for LD estimation. Defaults to
plink_bfile.p_thresholds (list of float, optional) – C+T p-value thresholds.
r2_thresholds (list of float, optional) – C+T LD r² thresholds.
clump_kb (int, default=250) – Clumping window in kb.
maf (float, default=0.01) – MAF filter for scoring.
plink_cmd (str, default="plink") – PLINK executable name.
plink_threads (int, default=4) –
--threadsvalue passed to every PLINK call. Match this to the CPUs-per-task value when submitting to a cluster.
- Return type:
- Returns:
list of str One shell command string per cell (cells with no peak-overlapping GWAS variants are skipped).