How to generate a bed file from X:21915521-21918496 list
1
0
Entering edit mode
3.9 years ago
perropery • 0

Hi. A software gaves tome a list of genome positions a of a TF binding site. But the format is not the best for forward analysis. Anyone knows hoy to generate a bed file from this type of list? Maybe transform the ":" to a tab space and the "-" to tab too. But I dont know how to do this kind of task. Regards

X:8306855-8315547 -1497 AGAGTC

X:8105257-8111070 2044 AGAGTG

X:8087170-8092400 -1284 AGAGTG

X:7860225-7870570 -4726 AGAGTC

X:7597311-7601864 1764 AGAGTC

X:7590303-7596941 1377 AGAGTG

X:7212492-7214714 -600 AGAGTC

X:7184199-7186520 -930 CACTCT

X:6898247-6901343 653 AGAGTG

ChIP-Seq sequence • 668 views
ADD COMMENT
0
Entering edit mode

Take a look at the gsub function of awk. You are basically right, just change : and - to tab.

ADD REPLY
0
Entering edit mode

use tr

ADD REPLY
0
Entering edit mode

or sed or even Perl (ok not Perl...)

ADD REPLY
0
Entering edit mode
3.9 years ago
brunobsouzaa ▴ 830

There's so many options for this task. I would use sed -e 's/:/\t/g' -e 's/-/\t/g'

ADD COMMENT

Login before adding your answer.

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