Convert Bamtobed Score
1
1
Entering edit mode
12.7 years ago
Stevelor ▴ 310

Hey,

just a short question....is there a possibility to set the score in the bed file to "1" an not to the the alignment score?? arguments -tag and -ed only use BAM alignment tags... ?!? :/

Cheers!

bedtools scoring • 2.7k views
ADD COMMENT
3
Entering edit mode
12.7 years ago
Pascal ★ 1.5k

I suggest you use awk after bamToBed. If the score you want to replace is in column 4 you could use:

cat your_file.bed | awk '{ print $1"\t"$2"\t"$3"\t1\t"$5"\t"$6}'
ADD COMMENT
0
Entering edit mode

I was looking for a one-step-solution within this tool....so this is what i would do if bamToBed really can't use a defined value as score :/ Thanks!

ADD REPLY
0
Entering edit mode

or: awk '($4="1")'

ADD REPLY
0
Entering edit mode

Whatch out Pierre: this trick doesn't output with tab-separated columns...

ADD REPLY

Login before adding your answer.

Traffic: 2615 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