vcf2bed: convert a vcf to a bed file

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1
vcf2bed(x, filename = NULL, header = FALSE, other = NULL, verbose = TRUE)

Arguments

x

a vcf object

filename

the name of file if you want it exported

header

indicate if the bed file has header or not when exported

other

fields to include apart from chr, start, end.

verbose

more words

Value

A bed styled R object or an external file

Author(s)

Daryl Waggott

Examples

1
2
3
clinVar.vcf.example <- system.file("extdata/clinvar_dbSNP138_example.vcf.gz", package = "bedr")
x <- read.vcf(clinVar.vcf.example)
x.bed <- vcf2bed(x)

Example output

sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied


######################
#### bedr v1.0.3 ####
######################

checking binary availability...
  * Checking path for bedtools... FAIL
  * Checking path for bedops... FAIL
  * Checking path for tabix... FAIL
tests and examples will be skipped on R CMD check if binaries are missing

READING VCF
 * checking if file exists... PASS
 * Reading vcf header...
   Done
 * Reading vcf body...
   Done
 * Parse vcf header...
   Done
CONVERT VCF TO BED
There were 12 warnings (use warnings() to see them)

bedr documentation built on May 2, 2019, 11:36 a.m.

Related to vcf2bed in bedr...