check_allele_flip {MungeSumstats}R Documentation

Ensure A1 & A2 are correctly named, if GWAS constructed as Risk/nonrisk alleles this will need to be converted

Description

Ensure A1 & A2 are correctly named, if GWAS constructed as Risk/nonrisk alleles this will need to be converted

Usage

check_allele_flip(sumstats_dt, path, ref_genome, rsids, allele_flip_check)

Arguments

sumstats_dt

data table obj of the summary statistics file for the GWAS

path

Filepath for the summary statistics file to be formatted

ref_genome

name of the reference genome used for the GWAS (GRCh37 or GRCh38)

rsids

datatable of snpsById, filtered to SNPs of interest if loaded already. Or else NULL

allele_flip_check

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

Value

A list containing two data tables:


[Package MungeSumstats version 1.0.1 Index]