[Jalview-discuss] Re: linkUrl and regexp

James Procter jimp at compbio.dundee.ac.uk
Tue Sep 9 12:22:26 BST 2008


Hello Sebastien.

congratulations - you have uncovered more bugs in Jalview!  As a result,
this is a lengthy reply... (but not as long as the three emails you have
already sent today - thanks for your patience)

Sebastien MORETTI wrote:

> "Sequence not found" message came from a forgotten tab. It is resolved
> now, sorry.
ah. OK. That error is usually raised when the parser cannot find enough
tab-separated fields from the feature file line (it's not a very
informative error message, I'm afraid..).

> But I do not have links yet.
ahem - yes. about that.

Providing your feature file parses (ie it has tab characters separating
each field), then the problems are as follows:

1. As you have noticed, the html parser in jalview is _very_ basic. It
expects XML attributes to be quoted with double quotes ('"') not a
single quote (''') (also, please bear in mind that single quoted
attributes is non-standard XML and will not validate).

This means you should have a feature file with lines like:

<html><a
href="http://www.ensembl.org/Homo_sapiens/searchview?species=;idx=;q=ENSG00000166598">ensembl</a></html>
ENPL_HUMAN	-1	0	0	DBRef

Note I have used '0' in the start/end fields. This is because I was in
error in my previous reply:

2. Non-positional features are specified by putting a '0' in both the
start and end (not a '-1' as I said previously - sorry).

Finally... the real problem:

3. Link display for non-positional features appears to be broken...
So even if you got the features to be listed in the sequence ID tooltip,
no links would be generated from the URL links embedded in the sequence
features.


This successfully scuppers my original suggestion of using
non-positional sequence features to append URLs......... however... I
have checked in a bug fix for #3. Both the applet and application now
generate URL links from links embedded in non-positional features.
Furthermore, the applet now displays non-positional features within the
tooltip.

can you try it out ?
(http://www.compbio.dundee.ac.uk/~ws-dev1/jalview/latest)
Jim.

ps. As an alternative, I have also re-instated the 'generate URL from
sequence description' code too, but made it so that only URLs which
contain regexes are used to process the description. This is still not
ideal, but more appropriate than simply making a URL substitution using
the whole description string.


-- 
-------------------------------------------------------------------
J. B. Procter  (ENFIN/VAMSAS)  Barton Bioinformatics Research Group
Phone/Fax:+44(0)1382 388734/345764  http://www.compbio.dundee.ac.uk
The University of Dundee is a Scottish Registered Charity, No. SC015096.



More information about the Jalview-discuss mailing list