Constructs the shell commands for running S-LDSC pipeline steps. All paths are properly quoted with shQuote() for shell safety.

build_sldsc_command(step, ...)

Arguments

step

Character: one of "munge", "annot", "l2", "h2".

...

Named arguments specific to each step (see Details).

Value

A character string containing the shell command.

Details

For step = "munge": requires polyfun_path, sumstats_gz, n, munged_out. For step = "annot": requires ldsc_path, user_bed, bim_file, out_annot. For step = "l2": requires polyfun_path, bfile_chr, hm3_snps, out_annot, out_prefix. For step = "h2": requires polyfun_path, munged_out, ref_ld, frqfile, w_ld, final_out, use_chr (logical).