question about using DAS service and JalviewLite

Hi,

Is it possible to use DAS to retrieve protein sequence and other relevant sequence annotation by using JalviewLite (Java applet ) ? if not, what else can I do
if I want to retrieve sequence with input of uniprot id and the use of Jalview applet that is embedded in a web page?

-Nelson

So from what I understand, there is no way one can pass-on uniprot id directly into JalviewLite (applet version of Jalview) to search uniport and retrieve protein sequence and sequence feature annotations, similar to what one can do using the standalone version of Jalview. Is that correct ?

  in order to add feature annotations to JalviewLite , one needs to first create a gff file containing the feature annotation and then use the following:

<param name="Features" value="file.gff">

in order to make the features annotated and visualizable inside JalviewLite . What other ways that one can add feature annotations via the use of JalviewLite applet.

-S.

···

Hi,

Is it possible to use DAS to retrieve protein sequence and other relevant sequence annotation by using JalviewLite (Java applet ) ? if not, what else can I do
if I want to retrieve sequence with input of uniprot id and the use of Jalview applet that is embedded in a web page?

So from what I understand, there is no way one can pass-on uniprot id
directly into JalviewLite (applet version of Jalview) to search uniport
and retrieve protein sequence and sequence feature annotations, similar
to what one can do using the standalone version of Jalview. Is that
correct ?
   

It is.

   in order to add feature annotations to JalviewLite , one needs to
first create a gff file containing the feature annotation and then use
the following:

  <param name="Features" value="file.gff">

in order to make the features annotated and visualizable inside
JalviewLite . What other ways that one can add feature annotations via
the use of JalviewLite applet.
   

