Question: How to generate a bed file from X:21915521-21918496 list
0
gravatar for perropery
6 weeks ago by
perropery0
perropery0 wrote:

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 • 103 views
ADD COMMENTlink modified 6 weeks ago by brunobsouzaa180 • written 6 weeks ago by perropery0

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

ADD REPLYlink modified 6 weeks ago • written 6 weeks ago by ATpoint36k

use tr

ADD REPLYlink written 6 weeks ago by Pierre Lindenbaum129k

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

ADD REPLYlink written 6 weeks ago by ATpoint36k
0
gravatar for brunobsouzaa
6 weeks ago by
brunobsouzaa180
Brazil
brunobsouzaa180 wrote:

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

ADD COMMENTlink modified 6 weeks ago • written 6 weeks ago by brunobsouzaa180
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: 1371 users visited in the last hour