23 January 2006

Nemester: antisocial network

Here is a new online community: Nemester The new way to make enemies !


Nemester is an online community that connects paranoids, egotists, villains, and monomaniacs through networks of competing agendas and incompatable ideologies for bitter conflicts, mutual loathing, or to find their one, true nemesis...


Annozilla

Today I tested annozilla, a Firefox extension used to create and share annotations about web sites. Installation of the extension for firefox 1.5 was really fast and simple. Then you need a server that will store your annotations. The w3c provides a free one for testing at http://annotest.w3.org/access.

.

I'm still missing some points: how can I add a new type of annotation (comment, explanation,example, but I'd like to see cellular component, interaction, etc...). Moreover, an annotation is a free-text (with HTML) which may be also hard to analyse...

19 January 2006

MyFOAFExplorer: browse your FOAF network

I'm pleased to introduce my new java applet called MyFOAFExplorer available at http://www.urbigene.com/foafexplorer/.



The FOAF project defines a semantic format based on RDF/XML to define persons or groups, their relationships, as well as their basic properties such as name, e-mail address, subjects of interest , publication, and so on... MyFOAFExplorer was created after SciFOAF in order to browse a scientific network, its publications, its laboratories,... The
program is an applet (JAVA 1.5 is required) that takes as an input a FOAF file. The applet can be downloaded and used for your laboratoy/social network to introduce your staff, your publications,...


The code does not contain a compliant RDF parser (such as JENA), but the way it parses the XML worked fine for my test, so it could be used as a framework to write your own FOAF file.

.


17 January 2006

Past Projects (II)

After my PhD, I spent one year at the National Center of Genotyping based at Evry in the mass spectrometry team directed by Ivo Gut. The method for genotyping, called the GOOD-Assay used a primer extension of one base followed by a MALDI-TOF mass spectrometry, in multiplex.

c est moi qui l ai fait !


Here, I created a tool called SnipMachine used to find the best primers for this test according to the possible masses, the steric problems, the self/inter hybridization, etc... Here is an output.
strategy 1/10
-------------
primer-list
-----------
copyprimer index("0")
---------------------
Deletion 25-26
SNP at position 25 ( can be 'A' 'C' 5'->3' )
------------------------------------------------
if base base is "A" then mass ="1463"
if base base is "C" then mass ="1439"

mass-without-elongation : 1136
sequence-name : untitled sequence
orientation : Forward
size : 22
Tm : 69.8107
charge-tag : on base="A" mass="0" name="tag1"
sequence
--------
5' GTAATCGATCGTAGCTAGCTaA 3'
copyprimer index("1")
---------------------
SNP at position 30 ( can be 'C' 'G' 5'->3' )
------------------------------------------------
if base base is "C" then mass ="1483"
if base base is "G" then mass ="1523"

mass-without-elongation : 1180
sequence-name : untitled sequence
orientation : Reverse
size : 20
Tm : 71.1841
charge-tag : on base="A" mass="28" name="tag2"
sequence
--------
5' AGTCAGCACTGAGCTACGaT 3'
copyprimer index("2")
---------------------
SNP at position 9 ( can be 'A' 'C' 'G' 'T' 5'->3' )
-------------------------------------------------------
if base base is "A" then mass ="1479"
if base base is "C" then mass ="1455"
if base base is "G" then mass ="1495"
if base base is "T" then mass ="1470"

mass-without-elongation : 1152
sequence-name : untitled sequence
orientation : Reverse
size : 22
Tm : 71.8038
charge-tag : on base="G" mass="0" name="tag1"
sequence
--------
5' CAGTACGTACGATAGCTGATgA 3'

Spectrogram
-----------
|
|___ mass:1136 snp:0 (no elongation) seq:untitled sequence
|
|___ mass:1152 snp:2 (no elongation) seq:untitled sequence (+ 16)
|
|___ mass:1180 snp:1 (no elongation) seq:untitled sequence (+ 28)
|
|___ mass:1439 snp:0 base:C seq:untitled sequence (+ 259)
|
|___ mass:1455 snp:2 base:C seq:untitled sequence (+ 16)
|
|___ mass:1463 snp:0 base:A seq:untitled sequence (+ 8)
|
|___ mass:1470 snp:2 base:T seq:untitled sequence (+ 7)
|
|___ mass:1479 snp:2 base:A seq:untitled sequence (+ 9)
|
|___ mass:1483 snp:1 base:C seq:untitled sequence (+ 4)
|
|___ mass:1495 snp:2 base:G seq:untitled sequence (+ 12)
|
|___ mass:1523 snp:1 base:G seq:untitled sequence (+ 28)
|

