Changes between Version 6 and Version 7 of DAS


Ignore:
Timestamp:
2011-02-01T10:42:51+01:00 (13 years ago)
Author:
jvelde
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DAS

    v6 v7  
    11== XGAP-DAS connection project ==
    2 
    32=== Background ===
    4 
    53The Distributed Annotation System (DAS) defines a communication protocol used to exchange annotations on genomic or protein sequences. It is motivated by the idea that such annotations should not be provided by single centralized databases, but should instead be spread over multiple sites. Data distribution, performed by DAS servers, is separated from visualization, which is done by DAS clients. The advantages of this system are that control over the data is retained by data providers, data is freed from the constraints of specific organisations and the normal issues of release cycles, API updates and data duplication are avoided.
    64
     
    86
    97=== XGAP as a DAS server ===
    10 
    118The first steps have been done: adding a working example server to the XGAP project. This is how it works:
    129
    1310The DAS servlet itself is served directly from the source, it cannot be edited:
     11
    1412{{{
    1513<servlet>
     
    2220</servlet-mapping>
    2321}}}
    24 
    2522The servlet reads a file named 'MydasServerConfig.xml' located in the WebContent folder.
    2623
    2724Inside MydasServerConfig.xml, all needed properties for a DAS server are set. For example:
    2825
    29 * URL of the DAS server (ie. XGAP application running on some IP adress)
    30 * XSLT transformation services of the DAS output
    31 * Default stylesheet for data sources
     26 * URL of the DAS server (ie. XGAP application running on some IP adress)
     27 * XSLT transformation services of the DAS output
     28 * Default stylesheet for data sources
    3229
    3330The important bits are in the datasources section. Here we define what data goes into the DAS service. In the example:
    3431
    35 * We point to a class file: <class>mydas.examples.EnsemblTestDataSource</class>
    36 * A coordinate system is entered, needed to map the data to other DAS sources
    37 * The capabilities are defined. We tell DAS what this datasource can provide.
     32 * We point to a class file: <class>mydas.examples.[wiki:EnsemblTestDataSource]</class>
     33 * A coordinate system is entered, needed to map the data to other DAS sources
     34 * The capabilities are defined. We tell DAS what this datasource can provide.
    3835
    3936What we want is:
     
    4138Phase 1.
    4239
    43 * New datasource(s) that provide data from an XGAP database in the form of class file(s).
    44 * Proper configuration of this source in the config xml.
    45 * A working connection to a DAS client
     40 * New datasource(s) that provide data from an XGAP database in the form of class file(s).
     41 * Proper configuration of this source in the config xml.
     42 * A working connection to a DAS client
    4643
    4744Phase 2.
    4845
    49 * A plugin to 'edit' the config xml. For example, adjust organism and coordinate system.
    50 * Smart datasource/config files that serve out the data they can provide, depending on what is in the database.
    51 * A client integrated in XGAP that uses our own data as a source
    52 * Expanding the client so it uses other sources as well, build a plugin around this to the user can quickly add/remove sources
     46 * A plugin to 'edit' the config xml. For example, adjust organism and coordinate system.
     47 * Smart datasource/config files that serve out the data they can provide, depending on what is in the database.
     48 * A client integrated in XGAP that uses our own data as a source
     49 * Expanding the client so it uses other sources as well, build a plugin around this to the user can quickly add/remove sources
    5350
    5451The last two can be done by eg. IFRAMing an existing client and entering our application URL to the list of sources, making use of existing software and source listings.
    5552
    5653=== Older explanation, more technical, outdated locations ===
    57 
    5854In short:
    5955
    60 1) Template/example servlet for DAS data in XGAP
    61 2) Connecting the servlet to a DAS client
    62 3) Querying XGAP data within the servlet
    63 4) The data mapping possibilities
    64 5) Constructing the complete servlet
    65 6) The visualization tool we want to integrate
    66 
     561) Template/example servlet for DAS data in XGAP[[BR]]2) Connecting the servlet to a DAS client[[BR]]3) Querying XGAP data within the servlet[[BR]]4) The data mapping possibilities[[BR]]5) Constructing the complete servlet[[BR]]6) The visualization tool we want to integrate
    6757
    6858In long:
    6959
     601) In the xgap_1_3_distro project, go to: handwritten -> java -> mydas -> DasServlet.java
    7061
    71 1)
    72 In the xgap_1_3_distro project, go to:
    73 handwritten -> java -> mydas -> DasServlet.java
     62We set the MIME type to indicate what we are serving: response.setContentType("application/x-das-features+xml");[[BR]]After that we print data to the output stream: printExample(out);
    7463
    75 We set the MIME type to indicate what we are serving:
    76 response.setContentType("application/x-das-features+xml");
     64This servlet is mapped to the URL '/xgap_1_3_distro/das', see: WebContent/WEB-INF/web.xml[[BR]]Later on you can parse variables to the servlet like this: URL: xgap_1_3_distro/atted?locus=At4g08470 String gene = req.getString("locus");
    7765
    78 After that we print data to the output stream:
    79 printExample(out);
     66For an advanced example, see: handwritten -> java -> plugins -> matrixmanager -> MatrixManagerDownloadServlet.java
    8067
    81 This servlet is mapped to the URL '/xgap_1_3_distro/das', see:
    82 WebContent/WEB-INF/web.xml
     682) Go to the Ensembl genome browser: http://www.ensembl.org/index.html [[BR]]To enter the view, select an organism, eg 'Human'[[BR]]Now select: Manage your data -> Custom data -> Attach DAS[[BR]]In the box behind "or other DAS server", input the URL with your IP instead of 'localhost', ie. http://145.39.234.55:8080/xgap_1_3_distro/das
    8369
    84 Later on you can parse variables to the servlet like this:
    85 URL: xgap_1_3_distro/atted?locus=At4g08470
    86 String gene = req.getString("locus");
     703) XGAP should now serve some example data that can be interpreted by the Ensembl DAS client :) I will test this tomorrow, here at the UMCG the firewalls prevent external computers to reach my IP.
    8771
    88 For an advanced example, see:
    89 handwritten -> java -> plugins -> matrixmanager ->
    90 MatrixManagerDownloadServlet.java
     72If you look at bit closer at the MatrixManager servlet you notice we instantiate the database: db = (JDBCDatabase) this.getDatabase();[[BR]]After which we can run queries using find, eg. this retrieves all markers in the database: db.find(Marker.class);
    9173
     744) Now the idea is to take a close look at the DAS specifications: (I also took the example data from here) http://www.biodas.org/documents/das2/das2_get.html
    9275
    93 2)
    94 Go to the Ensembl genome browser:
    95 http://www.ensembl.org/index.html
     76And identify which parts of DAS and XGAP overlap. (XGAP datamodel basics: http://www.xgap.org/wiki/XgapDataModel)
    9677
    97 To enter the view, select an organism, eg 'Human'
     785) After we know what to serve out, we can build the servlet. I think it should look like this:
    9879
    99 Now select:
    100 Manage your data -> Custom data -> Attach DAS
     80 * Depending on arguments, query a part of the current XGAP database
    10181
    102 In the box behind "or other DAS server", input the URL with your IP
    103 instead of 'localhost', ie.
    104 http://145.39.234.55:8080/xgap_1_3_distro/das
     82(eg. marker positions and QTL peak data)
    10583
     84 * Using the mydas-1.6.0 library:
     85 * Construct DAS objects from the queried XGAP objects
     86 * Create DAS xml format from these objects and serve out
    10687
    107 3)
    108 XGAP should now serve some example data that can be interpreted by the
    109 Ensembl DAS client :) I will test this tomorrow, here at the UMCG the
    110 firewalls prevent external computers to reach my IP.
     886) That would already be great. Next we can look at different viewers and how to integrate them into an XGAP plugin. Tampering with Freemarker templates can be very tedious so if you have a nice idea I can work this out.
    11189
    112 If you look at bit closer at the MatrixManager servlet you notice we
    113 instantiate the database:
    114 db = (JDBCDatabase) this.getDatabase();
     90A customizable viewer that we should possibly use is Gbrowse: http://gmod.org/wiki/GBrowse
    11591
    116 After which we can run queries using find, eg. this retrieves all
    117 markers in the database:
    118 db.find(Marker.class);
    119 
    120 
    121 4)
    122 Now the idea is to take a close look at the DAS specifications: (I
    123 also took the example data from here)
    124 http://www.biodas.org/documents/das2/das2_get.html
    125 
    126 And identify which parts of DAS and XGAP overlap. (XGAP datamodel
    127 basics: http://www.xgap.org/wiki/XgapDataModel)
    128 
    129 
    130 5)
    131 After we know what to serve out, we can build the servlet. I think it
    132 should look like this:
    133 
    134 - Depending on arguments, query a part of the current XGAP database
    135 (eg. marker positions and QTL peak data)
    136 - Using the mydas-1.6.0 library:
    137 - Construct DAS objects from the queried XGAP objects
    138 - Create DAS xml format from these objects and serve out
    139 
    140 
    141 6)
    142 That would already be great. Next we can look at different viewers and
    143 how to integrate them into an XGAP plugin. Tampering with Freemarker
    144 templates can be very tedious so if you have a nice idea I can work
    145 this out.
    146 
    147 A customizable viewer that we should possibly use is Gbrowse:
    148 http://gmod.org/wiki/GBrowse
    149 
    150 And then we can let biologists drool over pictures such as these :)
    151 http://gmod.org/w/images/b/b6/Gbrowse_screenshot1.gif
     92And then we can let biologists drool over pictures such as these :) http://gmod.org/w/images/b/b6/Gbrowse_screenshot1.gif