Question: bedtools merge with strandedness giving now output
1
gravatar for gatesss
3.9 years ago by
gatesss10
United States
gatesss10 wrote:

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    +

strandedness merge bedtools • 2.1k views
ADD COMMENTlink modified 3.9 years ago by PoGibas4.8k • written 3.9 years ago by gatesss10
3
gravatar for PoGibas
3.9 years ago by
PoGibas4.8k
Vilnius
PoGibas4.8k wrote:

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 COMMENTlink modified 3.9 years ago • written 3.9 years ago by PoGibas4.8k

awesome! thank you :)

ADD REPLYlink written 3.9 years ago by gatesss10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 834 users visited in the last hour