format_gwas: Convert GWAS summary statistics into required format

View source: R/functions.R

format_gwasR Documentation

Convert GWAS summary statistics into required format

Description

Convert GWAS summary statistics into required format

Usage

format_gwas(
  gwas,
  chr = "CHR",
  snp = "SNP",
  effect_allele = "A1",
  other_allele = "A2",
  eaf = "eaf",
  beta = "beta",
  n_case = "N_case",
  n_control = "N_cont"
)

Arguments

gwas

GWAS summary statistics

chr

Column name for chromosome - a string

snp

Column name for rsid of SNP - a string

effect_allele

Column name for effect allele (i.e. the allele for the signed statistic beta) - a string

other_allele

Column name for the non-effect allele - a string

eaf

Column name for effect allele frequency - a string

beta

Column name for per-allele log odds ratio - a string

n_case

Column name for number of cases - a string

n_control

Column name for number of controls - a string

Value

a data frame with formatted GWAS summary statistics

Examples

df = format_gwas(gwas = gwas_sumstats,chr = "CHR",effect_allele = "A1",other_allele = "A2",snp = "SNP",eaf = "eaf",beta = "beta",n_case = "n_case",n_control = "n_control")
df = format_gwas(gwas = gwas_sumstats)

benjacobs123456/popPoweR documentation built on March 28, 2022, 4:32 a.m.