Entering edit mode
3.2 years ago
kspata
▴
90
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:
- Sort bed file using bedtools intersect
- Convert sorted bed file to dataframe using read.table
- Change datatype for chr positions from factors to strings using lapply
- run is.valid.region() function, which shows the df to be valid
- 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