As I anticipated, I can finally release this small script. Its purpose is to build BED files out of tab-delimited text files. I made this because I had several files to make and moving columns left and right (not to mention writing a heading line for the Genome Browser) was becoming annoying. Its use is fairly straightforward, as the help itself says:
usage: make_bed_file.py [options] [destination]
options: -h, --help show this help message and exit -i FILE, --input=FILE Use ranges from FILE -n NAME, --name=NAME Use NAME as BED track name -t TYPE, --tracks=TYPE Format other annotation tracks according to TYPE (default: pack) -v TYPE, --visibility=TYPE Set visibility of the BED track to TYPE (default: full) -d DISPLAY, --display=DISPLAY Select specific annotation tracks (comma-delimited list; default: all)
The input file format is rather simple as well:
|Chromosome||Identifier||Start Position||End position||Score|
The score column is optional. The file must be tab-delimited. If you want to change the format of the file, have a look at the ncbi class inside the source. The result is a BED file with chromosome, position, name and score.
Get the script and make it executable. If you have any problems, please report.
Luca Beltrame LINUX · SCIENCE