Hi everyone,
I have used bedtools bamtobed to extract information. My file looks like this:
chr10 1195932 1195977 NB551726:5:H2HT5BGXC:1:11101:11237:5492 41 +
chr10 1195932 1195977 NB551726:5:H2HT5BGXC:1:11101:22230:17587 41 +
I am loosing the strand information when I tried bedtools merge command to remove the repeated coordinates. chr10 1195932 1195979
What I would want is an output like this :
chr10 1195932 1195977 NB551726:5:H2HT5BGXC:1:11101:11237:5492 41 +
for all the duplicated regions in one chromosome.
Can someone help.
Regards
I can't guarantee that this will work in all cases, but maybe try
bedtools merge -i test.bed -c 4,5,6 -o distinct|perl -pe 's/,\S+//g'
. It assumes the file in your example is calledtest.bed
.