melting-temperatures
--------------------
|
|___ Tm:=69.8107 SNP:=0 on sequence:=untitled sequence
|
|___ Tm:=71.1841 SNP:=1 on sequence:=untitled sequence( +1.37339)
|
|___ Tm:=71.8038 SNP:=2 on sequence:=untitled sequence( +0.61974)
|

sequences
---------
sequence:untitled sequence (63)
-------------------------------
ATCGTAATCGATCGTAGCTAGCTAActAGCsATCGTAGCTCAGTGCTGACTGACTCATCAGCT
*******************-=-> <-=-*****************
sequence:untitled sequence (45)
-------------------------------
ATCGTAATCnTCATCAGCTATCGTACGTACTGATCGATCGATCGT
<-=-*******************

Past projects (I)

I've done my thesis at the INRA of Jouy-en-Josas with Dr Didier Poncet. During this time I spent a lot of time in finding strategies to create in-frame deletion in plasmids in order to create truncated proteins of the Rotavirus NSP3 protein. I looked after a software to to this job but as I couldn't find any, I learned C and I wrote this tool. And as the main functions were created, I extended it in order to find sub-cloning strategies using restriction enzymes, phosphatase (to avoid recircularization) et DNA polymerases (to make 'blunt' ends).



The tool called CloneIt was published in bioinformatics and was then installed as a web application on the INRA server in 1988. I don't know if it still works.




15 January 2006

Geography & H5N1

Many sites about H5N1 talks about this : Declan Butler from Nature wrote a google-earh map of the avian flu pandemy. The result is really interesting.

By the way, you can also locate your papers (e.g. about epidemiology) using connotea.

11 January 2006

Drawing pedigrees.

At Integragen, we are working on genetic diseases using a large collection of individuals. Pedigrees are stored using a simple recursive SQL table:

+--------------+--------------+------+-----+------------+
| Field | Type | Null | Key | Default |
+--------------+--------------+------+-----+------------+
| id | int(11) | | PRI | NULL |
| father | int(11) | YES | MUL | NULL |
| mother | int(11) | YES | MUL | NULL |
| svgX | int(5) | YES | | NULL |
| svgY | int(5) | YES | | NULL |
(...)
+--------------+--------------+------+-----+------------+

Although a colleague of mine wrote a paper about the art of drawing pedigrees, I wondered if I could use Graphviz/Dot in order to build the family trees. Using a SQL query transformed into DOT with awk, I was able to parse the X and Y positions generated by dot and to update my database. As those x/y coordinates are now in the tables, drawing the pedigrees in SVG is now easy.



09 January 2006

Firefox, XUL, SVG, XSLT & Genbank

