Difference between revisions of "Integration"
Thomas Admin (talk | contribs) |
Thomas Admin (talk | contribs) |
||
Line 33: | Line 33: | ||
+ | ==Present your data through a Java Web Start session (recommended)</h2>== | ||
+ | <a href="http://genomeview.org/manual/Session_files">This content was moved to the new manual</a> | ||
− | + | ==Present your data through a Java Web Start link== | |
<p>First of all you need to know the URL of a GenomeView installation. The default one, that is kept up to date by us is located at http://genomeview.org/start/launch.jnlp. For most integration works I would strongly suggest using this installation. | <p>First of all you need to know the URL of a GenomeView installation. The default one, that is kept up to date by us is located at http://genomeview.org/start/launch.jnlp. For most integration works I would strongly suggest using this installation. | ||
Line 56: | Line 58: | ||
− | + | ||
− | |||
<h3>Embedding GenomeView as an applet</h3> | <h3>Embedding GenomeView as an applet</h3> | ||
+ | <div style="color:red">Support for the applet version of GenomeView is currently on hold due to ever changing support from the various browser vendors. It is impossible to maintain any semblance of stability. All of the material below may or may not work.</div> | ||
The key code that needs to be included in the body of your web page is: | The key code that needs to be included in the body of your web page is: |
Revision as of 20:05, 15 November 2013
http://genomeview.org/content/integration
Other topics that may be of interest: <a href="/content/integrating-genomeview-editor">Integrating as editor</a> and <a href="/content/communicating-genomeview">Communicating with GenomeView</a>
This page tries to explain how to integrate GenomeView in your website with your data. You can either make it available through Java Webstart, or as an applet. Whenever possible we recommend using Java Web Start as it has better cross-platform and cross-browser support.
General considerations
To present your data in GenomeView optimally, there are a number of things you have to keep in mind.
Indexing
Please follow the recommendation in the recommended file formats page.
You will want to <a href="/content/preparing-fasta-files">index your reference sequence</a> to reduce loading times.
You may want to index annotation files, but this is not recommended unless they are over 10 Mb when compressed with gzip because you will loose structural information.
To load an indexed file, you point GenomeView to the main file and GenomeView will try to find the index by itself.
Compression
GenomeView supports GZIP compression transparently on all non-indexed file formats, i.e. compression and indexing are mutually exclusive. However as part of the indexing process, many file formats will be compressed.
Short read data
Depending on what information you want to get out of the visualization, there are basically two ways to load short read data. The first one is the <a href="/content/short-read-track">Short Read Track</a> which will give you a detailed view with all individual reads. The second one is the <a href="/content/pile-track">Pile up track</a> which will give a more of a summary view/ coverage plot based on your sequence reads.
<a href="/content/preparing-short-read-alignments">Instructions to prepare data for the short read track</a>
<a href="/content/preparing-pileup">Instructions to prepare data for the pile up track</a>
Present your data through a Java Web Start session (recommended)
<a href="http://genomeview.org/manual/Session_files">This content was moved to the new manual</a>
Present your data through a Java Web Start link
First of all you need to know the URL of a GenomeView installation. The default one, that is kept up to date by us is located at http://genomeview.org/start/launch.jnlp. For most integration works I would strongly suggest using this installation.
The next step is constructing your URL to load sequence and features. Below a sample URL, which will load some sequence with annotation and some short reads. It will start with the [100000,200000] region visible.
http://genomeview.org/start/launch.jnlp?--position 100000:200000 --url http://www.broadinstitute.org/software/genomeview/demo/c_elegans/IV.fasta http://www.broadinstitute.org/software/genomeview/demo/c_elegans/IV.gff.gz http://www.broadinstitute.org/software/genomeview/demo/c_elegans/uwgs-rw_L2_FC6218_3.CHROMOSOME_IV.sorted.bam.bai
<a href="http://genomeview.org/start/launch.jnlp?--position 100000:200000 --url http://www.broadinstitute.org/software/genomeview/demo/c_elegans/IV.fasta http://www.broadinstitute.org/software/genomeview/demo/c_elegans/IV.gff.gz http://www.broadinstitute.org/software/genomeview/demo/c_elegans/uwgs-rw_L2_FC6218_3.CHROMOSOME_IV.sorted.bam.bai">Start URL, right click to copy entire url</a>
Pasting this URL in your browser will start GenomeView with data from C. elegans loaded.
<a href="/content/command-line-options">Command line options</a> to GenomeView can be added after the question mark after the installation URL.
So the formalized version of the integration URL looks like this:
http://genomeview.org/start/launch.jnlp?[command line options for GenomeView seperated with spaces]
Important:You should use the JNLP file we provide as it will integrate the parameters into the start-up parameters of the webstart application.
Embedding GenomeView as an applet
The key code that needs to be included in the body of your web page is:
<script type="text/javascript" src="http://www.java.com/js/deployJava.js"></script> <script type="text/javascript" src="http://genomeview.org/start/genomeview.js"></script> <script type="text/javascript"> var gv_url = null; var gv_config = 'http://genomeview.org/jsdemo/democonfig.txt'; var gv_extra = null; var gv_location = null; startGV(gv_url,gv_location,gv_config,gv_extra,500,400); </script>
The gv_url
can be used to pre-load a reference sequence. This file will be loaded first and only then will GenomeView proceed with loading additional data.
The configuration file you want to use, can be specified using the gv_config
option.
All other data that you want to have loaded can be specified in a space separated list in gv_extra
. These data sets will be loaded in parallel.
The location that will initially be visible, can be set by gv_location
. The position is in the format <entry>:<start position>:<end position> The entry part is optional can be omitted in which case it becomes <start position>:<end position>
Note: we strongly recommend you use the genomeview.js we provide as that's the one we keep up to date with progressing releases.