Hi everyone,
I am very new to all of this so I apologise for any simple mistakes. Today I have been trying to merge 2 files at 500bp using Bedtools. I have both files in the format of:
chr1 812283 812293
chr1 812566 812576
chr1 811236 811246
As far as I'm aware each column is separated by tabs, and I have tried using test .bed files with only a few rows.
When using:
bedtools merge -i test1.bed test2.bed -d 500 < sorted.bed
or even just trying to access the bed files using a different command (bedtools merge -i test1.bed
), I am receiving 'Error: Unable to open the test1.bed. exiting.'
Does anyone know why this could be happening? Any help is greatly appreciated.
This cannot work as
bedtools merge
expect exact one bed file as input. You have three (test1.bed
,test2.bed
and as a stream fromsorted.bed
This message appears also if
bedtools
cannot find the files. So check if you are in the correct folder from where you startbedtools merge
. The correct syntax should be$ bedtools merge -i test1.bed -d 500
.fin swimmer
I didn't realise this, I will give it a go. Thank you!
Edit - Unfortunately still no joy, grateful for the help though
Most likely either there's a typo in the command (you mistyped the file name) or the user you're running bedtools with doesn't have read permission.
Hi, I've just checked and I believe the input to be correct and I am running as administrator. Do I need to store the .bed file anywhere specifically for it to work? Thank you for the feedback!
Either you specify the full path to the bed file, or you make sure it's in your current working directory.