This WE I played with XUL and Firefox 1.5. This last version of firefox allows to write SVG (a XML-based vectorial drawing format) within the html code (see http://developer.mozilla.org/en/docs/SVG_In_HTML_Introduction) I wondered if it was possible to display the features of a genbank sequence as SVG into a XUL window.

The result is displayed below:



I still had problems with the XUL layout and I was not able to display more than one tabpanel (the others were frozen). But creating such image on the fly could be great way to display interaction genomic maps. As an example, the UCSC genome browser (aka golden path) might use this system to display its tracks and make it interactive.

Updated 2010-08-12

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:h="http://www.w3.org/TR/REC-html40"
>
<!--
author : Pierre Lindenbaum PhD
blog: http://plindenbaum.blogspot.com
mail: plindenbaum [ A T ] yahoo.fr
date: 2006
desc: transform a genbank/XML file into html+svg
-->
<xsl:param name="screen-width">100</xsl:param>
<xsl:param name="seq-height">12</xsl:param>
<xsl:output
method="xml"
version="1.0"
encoding="UTF-8"
indent="yes"
/>


<xsl:template match="/">
<xul:window
id="findfile-window"
title="Find Files"
orient="horizontal"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<xsl:apply-templates/>
</xul:window>
</xsl:template>

<xsl:template match="GBSet">
<xul:tabbox flex="1">
<xul:tabs >
<xsl:for-each select="GBSeq">
<xsl:element name="xul:tab">
<xsl:attribute name="id"><xsl:value-of select="generate-id(.)"/></xsl:attribute>
<xsl:attribute name="label"><xsl:value-of select="GBSeq_locus"/></xsl:attribute>
</xsl:element>
</xsl:for-each>
</xul:tabs>
<xul:tabpanels flex="1">

<xsl:for-each select="GBSeq">
<xul:tabpanel flex="1" id="searchpanel">
<xul:vbox flex="1">
<xul:hbox flex="1">
<xsl:apply-templates select="GBSeq_references"/>
</xul:hbox>
<xul:hbox flex="1">
<xul:iframe id="pubmed-iframe" src="about:blank" flex="1" style="overflow : auto; width : 30px; height : 300px; border:1px solid blue;"/>
<xul:box flex="1" style="overflow : auto; width : 30px; height : 300px; border:1px solid blue;">

<xsl:element name="svg:svg">
<xsl:attribute name="xul:flex">1</xsl:attribute>
<xsl:attribute name="width"><xsl:value-of select="2*$screen-width"/>+500</xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="count(GBSeq_feature-table/GBFeature)*20+5"/></xsl:attribute>
<xsl:attribute name="stroke">black</xsl:attribute>
<svg:g>
<svg:defs>
<svg:linearGradient x1="0%" y1="0%" x2="0%" y2="100%" id="metal">
<svg:stop offset="5%" stop-color="black" />
<svg:stop offset="50%" stop-color="whitesmoke" />
<svg:stop offset="95%" stop-color="black" />
</svg:linearGradient>
<svg:filter id="MyFilter" filterUnits="userSpaceOnUse" x="0%" y="0%" width="100%" height="100%">
<svg:feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/>
<svg:feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
<svg:feSpecularLighting in="blur" surfaceScale="5" specularConstant=".75"
specularExponent="20" lighting-color="lightgray"
result="specOut">
<svg:fePointLight x="-5000" y="-10000" z="20000"/>
</svg:feSpecularLighting>
<svg:feComposite in="specOut" in2="SourceAlpha" operator="in" result="specOut"/>
<svg:feComposite in="SourceGraphic" in2="specOut" operator="arithmetic"
k1="0" k2="1" k3="1" k4="0" result="litPaint"/>
<svg:feMerge>
<svg:feMergeNode in="offsetBlur"/>
<svg:feMergeNode in="litPaint"/>
</svg:feMerge>
</svg:filter>

</svg:defs>
<svg:g fill="red">
<xsl:call-template name="rect">
<xsl:with-param name="sequence-size" select="GBSeq_length" />
<xsl:with-param name="label" select="GBSeq_definition" />
<xsl:with-param name="x0" select="0" />
<xsl:with-param name="x1" select="GBSeq_length" />
</xsl:call-template>
<xsl:apply-templates select="GBSeq_feature-table" />
</svg:g>
</svg:g>
</xsl:element>

</xul:box>
</xul:hbox>
</xul:vbox>
</xul:tabpanel>
</xsl:for-each>

</xul:tabpanels>
</xul:tabbox>
</xsl:template>



<xsl:template match="GBSeq_references">
<xsl:element name="xul:tree">
<xsl:attribute name="flex">1</xsl:attribute>
<xsl:attribute name="enableColumnDrag">true</xsl:attribute>
<xsl:attribute name="onselect">var iframe= document.getElementById(&apos;pubmed-iframe&apos;);
if(iframe==null) { alert(&apos;cannot find iframe!&apos;); return;}
switch(this.currentIndex+1)
{
<xsl:for-each select="GBReference">
case <xsl:value-of select="position()"/>:
iframe.setAttribute(&apos;src&apos;,&apos;http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=pubmed&amp;dopt=Abstract&amp;query_hl=1&amp;list_uids=<xsl:value-of select="GBReference_pubmed"/>&apos;);
break;
</xsl:for-each>
default: iframe.setAttribute(&apos;src&apos;,&apos;about:blank&apos;);
break;
}
</xsl:attribute>
<xul:treecols>
<xul:treecol id="1" label="PMID" flex="1"/>
<xul:treecol id="3" label="Title" flex="1"/>
<xul:treecol id="4" label="Reference" flex="1"/>
<xul:treecol id="5" label="Authors" flex="1"/>
<xul:treecol id="6" label="Remarks" flex="2"/>
</xul:treecols>
<xul:treechildren >
<xsl:for-each select="GBReference">
<xul:treeitem>
<xul:treerow flex="1">
<xsl:element name="xul:treecell">
<xsl:attribute name="label">
<xsl:value-of select="GBReference_pubmed"/>
</xsl:attribute>
</xsl:element>


<xsl:element name="xul:treecell">
<xsl:attribute name="label">
<xsl:value-of select="GBReference_title"/>
</xsl:attribute>
</xsl:element>

<xsl:element name="xul:treecell">
<xsl:attribute name="label">
<xsl:value-of select="GBReference_journal"/>
</xsl:attribute>
</xsl:element>


<xsl:element name="xul:treecell">
<xsl:attribute name="label">
<xsl:for-each select="GBReference_authors/GBAuthor">
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>
</xsl:attribute>
</xsl:element>


<xsl:element name="xul:treecell">
<xsl:attribute name="label">
<xsl:value-of select="GBReference_remark"/>
</xsl:attribute>
</xsl:element>


</xul:treerow>
</xul:treeitem>
</xsl:for-each>
</xul:treechildren>
</xsl:element>
</xsl:template>

<xsl:template match="GBSeq_feature-table">
<xsl:apply-templates match="GBFeature" />
</xsl:template>


<xsl:template match="GBFeature">
<xsl:apply-templates select="GBFeature_intervals" />
</xsl:template>

<xsl:template match="GBFeature_intervals">
<xsl:apply-templates select="GBInterval" />
</xsl:template>

<xsl:template match="GBInterval">
<xsl:if test="GBInterval_from">
<xsl:call-template name="rect">
<xsl:with-param name="x0" select="GBInterval_from" />
<xsl:with-param name="x1" select="GBInterval_to" />
<xsl:with-param name="y" select="30+(count(../../preceding-sibling::*))*20" />
<xsl:with-param name="sequence-size" select="../../../../GBSeq_length" />
<xsl:with-param name="label" select="../../GBFeature_key" />
</xsl:call-template>
</xsl:if>

<xsl:if test="GBInterval_point">
<xsl:call-template name="rect">
<xsl:with-param name="x0" select="GBInterval_point" />
<xsl:with-param name="x1" select="GBInterval_point" />
<xsl:with-param name="y" select="30+(count(../../preceding-sibling::*))*20" />
<xsl:with-param name="sequence-size" select="../../../../GBSeq_length" />
<xsl:with-param name="label" select="../../GBFeature_key" />
</xsl:call-template>
</xsl:if>

</xsl:template>





<xsl:template name="rect">
<xsl:param name="x0" select="0" />
<xsl:param name="y" select="0" />
<xsl:param name="x1" select="0" />
<xsl:param name="label" />
<xsl:param name="height" select="10" />
<xsl:param name="sequence-size" />
<xsl:param name="i0" select="($x0 div $sequence-size)* $screen-width" />
<xsl:param name="width" select="(($x1 div $sequence-size)* $screen-width)-$i0" />
<xsl:param name="y2" select="$y+12" />
<xsl:if test="$i0 &gt;= 0">
<xsl:element name="svg:rect">
<xsl:attribute name="x"><xsl:value-of select="$i0"/></xsl:attribute>
<xsl:attribute name="y"><xsl:value-of select="$y"/></xsl:attribute>
<xsl:attribute name="width"><xsl:value-of select="1+$width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
<xsl:attribute name="fill">url(#metal)</xsl:attribute>
<xsl:attribute name="stroke">black</xsl:attribute>
<xsl:attribute name="filter">url(#MyFilter)</xsl:attribute>
</xsl:element>
</xsl:if>

<xsl:element name="svg:text">
<xsl:attribute name="stroke">blue</xsl:attribute>
<xsl:attribute name="x"><xsl:value-of select="$screen-width+10"/></xsl:attribute>
<xsl:attribute name="y"><xsl:value-of select="$y2"/></xsl:attribute>
<xsl:value-of select="$x0"/> -&gt;<xsl:value-of select="$x1"/> : <xsl:value-of select="$label"/>
</xsl:element>
</xsl:template>


</xsl:stylesheet>