ieutab_to_cravat: format the variant location, content and identity information...

View source: R/broker.R

ieutab_to_cravatR Documentation

format the variant location, content and identity information from MRC IEU API tables for OpenCRAVAT

Description

format the variant location, content and identity information from MRC IEU API tables for OpenCRAVAT

Usage

ieutab_to_cravat(ieutab, chain = NULL, genome = NULL)

Arguments

ieutab

a data.frame-like entity with chr, position, ea (to be regarded

chain

a liftOver chain structure as defined in rtracklayer

genome

character(1) label, if present, attached to output as a column build as ALT allele and nea to be regarded as REF allele

Note

If a liftOver chain is provided, some input records may be lost. We attempt to keep allele content information with each locus.

Examples

# Here we assume it is desired to give hg38 variant positions to cravat
if (requireNamespace("ieugwasr")) {
  pw = try(ieugwasr::phewas("17:37000000-37020000"))
  if (!inherits(pw, "try-error")) {
    octab = ieutab_to_cravat(pw, chain=gwaslake::ch19to38, genome="hg38" )
    print(head(octab))
    }
  aa = try(ieugwasr::associations("rs6060535", id="ukb-b-10787"))
  if (!inherits(aa, "try-error")) {
    octab2 = ieutab_to_cravat(aa, chain=gwaslake::ch19to38, genome="hg38")
    head(octab2)
    }
}

vjcitn/gwaslake documentation built on Aug. 9, 2022, 5:45 p.m.