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
Take a look at the
gsub
function ofawk
. You are basically right, just change:
and-
to tab.use
tr
or
sed
or evenPerl
(ok notPerl
...)