I have two bedgraph files(a_h.bedgraph and b_h.bedgraph) with header. And I am running the following command:
bedtools intersect -header -wa -a a_h.bedgraph -b b_h.bedgraph
However I am getting the following error:
Error: unable to open file or unable to determine types for file a_h.bedgraph Please ensure that your file is TAB delimited (e.g., cat -t FILE). - Also ensure that your file has integer chromosome coordinates in the expected columns (e.g., cols 2 and 3 for BED).
When I remove the header from a_h.bedgraph and b_h.bedgraph, it works. Is there any way to keep the header after the intersection?