Learn R Programming

bedr (version 1.0.2)

vcf2bed: convert a vcf to a bed file

Description

Convert a vcf to a bed file. Currently, it needs to read into R via read.vcf

Usage

vcf2bed(x, filename = NULL, other = NULL, verbose = TRUE)

Arguments

x
a vcf object
filename
the name of file if you want it exported
other
fields to include apart from chr, start, end.
verbose
more words

Value

A bed styled R object or an external file

Examples

Run this code
clinVar.vcf.example <- system.file("extdata/clinvar_dbSNP138_example.vcf.gz", package = "bedr")
x <- read.vcf(clinVar.vcf.example)
x.bed <- vcf2bed(x)

Run the code above in your browser using DataLab