Genbank to bed conversion for bedtools analysis
2
0
Entering edit mode
9.7 years ago
susan.klein ▴ 80

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

bedtools coverage conversion genbank • 6.5k views
ADD COMMENT
0
Entering edit mode
9.7 years ago
Cytosine ▴ 460

First result of a google search, a python script to do just this: (biopython dependency)

https://gist.github.com/brantfaircloth/893580

ADD COMMENT
0
Entering edit mode
Hi, yes I tried that one and it is set up for a particular genome, so couldn't get it to work. But found another now, genbank.py (sorry, don't have link atm) that does work. Thanks.
ADD REPLY
0
Entering edit mode
9.7 years ago
susan.klein ▴ 80

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.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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