Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

switch_strand

Convert alleles to the opposing DNA strand


Description

This function is a subroutine of QC_GWAS and match_alleles. It converts allele-pairs to the configuration on the opposing DNA strand.

Usage

switch_strand(input, strand_col = FALSE)

Arguments

input

table with the alleles in column 1 and 2, and (optionally) the strand-information (coded as "+" or "-") in column 3. Note: the alleles must be uppercase characters.

strand_col

logical; if strand-information is present, this switches the sign in column 3 as well.

Value

A table with two or three columns, depending on strand_col.

See Also

Examples

data("gwa_sample")

  switched_data <- gwa_sample[ , c("MARKER", "EFFECT_ALL",
                                   "OTHER_ALL", "STRAND")]
  switched_data[1:10, ]

  switched_data[ , 2:4] <- switch_strand(input =
            switched_data[ , 2:4], strand_col = TRUE)
  switched_data[1:10, ]

QCGWAS

Quality Control of Genome Wide Association Study results

v1.0-8
GPL (>= 3)
Authors
Peter J. van der Most and Ilja M. Nolte
Initial release
2014-02-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.