harmonise: Generic harmonisation function

Description Usage Arguments Details Value

View source: R/harmonise.r

Description

Assumes ref and alt alleles available for target and reference datasets, and uses chr:pos for alignment

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
harmonise(
  chr1,
  pos1,
  ref1,
  alt1,
  chr2,
  pos2,
  ref2,
  alt2,
  rsid2 = NULL,
  indel_recode = FALSE,
  strand_flip = FALSE
)

Arguments

chr1

Vector

pos1

Vector

ref1

Vector

alt1

Vector

chr2

Vector

pos2

Vector

ref2

Vector

alt2

Vector

rsid2

Optional vector

indel_recode

=FALSE. If TRUE then attempts to recode D/I

strand_flip

=FALSE. If TRUE then attempts to flip strand when alignment is not otherwise possible

Details

0: stick 1: swap 2: rename indel 3: rename indel and swap 4: flip 5: flip and swap 6: drop (no match) 7: drop (no reference)

Value

Dataframe of outcomes


MRCIEU/gwasglue documentation built on Feb. 15, 2022, 3:25 p.m.