flip.data.frame: Check and flip the alleles of a data frame

View source: R/flip.data.frame.R

flip.data.frameR Documentation

Check and flip the alleles of a data frame

Description

Lower level function which takes an input data-frame with alleles from two separate genotypes and then compares the alleles and flips them if necessary.

Usage

flip.data.frame(df)

Arguments

df

data frame. With 5 columns in order: rsID, a1, a0 (genotype to be checked), a1, a0 (genotype to be checked against)

Details

flip.data.frame is called within other major functions and is required for aligning the direction of effects between two different datasets for performing a regression between them. The function (and the other functions it calls) operates in two ways: first checking whether alleles a1/a0 in one dataset match a1/a0 in the other. And then it switches the strand of the alleles being checked to make sure that these do not mismatch with those on the other side either.


Sabor117/PathWAS documentation built on Nov. 29, 2024, 7:44 a.m.