Biopython's GenomeDiagram input files
Hi all
I am currently trying to draw up a synteny map using Biopython's GenomeDiagram package. I have been able to complete some examples with .gb files and now I want to try it on my own data.
Problem: my data is in fasta format. Any one with experience on this?
- Can GenomeDiagram use fasta files?
- Has anyone tried to convert fasta to genbank files?
Help will be much appreciated!
Regards
• 3,520 views
•
link
1 answer
Hi,
Sure, you can use fasta files to draw genome diagrams; you could provide the features you want to draw on top of the sequence from other files (say a gff file or a simple table you might have). You can convert a fasta file to a Genbank file with the following python script:
from Bio import SeqIO
SeqIO.write(SeqIO.parse('input.fasta', 'fasta'), 'output.gbk', 'genbank')
Marco
• 0 views
•
link
Log in to answer this question.
can you post the code you've used with your genbank file?
GenomeDiagram doesn't draw sequences - they are just the horizontal scale/axis, what you draw is usually annotation/features along the sequence (as boxes, arrows, etc). You're probably using the annotation from a GenBank file (e.g. genes as SeqFeature objects), but do you have similar annotation for your FASTA sequences?