I've recently installed the bedtools software on my personal computer to run from Terminal. The functions all run fine but the output files are not in the format I am used to when I use to the tools on other computers at work. For example, when using the closestBed tool, I usually get a single row containing information for the 'peaks' from the two seperate files. However, now I am getting one row with the peak from the first file and the second row has the peak info from the second file instead of both being in the same row. The code I use: (although the code should not be an issue as I've used the same for ages and haven't had a problem so I think it may be in how I installed the program?)
closestBed -a file1.txt -b file2.xt -d > Outputfile.xls
Output in excel looks like:
chr1 5005563 5005564 peak2
chr1 5005000 5006600 E9
Has anyone experienced this problem before or knows how to solve the issue? Thanks in advance.
Perhaps you have some line endings issues? If you
cat -A file | head
on each, what do you see?Do you mean I should try adding "cat" before the name of the first file and "| head" after?
Yes, that's correct. That command will show the first few lines but will also show all of the "non-printing characters", like the different line endings.