Hi everyone!
I'm new here, so I hope I'm posting properly.
I'm using bedtools in order to know where some different epigenetic marks are present across a mouse genome split into different regions.
To do so, I used makewindows
function to split the genome into 10k chunks:
bedtools makewindows -g mm9.genome -w 10000 > mm9.windows.bed
Then, I tried the intersect function like this:
bedtools intersect -a mm9.windows.bed -b H3K4m1.bed H3K4m2.broadPeak -loj -names H3K4m1 H3K4m2
but I got nothing!
There's a H3K4m1 mark with this information:
chr1 4352396 4353107 . 0 . 6.73 -1 -1
Which I guess it should have an intersection here in the genome (mm9.windows.bed
):
chr1 4350000 4360000
However, I get no output!
I don't know if this is relevant, but the files I use have the following formats:
mm9.windows.bed
--> BED3H3K4m1.bed
--> BED6H3K4m2.broadPeak
--> broadPeak (BED9)
I would really appreciate some help because this is really getting me crazy!
All the best,
Verónica
It could be a problem with your bed files. bedtools is very sensitive to carriage return characters. If you did something in i.e. excel with those files and then saved them, you likely have some unwanted characters that make the bed file illegible for bedtools.
Try from your shell/terminal to do
If you get something like
then you are ok and we need to look into something else. If you get a single line of overlapping data then do
and use
mySecondBedFile.bed
with bedtools...that did the trick for me a number of times