bed2vcf (bedr) package error
0
0
Entering edit mode
2.6 years ago
kspata ▴ 80

Greetings,

I am running bedr package in R to generate vcf file from bed file using reference as one of the arguments.

I followed steps below:

  1. Sort bed file using bedtools intersect
  2. Convert sorted bed file to dataframe using read.table
  3. Change datatype for chr positions from factors to strings using lapply
  4. run is.valid.region() function, which shows the df to be valid
  5. Run bed2vcf

bed2vcf(x, filename = output.vcf, zero.based = TRUE, header = NULL, fasta = tomato_reference.fa)

When I run bed2vcf, I encounter error

 * Check index pattern... FAIL
   Use check.chr = FALSE if no 'chr' prefix
[1] "SL3.0ch00:4684416-4684417" "SL3.0ch00:5049055-5049056"
[3] "SL3.0ch00:5109097-5109098" "SL3.0ch00:5109104-5109105"
[5] "SL3.0ch00:5109123-5109124" "SL3.0ch00:5392105-5392106"

I can not use check.chr() with bed2vcf() as it is not a valid argument for bed2vcf function.

The is.valid.region shows no error for index pattern.

Can someone please guide me on how to resolve this issue.

Thanks, Kalyani

R vcf bedr bed • 658 views
ADD COMMENT

Login before adding your answer.

Traffic: 2095 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6