Compute per-annotation standard deviation, MAF-restricted
Source:R/sldsc_wrapper.R
compute_sldsc_annot_sd.RdComputes the standard deviation of each annotation column in the target annotation files, restricted to SNPs above a MAF cutoff via PLINK `.frq` files. Required for internal consistency with polyfun's regression, which operates on MAF > cutoff SNPs by default.
Usage
compute_sldsc_annot_sd(
target_anno_dir,
frqfile_dir = NULL,
plink_name = "ADSP_chr",
maf_cutoff = 0.05,
annot_cols = NULL
)Arguments
- target_anno_dir
Character. Directory containing target annotation files (one per chromosome) in polyfun's `.annot.gz` format.
- frqfile_dir
Character or NULL. Directory containing PLINK `.frq` files for the reference panel. Required when `maf_cutoff > 0`; the function errors if missing.
- plink_name
Character. Filename prefix of the `.frq` files (e.g. `"ADSP_chr"`). Files are expected at `plink_namechr.frq`.
- maf_cutoff
Numeric, default `0.05`.
- annot_cols
Character or integer vector, default NULL. Annotation columns to compute sd for. If NULL, all annotation columns are used.