| | 55 | |
| | 56 | === Older explanation, more technical, outdated locations === |
| | 57 | |
| | 58 | In short: |
| | 59 | |
| | 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 | |
| | 67 | |
| | 68 | In long: |
| | 69 | |
| | 70 | |
| | 71 | 1) |
| | 72 | In the xgap_1_3_distro project, go to: |
| | 73 | handwritten -> java -> mydas -> DasServlet.java |
| | 74 | |
| | 75 | We set the MIME type to indicate what we are serving: |
| | 76 | response.setContentType("application/x-das-features+xml"); |
| | 77 | |
| | 78 | After that we print data to the output stream: |
| | 79 | printExample(out); |
| | 80 | |
| | 81 | This servlet is mapped to the URL '/xgap_1_3_distro/das', see: |
| | 82 | WebContent/WEB-INF/web.xml |
| | 83 | |
| | 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"); |
| | 87 | |
| | 88 | For an advanced example, see: |
| | 89 | handwritten -> java -> plugins -> matrixmanager -> |
| | 90 | MatrixManagerDownloadServlet.java |
| | 91 | |
| | 92 | |
| | 93 | 2) |
| | 94 | Go to the Ensembl genome browser: |
| | 95 | http://www.ensembl.org/index.html |
| | 96 | |
| | 97 | To enter the view, select an organism, eg 'Human' |
| | 98 | |
| | 99 | Now select: |
| | 100 | Manage your data -> Custom data -> Attach DAS |
| | 101 | |
| | 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 |
| | 105 | |
| | 106 | |
| | 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. |
| | 111 | |
| | 112 | If you look at bit closer at the MatrixManager servlet you notice we |
| | 113 | instantiate the database: |
| | 114 | db = (JDBCDatabase) this.getDatabase(); |
| | 115 | |
| | 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 |