Process GWAS summary statistics and adds metadata, including: the index in the bigSNP object of each SNP, and the LD block locus.

process_gwas_sumstats(
  sumstats,
  chr = "chr",
  pos = "pos",
  beta = "beta",
  se = "se",
  a0 = "a0",
  a1 = "a1",
  snp = "snp",
  pval = "pval",
  remove_indels = TRUE,
  LD_Blocks = NULL,
  bigSNP = NULL,
  LD_snp_info = NULL,
  strand_flip = TRUE,
  remove_strand_ambig = TRUE,
  ...
)

Arguments

sumstats

A data frame of GWAS summary statistics.

chr

Name of the chromosome column in summary statistics.

pos

Name of the position column (base pair position).

beta

Name of beta column (if you have Odds Ratio, you will need to transform it to log(Odds Ratio)).

se

Name of the standard error (se) column.

a0

Column name of the reference allele.

a1

Column name of the association/effect allele.

snp

Name of the SNP ID (rsID) column.

pval

Name of the p-value column.

remove_indels

If TRUE, remove indels

LD_Blocks

A data frame of LD blocks with four columns, 'chr', 'start', 'end', and 'locus' (locus ID).

bigSNP

a bigsnpr object attached via bigsnpr::snp_attach() containing the reference genotype panel.

LD_snp_info

a data frame, SNP info in the LD reference, with columns 'chrom', 'id', 'pos', 'alt', 'ref', 'locus'.

strand_flip

Whether to flip signs when reverse complement matches? (default is TRUE).

remove_strand_ambig

Whether to remove ambiguous alleles (A/T and C/G)? (default is TRUE).

Value

A data frame of processed GWAS summary statistics.