<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.8.2">
</HEAD>
<BODY>
Hi Maximilian,<BR>
<BR>
    I hope that I understand your question. An easy way to do so is to put your sequences in a separate arrays, loop overs these arrays while comparing positions, if the nuc/aa are equal, then push a pipe  ( "|" ) in a third separate array, else push a space ( " " ). Once it's done, print your arrays by looping over them...<BR>
<BR>
<PRE>
array1 qw (A A G C T)
array2 qw (C A C C G)
array3 qw (  |   |  )

Then, print your arrays and that will give you

A A G C T
  |   | 
C A C C G

Surely, you can color whatever you want in that case too (i.e : the aligned nuc).
</PRE>
<BR>
<BR>
Hope this was clear<BR>
<BR>
Pierre<BR>
<BR>
<BR>
<BR>
On Sun, 2006-02-19 at 14:52 +0100, Maximilian Haeussler wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hi bio-mailinglists,</FONT>

<FONT COLOR="#000000">does anyone here know of a tool or a library to display two (or more)</FONT>
<FONT COLOR="#000000">sequences at the same time with coloured features? Possibly with lines,</FONT>
<FONT COLOR="#000000">connecting some features from one sequence to the other (synteny-plot) ?</FONT>
<FONT COLOR="#000000">Or to display two multiple alignments, one on top of each other, with</FONT>
<FONT COLOR="#000000">colored features added?</FONT>

<FONT COLOR="#000000">It's not that it would be difficult to write, but programming visualisation</FONT>
<FONT COLOR="#000000">usually takes a lot of time.</FONT>
<FONT COLOR="#000000">Bio::Graphics seems mainly concerned with one main sequence and features on</FONT>
<FONT COLOR="#000000">it. Well, I could copy together two of these gif-images, but then there</FONT>
<FONT COLOR="#000000">would be no connecting lines. Same applies for the graphics in Biojava or</FONT>
<FONT COLOR="#000000">the gff2ps tool or all the multiple alignment viewers that I know (Bioedit,</FONT>
<FONT COLOR="#000000">ClustalX). There is something called Toucan in Java, which displays at least</FONT>
<FONT COLOR="#000000">several lines of gff-style-features, but no visible sequences and more</FONT>
<FONT COLOR="#000000">importantly, no connecting lines. A recent software, Djinn lite, is using a</FONT>
<FONT COLOR="#000000">similar kind of visualization to compare different spliced genes from</FONT>
<FONT COLOR="#000000">various species, but it's mainly aimed at splicing and written in Visual</FONT>
<FONT COLOR="#000000">Basic.</FONT>
<FONT COLOR="#000000">I guess a good compromise might be the 3D viewer Sockeye, but I haven't seen</FONT>
<FONT COLOR="#000000">any synteny-lines in sockeye yet.</FONT>

<FONT COLOR="#000000">I guess I must have missed something here. I cannot be the first one that</FONT>
<FONT COLOR="#000000">would like to compare, say, two gff files, or two multiple alignments?</FONT>

<FONT COLOR="#000000">Thanks a lot for any idea,</FONT>
<FONT COLOR="#000000">Max</FONT>

<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">Bioperl-l mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:Bioperl-l@lists.open-bio.org">Bioperl-l@lists.open-bio.org</A></FONT>
<FONT COLOR="#000000"><A HREF="http://lists.open-bio.org/mailman/listinfo/bioperl-l">http://lists.open-bio.org/mailman/listinfo/bioperl-l</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>