Mercurial > repos > eduardo > annotateviz
comparison static/trinotateviz.html @ 0:7537482eed36 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/annotateviz commit 9bbaa3eacc76ff3bf2b6da313cc0d85705f15dd1-dirty
| author | eduardo |
|---|---|
| date | Sat, 17 Jun 2017 13:31:06 -0400 |
| parents | |
| children | 31e855c95936 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:7537482eed36 |
|---|---|
| 1 <!doctype html> | |
| 2 <html ng-app="app"> | |
| 3 <head> | |
| 4 <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.js"></script> | |
| 5 <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-touch.js"></script> | |
| 6 <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular-animate.js"></script> | |
| 7 <script src="http://ui-grid.info/docs/grunt-scripts/csv.js"></script> | |
| 8 <script src="http://ui-grid.info/docs/grunt-scripts/pdfmake.js"></script> | |
| 9 <script src="http://ui-grid.info/docs/grunt-scripts/vfs_fonts.js"></script> | |
| 10 <script src="https://cdn.rawgit.com/angular-ui/bower-ui-grid/master/ui-grid.min.js"></script> | |
| 11 <link rel="stylesheet" href="https://cdn.rawgit.com/angular-ui/bower-ui-grid/master/ui-grid.min.css" type="text/css"> | |
| 12 <link rel="stylesheet" href="main.css" type="text/css"> | |
| 13 <link rel="stylesheet" type="text/css" href="css/genome.css"> | |
| 14 </head> | |
| 15 <body> | |
| 16 | |
| 17 <div ng-controller="MainCtrl"> | |
| 18 | |
| 19 <div ui-grid="gridOptions" ui-grid-pagination ui-grid-grouping ui-grid-exporter class="grid"></div> | |
| 20 </div> | |
| 21 | |
| 22 <div id="GenomeBrowser" style="height: 100%; width: 100%; padding: 0; border: 0;"></div> | |
| 23 <div style="display: none">JBrowseDefaultMainPage</div> | |
| 24 | |
| 25 | |
| 26 <script type="text/javascript"> | |
| 27 <script type="text/javascript"> | |
| 28 // jshint unused: false | |
| 29 var dojoConfig = { | |
| 30 async: true, | |
| 31 baseUrl: './src', | |
| 32 has: { | |
| 33 'host-node': false // Prevent dojo from being fooled by Electron | |
| 34 } | |
| 35 }; | |
| 36 // Move Electron's require out before loading Dojo | |
| 37 if(window.process&&process.versions&&process.versions.electron) { | |
| 38 window.electronRequire = require; | |
| 39 delete window.require; | |
| 40 } | |
| 41 </script> | |
| 42 <script type="text/javascript" src="src/dojo/dojo.js"></script> | |
| 43 <script type="text/javascript" src="src/JBrowse/init.js"></script> | |
| 44 <script type="text/javascript"> | |
| 45 var hdaId = 'input_db' //for source for grid data | |
| 46 window.onerror=function(msg){ | |
| 47 if( document.body ) | |
| 48 document.body.setAttribute("JSError",msg); | |
| 49 } | |
| 50 | |
| 51 // puts the main Browser object in this for convenience. feel | |
| 52 // free to move it into function scope if you want to keep it | |
| 53 // out of the global namespace | |
| 54 var JBrowse; | |
| 55 require(['JBrowse/Browser', 'dojo/io-query', 'dojo/json' ], | |
| 56 function (Browser,ioQuery,JSON) { | |
| 57 // the initial configuration of this JBrowse | |
| 58 // instance | |
| 59 | |
| 60 // NOTE: this initial config is the same as any | |
| 61 // other JBrowse config in any other file. this | |
| 62 // one just sets defaults from URL query params. | |
| 63 // If you are embedding JBrowse in some other app, | |
| 64 // you might as well just set this initial config | |
| 65 // to something like { include: '../my/dynamic/conf.json' }, | |
| 66 // or you could put the entire | |
| 67 // dynamically-generated JBrowse config here. | |
| 68 | |
| 69 // parse the query vars in the page URL | |
| 70 var queryParams = ioQuery.queryToObject( window.location.search.slice(1) ); | |
| 71 | |
| 72 var config = { | |
| 73 containerID: "GenomeBrowser", | |
| 74 | |
| 75 dataRoot: queryParams.data, | |
| 76 queryParams: queryParams, | |
| 77 location: queryParams.loc, | |
| 78 forceTracks: queryParams.tracks, | |
| 79 initialHighlight: queryParams.highlight, | |
| 80 show_nav: queryParams.nav, | |
| 81 show_tracklist: queryParams.tracklist, | |
| 82 show_overview: queryParams.overview, | |
| 83 show_menu: queryParams.menu, | |
| 84 show_tracklabels: queryParams.tracklabels, | |
| 85 highResolutionMode: queryParams.highres, | |
| 86 stores: { url: { type: "JBrowse/Store/SeqFeature/FromConfig", features: [] } }, | |
| 87 makeFullViewURL: function( browser ) { | |
| 88 | |
| 89 // the URL for the 'Full view' link | |
| 90 // in embedded mode should be the current | |
| 91 // view URL, except with 'nav', 'tracklist', | |
| 92 // and 'overview' parameters forced to 1. | |
| 93 | |
| 94 return browser.makeCurrentViewURL({ nav: 1, tracklist: 1, overview: 1 }); | |
| 95 }, | |
| 96 updateBrowserURL: true | |
| 97 }; | |
| 98 | |
| 99 //if there is ?addFeatures in the query params, | |
| 100 //define a store for data from the URL | |
| 101 if( queryParams.addFeatures ) { | |
| 102 config.stores.url.features = JSON.parse( queryParams.addFeatures ); | |
| 103 } | |
| 104 | |
| 105 // if there is ?addTracks in the query params, add | |
| 106 // those track configurations to our initial | |
| 107 // configuration | |
| 108 if( queryParams.addTracks ) { | |
| 109 config.tracks = JSON.parse( queryParams.addTracks ); | |
| 110 } | |
| 111 | |
| 112 // if there is ?addStores in the query params, add | |
| 113 // those store configurations to our initial | |
| 114 // configuration | |
| 115 if( queryParams.addStores ) { | |
| 116 config.stores = JSON.parse( queryParams.addStores ); | |
| 117 } | |
| 118 | |
| 119 // create a JBrowse global variable holding the JBrowse instance | |
| 120 JBrowse = new Browser( config ); | |
| 121 }); | |
| 122 </script> | |
| 123 | |
| 124 | |
| 125 | |
| 126 </script> | |
| 127 <script src="gff_app.js"></script> | |
| 128 </body> | |
| 129 </html> |
