fix_coordinates_with_allele: 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_with_allele(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
 5
 6
 7
 8
 9
10
fix_coordinates_with_allele(data.frame(coord=c("chr1:10000"), 
    allele=c("A/G")), "coord", "allele")
fix_coordinates_with_allele(data.frame(coord=c("chr1:10000"), 
    allele=c("ATGC/G")), "coord", "allele")
fix_coordinates_with_allele(data.frame(coord=c("chr1:10000"), 
    allele=c("sub(G->T)")), "coord", "allele")
fix_coordinates_with_allele(data.frame(coord=c("chr1:10000"), 
    allele=c("del(1)")), "coord", "allele")
fix_coordinates_with_allele(data.frame(coord=c("chr1:10000"), 
    allele=c("ins(ATG)")), "coord", "allele")

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