Question: Convert Bamtobed Score
1
gravatar for Stevelor
7.1 years ago by
Stevelor310
Stevelor310 wrote:

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 • 1.5k views
ADD COMMENTlink modified 7.0 years ago by Pascal1.4k • written 7.1 years ago by Stevelor310
3
gravatar for Pascal
7.1 years ago by
Pascal1.4k
Barcelona
Pascal1.4k wrote:

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 COMMENTlink written 7.1 years ago by Pascal1.4k

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 REPLYlink written 7.1 years ago by Stevelor310

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

ADD REPLYlink written 7.1 years ago by Pierre Lindenbaum119k

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

ADD REPLYlink written 7.1 years ago by Pascal1.4k
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: 1277 users visited in the last hour