[Jalview-discuss] Re: linkUrl and regexp

Sebastien MORETTI sebastien.moretti at unil.ch
Tue Sep 9 15:32:36 BST 2008


>> Many thanks !
>> Both strategies work, non-positional features within the tooltip & with
>> linkURL.
> great!
>> I have kept linkLabel_1/linkUrl_1 only because I think it is easier for
>> users and I have no feature file to create.
> Understandable, and I agree. Non-positional links now serve almost the
> same purpose, but they do have the advantage of offloading the
> additional sequence metadata into another file, rather than stuffing it
> all into the description line.
> 
>> <param name="linkLabel_1"      value="Ensembl" />
>> <param name="linkUrl_2"
>> value="http://www.ensembl.org/Homo_sapiens/searchview?species=;idx=;q=\$SEQUENCE_ID=/GENEID=(\\w+)
>> TAXID/=\$" />
>>
>> Maybe you have to specify in the documentation that regexp in
>> $SEQUENCE_ID have to be back-slash protected following computer
>> languages used to make applet parameters.
> Normally, this is not necessary. Are you talking about when the applet
> tag is generated within a Perl CGI script ? (then all $ within double
> quoted strings must be escaped)

Yes, the applet tags are generated within a Perl CGI script.
It should be the same for applet tags generated by Java code.

> If you escape the '$' and set the debug flag (param name="debug"
> value="true") then jalviewLite raises an error because it cannot parse
> the value of the linkURL_2 as a valid sequence ID regex link (in this
> case it is because the /=$ cannot be found).

Thus, I have escaped $ surrounding SEQUENCE_ID and every backslashed 
metacharacter in the regexp like \w
\$SEQUENCE_ID=/GENEID=(\\w+) TAXID/=\$

This should not to be done for single quoted strings.

>> p.s.: We will send you something for Christmas ;-)
>>
> I'll look forward to it!
> 
> thanks for your patience, again...
> Jim

Thanks again and again
Sébastien

-- 
Sébastien Moretti
Department of Ecology and Evolution,
Biophore, University of Lausanne,
CH-1015 Lausanne, Switzerland
Tel.: +41 (21) 692 4221/4056
http://bioinfo.unil.ch/



More information about the Jalview-discuss mailing list