Dear all,
I'm trying to convert the CNV calls which generated by ExomeDepth package to VCF format. I've been searching for different ways and one solution using bedr package but was resulted to this error message:
The CNV file format from ExomeDepth package:
CNV.calls
start.p end.p type nexons start end chromosome id BF reads.expected
1 1 1 deletion 1 69091 70008 1 chr1:69091-70008 39.80 228
2 350 351 duplication 2 1569569 1570001 1 chr1:1569569-1570001 7.30 161
reads.observed reads.ratio
1 2 0.00877
2 259 1.61000
bedfile<- CNV.calls[,c("chromosome", "start", "end")]
bedfile$chromosome<- sub("^", "chr", bedfile$chromosome)
library (bedr)
bed2vcf(bedfile, zero.based = FALSE, fasta = NULL, header = NULL)
ERROR: Looks like bedtools had a problem
Error in bedr(engine = "bedtools", input = list(bed = x), method = "getfasta", :
In addition: Warning message:
In fread(paste(outputDir, "/", outputFile, sep = ""), header = FALSE) :
File '//tmp/RtmpgLGDR3/get.fasta5d33a3b640afc.bed' has size 0. Returning a NULL data.table.
Any thoughts on that or does anyone have a another solution for converting the CNV file or bed file to vcf file?
Thank you in advance for your help,
Ati
Thank you so much. It worked and also I should have added "chr" to my fasta file!
Dear Kevin, Are you aware of any other tool/script to get the more comprehensive vcf file from CNV file?