check_ldsc_format {MungeSumstats}R Documentation

Ensures that parameters are compatible with LDSC format

Description

Format summary statistics for direct input to Linkage Disequilibrium SCore (LDSC) regression without the need to use their munge_sumstats.py script first.

Usage

check_ldsc_format(
  sumstats_dt,
  ldsc_format,
  convert_n_int,
  allele_flip_check,
  compute_z,
  compute_n
)

Arguments

sumstats_dt

data table obj of the summary statistics file for the GWAS.

ldsc_format

Binary Ensure that output format meets all requirements to be fed directly into LDSC without the need for additional munging. Default is FALSE

convert_n_int

Binary, if N (the number of samples) is not an integer, should this be rounded? Default is TRUE.

allele_flip_check

Binary Should the allele columns be checked against reference genome to infer if flipping is necessary. Default is TRUE.

compute_z

Whether to compute Z-score column from P. Default is FALSE. Note that imputing the Z-score for every SNP will not correct be perfectly correct and may result in a loss of power. This should only be done as a last resort.

compute_n

Whether to impute N. Default of 0 won't impute, any other integer will be imputed as the N (sample size) for every SNP in the dataset. Note that imputing the sample size for every SNP is not correct and should only be done as a last resort. N can also be inputted with "ldsc", "sum", "giant" or "metal" by passing one of these for this field or a vector of multiple. Sum and an integer value creates an N column in the output whereas giant, metal or ldsc create an Neff or effective sample size. If multiples are passed, the formula used to derive it will be indicated.

Details

LDSC documentation.

Value

Formatted summary statistics

Source

LDSC GitHub


[Package MungeSumstats version 1.2.4 Index]