Sequence features can be imported using the Jalview feature file or GFF files - and the ordering and colouring of the features are controlled using the feature colourscheme definitions (see the jalview feature file format http://www.jalview.org/help/html/features/featuresFormat.html ).

The 2.4 version of JalviewLite has no specific features for database querying - this is because its designed as a web app user interface component, so its restricted to the browser's sandbox (and cannot query arbitrary URLs). However, its relatively straightforward to set up a server-side service that the applet could use to retrieve a gff or Jalview features file containing alignment annotation.

All you need to do is put the URL of the service in the value field of the 'Features' parameter. You can also upload and control the display of features via javascript - check out the example and API for details (http://www.jalview.org/examples/formComplete.html - scroll to the bottom of the page).

One development path for JalviewLite is to introduce some components that people can use on their servers to more tightly integrate the applet with their own web services. For instance, the DASTY server side DAS proxy system could be used by JalviewLite, with only a few modifications. Let me know if your interested in this.

Thanks for the email, and please get in contact if your interested in extending what JalviewLite can do for your application!

Jim.

···

On 10/03/2010 04:45, Sai Tong wrote:

-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) 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.

Hello Sai,

The reason JalviewLite cannot search and retrieve uniprot sequences directly is due to the security of web browsers, ie a page cannot run scripts that access files that come from a different server without the users permission.

When you start up the Jaliew standalone version, you agreed to allow the program to access other web servers, so the program connects to many DAS servers around the world.

The applet in Jalview 2 was designed to be dropped into any web page anywhere for easy use by researchers. In order to access other servers, such as Uniprot, then an amount of coding is required, and this would reduce the portability of the applet.

I would suggest a jQuery JalivewLite plugin would be very useful for javascript web developers, for sequence/feature retrieval from DAS servers. However, this would still require the coder to do some server side coding (a proxy server would be the easiest solution)

Would this be a good project for "Google Summer of Code" Jim?

Andrew Waterhouse

Jim Procter wrote:

···

On 10/03/2010 04:45, Sai Tong wrote:
  

So from what I understand, there is no way one can pass-on uniprot id
directly into JalviewLite (applet version of Jalview) to search uniport
and retrieve protein sequence and sequence feature annotations, similar
to what one can do using the standalone version of Jalview. Is that
correct ?
   

It is.
  

   in order to add feature annotations to JalviewLite , one needs to
first create a gff file containing the feature annotation and then use
the following:

  <param name="Features" value="file.gff">

in order to make the features annotated and visualizable inside
JalviewLite . What other ways that one can add feature annotations via
the use of JalviewLite applet.
   

Sequence features can be imported using the Jalview feature file or GFF files - and the ordering and colouring of the features are controlled using the feature colourscheme definitions (see the jalview feature file format http://www.jalview.org/help/html/features/featuresFormat.html ).

The 2.4 version of JalviewLite has no specific features for database querying - this is because its designed as a web app user interface component, so its restricted to the browser's sandbox (and cannot query arbitrary URLs). However, its relatively straightforward to set up a server-side service that the applet could use to retrieve a gff or Jalview features file containing alignment annotation.

All you need to do is put the URL of the service in the value field of the 'Features' parameter. You can also upload and control the display of features via javascript - check out the example and API for details (http://www.jalview.org/examples/formComplete.html - scroll to the bottom of the page).

One development path for JalviewLite is to introduce some components that people can use on their servers to more tightly integrate the applet with their own web services. For instance, the DASTY server side DAS proxy system could be used by JalviewLite, with only a few modifications. Let me know if your interested in this.

Thanks for the email, and please get in contact if your interested in extending what JalviewLite can do for your application!

Jim.

-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) 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.

_______________________________________________
Jalview-discuss mailing list
Jalview-discuss@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss

Hi Jim, Andrew

thanks for your responses. These ideas are very cool.

In order for the DASTY server side DAS proxy system to be used by JalviewLite, does it necessarily mean that a proxy (the retrieval module) would need to be installed in people's own web server ?

If a JQuery/JalViewLite plugin is to be made successfully, does it mean that web developers can just give a bunch of (i.e.) uniprot ids as parameters to JalviewLite and JalviewLite would take care the rest of the communication and data retrieval steps with the DAS servers?

Will something like the following JS library for DAS be part of this proposed plugin?
http://code.google.com/p/jsdas/

Currently, I've written some server-side codes on my server to retrieve uniprot sequences (based on selected uniprot ids) in a jsp file and then submit these sequences for alignment in JalviewLite by using this:

<param name="sequence1" value="yyyy TSPVV">
<param name="sequence2" value="zzzz TSPVV">

and as for getting sequence feature annotations, I'm writing server-side codes to retrieve gff file from uniprot (one by one for each sequences in the alignment)

http://www.uniprot.org/uniprot/Q65GN7.gff

and then I'd concatenate the contents from all of the gff files in order to make 1 single file to be applied into JalviewLite's alignment:

<param name="Features" value="file.gff">

(just a side question, can multiple Feature parameters be applied to sequence alignment in JalviewLite ? Haven't try this yet...)

I'm interested to help to extend the DAS-connection of JalviewLite. But I am not sure if I'd qualify for doing this as a "Google Summer of Code" project.

-Sai

Andrew Waterhouse wrote:

···

Hello Sai,

The reason JalviewLite cannot search and retrieve uniprot sequences directly is due to the security of web browsers, ie a page cannot run scripts that access files that come from a different server without the users permission.

When you start up the Jaliew standalone version, you agreed to allow the program to access other web servers, so the program connects to many DAS servers around the world.

The applet in Jalview 2 was designed to be dropped into any web page anywhere for easy use by researchers. In order to access other servers, such as Uniprot, then an amount of coding is required, and this would reduce the portability of the applet.

I would suggest a jQuery JalivewLite plugin would be very useful for javascript web developers, for sequence/feature retrieval from DAS servers. However, this would still require the coder to do some server side coding (a proxy server would be the easiest solution)

Would this be a good project for "Google Summer of Code" Jim?

Andrew Waterhouse

Jim Procter wrote:

On 10/03/2010 04:45, Sai Tong wrote:

So from what I understand, there is no way one can pass-on uniprot id
directly into JalviewLite (applet version of Jalview) to search uniport
and retrieve protein sequence and sequence feature annotations, similar
to what one can do using the standalone version of Jalview. Is that
correct ?
       

It is.

   in order to add feature annotations to JalviewLite , one needs to
first create a gff file containing the feature annotation and then use
the following:

  <param name="Features" value="file.gff">

in order to make the features annotated and visualizable inside
JalviewLite . What other ways that one can add feature annotations via
the use of JalviewLite applet.
       

Sequence features can be imported using the Jalview feature file or GFF files - and the ordering and colouring of the features are controlled using the feature colourscheme definitions (see the jalview feature file format http://www.jalview.org/help/html/features/featuresFormat.html ).

The 2.4 version of JalviewLite has no specific features for database querying - this is because its designed as a web app user interface component, so its restricted to the browser's sandbox (and cannot query arbitrary URLs). However, its relatively straightforward to set up a server-side service that the applet could use to retrieve a gff or Jalview features file containing alignment annotation.

All you need to do is put the URL of the service in the value field of the 'Features' parameter. You can also upload and control the display of features via javascript - check out the example and API for details (http://www.jalview.org/examples/formComplete.html - scroll to the bottom of the page).

One development path for JalviewLite is to introduce some components that people can use on their servers to more tightly integrate the applet with their own web services. For instance, the DASTY server side DAS proxy system could be used by JalviewLite, with only a few modifications. Let me know if your interested in this.

Thanks for the email, and please get in contact if your interested in extending what JalviewLite can do for your application!

Jim.

-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) 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.

_______________________________________________
Jalview-discuss mailing list
Jalview-discuss@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-discuss

Hi Andrew - it seems you and Sai's timezones are closer than mine !

thanks for your responses. These ideas are very cool.
In order for the DASTY server side DAS proxy system to be used by JalviewLite, does it necessarily mean that a proxy (the retrieval module) would need to be installed in people's own web server ?

It does, unless you provide a 'signed applet', and the user agrees to allow the applet free access to the internet. This page gives a good explanation of the different approaches :
http://www.raditha.com/java/sandbox/

If a JQuery/JalViewLite plugin is to be made successfully, does it mean that web developers can just give a bunch of (i.e.) uniprot ids as parameters to JalviewLite and JalviewLite would take care the rest of the communication and data retrieval steps with the DAS servers?

Not quite. As Andrew said, JalviewLite is really designed as a drop in visualization solution - and no DAS source browser or feature fetching code is currently included.

Will something like the following JS library for DAS be part of this proposed plugin?
Google Code Archive - Long-term storage for Google Code Project Hosting.

Actually, yes. Jose Villavece's and Bernat Gel's code is quite new, and they will be talking about it at the next Das workshop (see EMBL-EBI Training ).

Currently, I've written some server-side codes on my server to retrieve uniprot sequences (based on selected uniprot ids) in a jsp file and then submit these sequences for alignment in JalviewLite by using this:

<param name="sequence1" value="yyyy TSPVV">
<param name="sequence2" value="zzzz TSPVV">

Just so I'm clear here, you also want to *align* the sequences retrieved from Uniprot ? JalviewLite only includes a pairwise alignment algorithm - so currently, you'd have to find some other way to align the retrieved sequences before sending them to the applet.

and as for getting sequence feature annotations, I'm writing server-side codes to retrieve gff file from uniprot (one by one for each sequences in the alignment)

http://www.uniprot.org/uniprot/Q65GN7.gff

and then I'd concatenate the contents from all of the gff files in order to make 1 single file to be applied into JalviewLite's alignment:

<param name="Features" value="file.gff">

(just a side question, can multiple Feature parameters be applied to sequence alignment in JalviewLite ? Haven't try this yet...)

Nope - but you can add more features using the loadAnnotation javascript function - so if you wrote some client side javascript to retrieve features with jsLib, then you could parse them into gff and add them to the current Jalview view directly.

Would this be a good project for "Google Summer of Code" Jim?

A great idea! Yes.

I'm interested to help to extend the DAS-connection of JalviewLite. But I am not sure if I'd qualify for doing this as a "Google Summer of Code" project.

:slight_smile: that's understandable - taking 3 months out of your research to do java/javascript software development is not everyone's cup of tea. Having said that - if you have any friends or colleagues who do have the time, then it might be worth suggesting it to them.

I hope to take a closer look at jsDas during the developer meeting in the second week of April - I'll then let you know if there is something that can be done quickly, or whether it would need someone to spend several weeks on getting the applet to visualize DAS sequence and feature query results.

Cheers,
Jim.

···

On 11/03/2010 02:47, Sai Tong wrote:

--
-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) 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.

Thanks for replying to the long email, Bernat! I've cc'ed this reply to everyone concerned too.

And Hi to the others who does'nt know me. My name is Bernat Gel and
I'm a developer of the jsDAS javascript DAS client library.

Just trying to make some sense of that big email I received... As I
understand, you've got an applet version of Jalview with no DAS access
infrastructure and could be interested in using jsDAS to retrieve
uniprot annotations and feed them to the applet. Is this correct?
   

that's exactly it.

As I understand, the applet has a javascript API with a specific
function to give it features in gff format. jsDAS gets and procesess
the DAS XML files and builds javascript objects from them. Building a
valid GFF string from it can be easily done and me or Jose could help
on that if needed.
   

excellent - that was what I thought. To be honest, it should be very easy to do this - the only possible problem is that JalviewLite's AJAX functionality could be less than perfect - but that just means some careful bughunting on my part.

jsDAS is still in development and so, while the code is quite stable
and the basic commands work quite reliably (alignment, stylesheet and
structure have not been thoroughly tested) we would like to have
feedback from potential users in order to improve its API and
functionality.

Looking forward to talk to you on the DAS workshop.

Me too! Perhaps its worth talking to Jonathan Warren about clearing some time for people interested in jsDas hacking to get together on the Friday - this is the best way to get some feedback.

Jim.

···

--
-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) 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.

The real problem is that I really should/want to get the uniprot sequence feature annotations and let JalviewLit be able to visualize the features. The problem is my current aln files do not contains sequences with uniprot ids as their names. Even though I have the map to map from the uniprot id to the 13-character-name found in the aln file, I might still have to modify the sequence feature information from uniprot and re-name the protein name into the ones match with the names found in my aln files in order for the feature annotation to appear for the sequences in the MSA in jalview.

I see. Basically you want the full ID mapping functionality in the jalview desktop accessible from the applet. There are several routes you can take here: the most obvious one is to warehouse the ID mappings beforehand within a small web service and roll your own client side lookup to translate IDs before doing the DAS request, the other extreme would be to develop a java servlet that uses methods in the jalview package to do the ID lookup, DAS feature retrieval, and GFF translation for the applet. The latter would be a very interesting project - since its effectively creating a client/server version of Jalview - but would definitely require collaboration to ensure the internal APIs in Jalview are up to the job.

Yes, Jim,
might be I should try to attempt the more obvious approach first. I already have the ID mappings made in a backend data warehosue. This is not ideal because uniprot ids and accession numbers can change from version to version in the long-run. But at least this would help to do what I want to do with displaying sequence feature annotations within JalviewLite for now.

yes. that's going to be the quickest way. However, if you make sure that you use properly versioned uniprot accessions then it should always be possible to recover the annotation - if not from the current uniprot DAS service, then via the uniparc services (though I haven't tried this).

In regarding to the missing "sequence conservation, quality and consensus plot" from JalviewLite, I think perhaps it might have to do with the number of sequences I have in the .aln file that I used to visualize with JalviewLite. In the example I gave previously, there were 288 sequences in the MSA, and if I select "Show Annotations" from "View" drop-down menu in JalviewLite, I don't see those 3 plots appear. However, if I open a full-version of Jalview using Java Web Start, I am able to see the 3 plots beneath the sequence alignment window. Is there a limit of how many sequences that JalviewLite can visualize in addition to showing the "sequence conservation, quality and consensus plot for the alignment"?

The wrapped mode is limited by the vertical size of the screen. Both the applet and application have this problem when there are very large numbers of sequences. If you reduce the font size (hold down the middle mouse button and drag towards the top left) then you will see that the conservation, consensus and quality plots are rendered - but fall off the bottom of the screen if the font is too big. This is one of the aspects which Albert is interested in fixing via the 'Google map Jalview' project.

Jim.

···

On 13/03/2010 01:04, Sai Tong wrote:

--
-------------------------------------------------------------------
J. B. Procter (JALVIEW/ENFIN) 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.

Yes, Jim,
might be I should try to attempt the more obvious approach first. I already have the ID mappings made in a backend data warehosue. This is not ideal because uniprot ids and accession numbers can change from version to version in the long-run. But at least this would help to do what I want to do with displaying sequence feature annotations within JalviewLite for now.

yes. that's going to be the quickest way. However, if you make sure that you use properly versioned uniprot accessions then it should always be possible to recover the annotation - if not from the current uniprot DAS service, then via the uniparc services (though I haven't tried this).

In regarding to the missing "sequence conservation, quality and consensus plot" from JalviewLite, I think perhaps it might have to do with the number of sequences I have in the .aln file that I used to visualize with JalviewLite. In the example I gave previously, there were 288 sequences in the MSA, and if I select "Show Annotations" from "View" drop-down menu in JalviewLite, I don't see those 3 plots appear. However, if I open a full-version of Jalview using Java Web Start, I am able to see the 3 plots beneath the sequence alignment window. Is there a limit of how many sequences that JalviewLite can visualize in addition to showing the "sequence conservation, quality and consensus plot for the alignment"?

The wrapped mode is limited by the vertical size of the screen. Both the applet and application have this problem when there are very large numbers of sequences. If you reduce the font size (hold down the middle mouse button and drag towards the top left) then you will see that the conservation, consensus and quality plots are rendered - but fall off the bottom of the screen if the font is too big. This is one of the aspects which Albert is interested in fixing via the 'Google map Jalview' project.

Thanks Jim, yes, your suggestion of adjusting the font size is right on .
Aligning large number of sequence definitely makes it difficult, if not impossible, for users to use Jalview to look through the alignment at different resolution level.

-Sai

···

Jim.