10 June 2011

An extension for Inkscape processing a sequence from Genbank

Let's create a new extension for inkscape by recycling an old XSLT stylsheet producing a SVG image !

For example, we're going to use this xslt stylsheet: https://github.com/lindenb/xslt-sandbox/blob/master/stylesheets/bio/ncbi/gb2svg.xsl that transforms a Genbank XML INSDSeq to SVG. It is downloaded into the extension directory;


Now let's tell inkscape about this new extension by defining the following XML file (INX):


<name>Genbank Input</name>
<filetypename>NCBI Genbank (*.xml)</filetypename>
<filetypetooltip>NCBI Genbank XML</filetypetooltip>
<file reldir="extensions">gb2svg.xsl</file>

Now let's test this new extension: download a sequence from Genbank and save it as a XML/INSDSeq file. For example: http://www.ncbi.nlm.nih.gov/nuccore/NM_001200001.1.

Open Inkscape. Do Menu File > Import > and select the file sequence.gbc.xml and the Genbank format.

Press OK. Et voila !!

That's it,


No comments: