fix_coordinates: extract genomic coordinates for variants from a dataframe

Description Usage Arguments Value Examples

Description

Genomic coordinates can be encoded in a variety of ways, this function cleans up coordinates where one column

Usage

1
fix_coordinates(variants, coordinate_column, allele_column)

Arguments

variants

data frame of variants

coordinate_column

name of column containing chromosome information

allele_column

name of column containing allele information

Value

a data frame with chrom, start_pos, end_pos and allele columns.

Examples

1
2
3
4
fix_coordinates(data.frame(coord=c("chr1:10000:A"), 
    allele=c("chr1:10000:A:G")), "coord", "allele")
fix_coordinates(data.frame(coord=c("chr1:10000:A"), 
    allele=c("chr1:10003:ATGC:G")), "coord", "allele")

jeremymcrae/publishedDeNovos documentation built on May 19, 2019, 5:08 a.m.