Hi,
I need to use bedtools to obtain the coverage across two bam files for comparison. However, to do this, I need a .bed file of the genome features (of the reference genome used to generate the bams). However, I only have genbank format, and whatever else I can get from NCBI etc. (not .bed). Is there a tool / script to convert the annotation in genbank to .bed? Don't want ot have to start writing a script when it must have been done already.
Thanks,
Theo
2 answers
First result of a google search, a python script to do just this: (biopython dependency)
I was trying to use this script: genbank.py
http://code.ohloh.net/file?fid=vNbzWnp6snEEfndwCm_GanCWcMg&cid={cid!?html}&dl
but it does not use the gene tags, just a set prefix - which is not much use. I started trying to edit the code, but instead of wasting time (though I may need to come back to it for large batches of files) I am now using Geneous import / export to do it.
Seems very strange to me this isn't needed more often!
Thanks anyway.
I've realised my mistake now. My Genbank files were not complete. This scripts works:
genbank.py gengenes
http://code.ohloh.net/file?fid=vNbzWnp6snEEfndwCm_GanCWcMg&cid={cid!?html}&dl
Log in to answer this question.