Biopython's GenomeDiagram input files
1
0
Entering edit mode
9.1 years ago
ab.tsubaki ▴ 50

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?

  1. Can GenomeDiagram use fasta files?
  2. Has anyone tried to convert fasta to genbank files?

Help will be much appreciated!

Regards

synteny GenomeDiagram biopython • 2.7k views
ADD COMMENT
0
Entering edit mode

can you post the code you've used with your genbank file?

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode
9.1 years ago
mgalactus ▴ 780

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

ADD COMMENT

Login before adding your answer.

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