Are There Any Scripts That Make Images From Gff Files?
5
2
Entering edit mode
10.7 years ago
JacobS ▴ 990

Hi, I am looking for a script or simple piece of software that can be run on the CLI that will make an image from a gff. Something akin to how IGV or another genome browser renders GFF tracks. I know that IGV has some basic functionality on the CLI, but it really doesn't suit this purpose due to a lack of options, etc.

If anyone knows of a solution, please let me know!

gff • 7.3k views
ADD COMMENT
4
Entering edit mode
10.7 years ago
Michael 55k

See BioPerl modules Bio::Graphics + Bio::DB:GFF and example scripts. In particular featureDraw.pl is most likely what you should try, it can draw some of the (but not all) feature types GBrowse can draw. Normally I would ask you to be more specific in describing your desired visualization, but this script should contain everything you can probably make use of (e.g. transcripts, segments, etc.) and you can try to find a good way of visualization by experimenting with its options.

As an alternative: Annotationsketch

ADD COMMENT
2
Entering edit mode
10.6 years ago
arnstrm ★ 1.9k

Hi Jacob,

have you tried GenomeTools? The graphics are beautiful and is extremely suited for CLI, but it is really pain to install it on your machine (prerequisites have their own prerequisites!). They have some example scripts in most of the languages using simple gff file. They also have a online server (limited to only 2 Mb) to test it out. I hope this helps

Arun

ADD COMMENT
2
Entering edit mode
10.6 years ago

There's also Gviz in R/Bioconductor. It produces tracks similar to those in the UCSC genome browser. You can combine that with pretty much any other data-type you want and plot things together as well.

ADD COMMENT
1
Entering edit mode
10.6 years ago

Convert your GFF file into hammock format and load it into the WashU Epigenome Browser as a custom track or public hub.

Choose your genomic range to view, then select Apps > Screenshot to generate and download a SVG file of the current view. SVG is a vector-based format that is well-suited for making publication-quality figures, while PNG (bitmaps) do not generally scale well.

ADD COMMENT
1
Entering edit mode
10.6 years ago

Hi Jacobs,

Programmatically you can do this with Biopython. I have a script that draws contigs but from annotated GBK file. Details are given on

http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/annotation.html

And the script is http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/genbank_enzymes.py

However it takes assembled contigs that are annotated with PROKKA to generate a GBK file (though it would require very little modification to take GFF file) and I use an ID files to draw only those contigs that contain a particular enzyme we are interested in

I have used Biopython's GenomeDiagram to draw the contigs. Both linear and circular genomes are supported. You can find information in the cookbook (somewhere near the end): http://biopython.org/DIST/docs/tutorial/Tutorial.html

And here is the GenomeDiagram manual: http://biopython.org/DIST/docs/GenomeDiagram/userguide.pdf

Though the syntax for it changed after it got incorporated into Biopython (also mentioned in the cookbook)

You can actually use BCBio python package https://pypi.python.org/pypi/bcbio-gff/0.4 to import GFFs and then GenomeDiagram to draw CDS regions

Look inside my http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/genbank_enzymes.py on how I use BCBio

Best Wishes, Umer

ADD COMMENT

Login before adding your answer.

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