Olf   Projects   Art   Software   Bio   Links   Private   Mail
  Deutsche Version

 | Up |

Fasta2SVG - Creates a svg-graphic from a fasta file

I wrote this software for the PhD-thesis of my girlfriend to print the various fasta-files of her work in nice fashion. The script uses perl and the SVG-module to convert a fasta-graphic into a svg-vector-graphic. The result can easily be reformated by using Skencil or Sodipodi. Under Windows you have to use a commercial software as Corel Draw or Adobe Illustrator (or boot from a Knoppix-CD).

For running the program you need perl and some modules from the cpan. If you are running linux, perl is contained in your distribution. A Windows-version is available at ActiveState.

If the software is installed, you have to get the following modules from CPAN (www.cpan.org):

  • SVG
  • Getopt::Long
Under Windows you have to use the following commands:
  • ppm
  • ppm> install SVG
  • ppm> install Getopt-Long

If you use the program, please give me some feedback.

Download

Date Description Download
07. 07. 2005 Version 0.01:
Initial version.
Download

Examples

For the sake of illustration I added some examples to this page. If you look up the parameters in the lower part of this page the examples are self-explanatory. Just in case you don't have a svg-viewer installed I alos included a pdf-version of each example.

perl fasta2svg example.fas > example1.svg

SVG Graphic       Graphic as PDF-file

perl fasta2svg example.fas --align --nonumber --color="0:#ffe57d" --color="1:#ffaa00" --color="2:#ff5b01" --color="3:#ff0101" > example2.svg

SVG Graphic       Graphic as PDF-file

perl fasta2svg example.fas --color="A:#ff0000" --color="T:#ff0000" --color="C:#0000ff" --color="G:#0000ff" > example3.svg

SVG Graphic       Graphic as PDF-file

perl fasta2svg example.fas --color="A:#ffff00" --offset=-55 --stroke=0 --space=3 --lineheight=15 --itemwidth=15 --maxwidth=10 > example4.svg

SVG Graphic       Graphic as PDF-file

Perl Documentation


NAME

faste2svg - Creates a svg-graphic from a fasta file


SYNOPSIS

fasta2svp [options] file

 Options:
   --help       get help


OPTIONS

--help
Prints this manual page in text format.

--maxwidth=i
Sets the numbers of bases / nucleotides in a line to i. The default is 75.

--space=f
Sets the space beween two lines to f; the default is 1.5.

--lineheight=f
Sets the height of a line to f. Default is 8.

--itemwidth=f
Sets the with of one item to f. Default is 6.

--scale=f
Scales the image by factor f. Default is 1.

--leftspace=i
Sets the space between sequence name and sequence to i. Default is 100.

--stroke=i
Sets the stroke of the rectangles surrounding the bases. Default is 1.

--nonumbers
Switches off the numbering (default is on).

--offset=i
Sets a offset for the numbering.

--align!
Switches to alignment-mode.

--color=s
Sets the color. If the mode is align the form is 0:#ff0000. This sets the color for no difference at this site to red. If the mode is not align, the form is A:#0000ff; this sets the base A to red.


DESCRIPTION

fasta2svg reads a fasta file and converts it to a svg-graphic that can be processed with sketch, sodipodi or other vector graphic programs.


LICENCE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.


EXAMPLES

perl fasta2svg example.fas > example1.svg

perl fasta2svg example.fas --align --nonumber --color="0:#ffe57d" --color="1:#ffaa00" --color="2:#ff5b01" --color="3:#ff0101" > example2.svg

perl fasta2svg example.fas --color="A:#ff0000" --color="T:#ff0000" --color="C:#0000ff" --color="G:#0000ff" > example3.svg

perl fasta2svg example.fas --color="A:#ffff00" --offset=-55 --stroke=0 --space=3 --lineheight=15 --itemwidth=15 --maxwidth=10 > example4.svg


 Fresh stuff  

Gerbils

Xmas Cookies

Tim the bird

Trading Journal V0.10

 Features  

Impressum

Feedback

Newsletter

eCards

Geniustrader

 
 News  

Images out of africa

Back from the island

Sign of life

More pictures, more visitors, more recipes ...

Happy New Year!

More news...

 
© 2004 Oliver Bossert