This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bed2vcf (bedr) package error

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

0 answers

No answers yet.

Log in to answer this question.