R/gwas.R
process_gwas_sumstats.Rd
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,
...
)
A data frame of GWAS summary statistics.
Name of the chromosome column in summary statistics.
Name of the position column (base pair position).
Name of beta column (if you have Odds Ratio, you will need to transform it to log(Odds Ratio)).
Name of the standard error (se) column.
Column name of the reference allele.
Column name of the association/effect allele.
Name of the SNP ID (rsID) column.
Name of the p-value column.
If TRUE, remove indels
A data frame of LD blocks with four columns, 'chr', 'start', 'end', and 'locus' (locus ID).
a bigsnpr
object attached via bigsnpr::snp_attach()
containing the reference genotype panel.
a data frame, SNP info in the LD reference, with columns 'chrom', 'id', 'pos', 'alt', 'ref', 'locus'.
Whether to flip signs when reverse complement matches? (default is TRUE).
Whether to remove ambiguous alleles (A/T and C/G)? (default is TRUE).
A data frame of processed GWAS summary statistics.