Changes between Version 6 and Version 7 of DAS
- Timestamp:
- 2011-02-01T10:42:51+01:00 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DAS
v6 v7 1 1 == XGAP-DAS connection project == 2 3 2 === Background === 4 5 3 The 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. 6 4 … … 8 6 9 7 === XGAP as a DAS server === 10 11 8 The first steps have been done: adding a working example server to the XGAP project. This is how it works: 12 9 13 10 The DAS servlet itself is served directly from the source, it cannot be edited: 11 14 12 {{{ 15 13 <servlet> … … 22 20 </servlet-mapping> 23 21 }}} 24 25 22 The servlet reads a file named 'MydasServerConfig.xml' located in the WebContent folder. 26 23 27 24 Inside MydasServerConfig.xml, all needed properties for a DAS server are set. For example: 28 25 29 * URL of the DAS server (ie. XGAP application running on some IP adress)30 * XSLT transformation services of the DAS output31 * Default stylesheet for data sources26 * 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 32 29 33 30 The important bits are in the datasources section. Here we define what data goes into the DAS service. In the example: 34 31 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 sources37 * 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. 38 35 39 36 What we want is: … … 41 38 Phase 1. 42 39 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 client40 * 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 46 43 47 44 Phase 2. 48 45 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 source52 * Expanding the client so it uses other sources as well, build a plugin around this to the user can quickly add/remove sources46 * 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 53 50 54 51 The 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. 55 52 56 53 === Older explanation, more technical, outdated locations === 57 58 54 In short: 59 55 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 56 1) 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 67 57 68 58 In long: 69 59 60 1) In the xgap_1_3_distro project, go to: handwritten -> java -> mydas -> DasServlet.java 70 61 71 1) 72 In the xgap_1_3_distro project, go to: 73 handwritten -> java -> mydas -> DasServlet.java 62 We 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); 74 63 75 We set the MIME type to indicate what we are serving: 76 response.setContentType("application/x-das-features+xml"); 64 This 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"); 77 65 78 After that we print data to the output stream: 79 printExample(out); 66 For an advanced example, see: handwritten -> java -> plugins -> matrixmanager -> MatrixManagerDownloadServlet.java 80 67 81 This servlet is mapped to the URL '/xgap_1_3_distro/das', see: 82 WebContent/WEB-INF/web.xml 68 2) 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 83 69 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"); 70 3) 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. 87 71 88 For an advanced example, see: 89 handwritten -> java -> plugins -> matrixmanager -> 90 MatrixManagerDownloadServlet.java 72 If 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); 91 73 74 4) 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 92 75 93 2) 94 Go to the Ensembl genome browser: 95 http://www.ensembl.org/index.html 76 And identify which parts of DAS and XGAP overlap. (XGAP datamodel basics: http://www.xgap.org/wiki/XgapDataModel) 96 77 97 To enter the view, select an organism, eg 'Human' 78 5) After we know what to serve out, we can build the servlet. I think it should look like this: 98 79 99 Now select: 100 Manage your data -> Custom data -> Attach DAS 80 * Depending on arguments, query a part of the current XGAP database 101 81 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) 105 83 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 106 87 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. 88 6) 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. 111 89 112 If you look at bit closer at the MatrixManager servlet you notice we 113 instantiate the database: 114 db = (JDBCDatabase) this.getDatabase(); 90 A customizable viewer that we should possibly use is Gbrowse: http://gmod.org/wiki/GBrowse 115 91 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 92 And then we can let biologists drool over pictures such as these :) http://gmod.org/w/images/b/b6/Gbrowse_screenshot1.gif