g.align: A summary statistic allele aligner

View source: R/gr-wrenches.R

g.alignR Documentation

A summary statistic allele aligner

Description

This function will take a GWAS summary statistic dataset and will allign its alleles to a manifest or reference dataset.

Usage

g.align(ds, manifest)

Arguments

ds

a data.table containing the GWAS summary statistic dataset

manifest

a data.table containing the manifest, or reference

Details

GWAS summary statistics should have a minimum number of columns: CHR38, BP38, REF, ALT, BETA, SE, P, and optionally ALT_FREQ. Manifest should have at least CHR38, BP38, REF, ALT.

The function will compare both allele placement and check if they're already aligned, if they need to be flipped, find their complement or reverse complementary. Then it will do what's needed for each SNP, including reversing BETA and ALT_FREQ, if necessary.

Value

a data.table with matching REF and ALT to the reference


GRealesM/IMDtools documentation built on Oct. 3, 2023, 10:04 a.m.