Question: Genbank to bed conversion for bedtools analysis
0
gravatar for susan.klein
4.7 years ago by
susan.klein50
Oceania
susan.klein50 wrote:

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

ADD COMMENTlink modified 4.7 years ago • written 4.7 years ago by susan.klein50
0
gravatar for Cytosine
4.7 years ago by
Cytosine440
Ljubljana, Slovenia
Cytosine440 wrote:

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

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

ADD COMMENTlink written 4.7 years ago by Cytosine440
0
gravatar for susan.klein
4.7 years ago by
susan.klein50
Oceania
susan.klein50 wrote:
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 COMMENTlink written 4.7 years ago by susan.klein50
0
gravatar for susan.klein
4.7 years ago by
susan.klein50
Oceania
susan.klein50 wrote:

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 isntead 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 COMMENTlink written 4.7 years ago by susan.klein50

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 REPLYlink written 4.7 years ago by susan.klein50
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: 904 users visited in the last hour