bedtools merge with strandedness giving now output
1
1
Entering edit mode
8.8 years ago
gatesss ▴ 10

Hello, I have a bed file and need to merge with strand specificity, but I am not getting an output. My command is:

bedtools merge -i input.bed -s > merged.bed

My bed file looks like :

chr1    65702     65714     +
chr1    71879     71891     -
chr1    97442     97454     -
chr1    97552     97564     -
chr1    125938    125950    +
chr1    134489    134501    -
chr1    165663    165675    -
chr1    173419    173431    +
chr1    176257    176269    +
chr1    176263    176275    +
bedtools • 4.4k views
ADD COMMENT
5
Entering edit mode
8.8 years ago
PoGibas 5.1k

Try this:

awk '{OFS="\t"; print $1,$2,$3,".",".",$4}' INPUT.bed | bedtools merge -i - -s

Bed format contains strand information in column 6.

ADD COMMENT
0
Entering edit mode

Awesome! Thank you :)

ADD REPLY

Login before adding your answer.

Traffic: 3031 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6