Difference between revisions of "Integration"
Thomas Admin (talk | contribs) |
Thomas Admin (talk | contribs) (Undo revision 13006 by 151.252.42.26 (talk)) |
||
(11 intermediate revisions by 6 users not shown) | |||
Line 47: | Line 47: | ||
The formalized version of the integration URL looks like this: | The formalized version of the integration URL looks like this: | ||
− | http://genomeview.org/start/launch.jnlp?[command line options for GenomeView | + | http://genomeview.org/start/launch.jnlp?[command line options for GenomeView separated with spaces] |
Line 56: | Line 56: | ||
The basic set-up to start GenomeView with a [[session file]] is | The basic set-up to start GenomeView with a [[session file]] is | ||
− | http://genomeview.org/start/launch.jnlp?--session <URL to the session file> | + | <nowiki>http://genomeview.org/start/launch.jnlp?--session <URL to the session file></nowiki> |
For example | For example | ||
[http://genomeview.org/start/launch.jnlp?--session%20http://www.broadinstitute.org/software/genomeview/genomes/mtb_h37rv_v2/session.php http://genomeview.org/start/launch.jnlp?--session http://www.broadinstitute.org/software/genomeview/genomes/mtb_h37rv_v2/session.php] | [http://genomeview.org/start/launch.jnlp?--session%20http://www.broadinstitute.org/software/genomeview/genomes/mtb_h37rv_v2/session.php http://genomeview.org/start/launch.jnlp?--session http://www.broadinstitute.org/software/genomeview/genomes/mtb_h37rv_v2/session.php] | ||
− | |||
− | |||
− | |||
− | |||
==Embedding GenomeView as an applet== | ==Embedding GenomeView as an applet== |
Latest revision as of 16:10, 3 June 2014
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 link
The fastest and simplest way to get started and with integrating GenomeView with your data is by directly constructing a webstart link.
The default launch URL is located at http://genomeview.org/start/launch.jnlp. If you require a specific version, there are stable URLs available from the supported versions page.
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
Pasting this URL in your browser will start GenomeView with data from C. elegans loaded.
Command line options to GenomeView can be added after the question mark after the installation URL.
The formalized version of the integration URL looks like this:
http://genomeview.org/start/launch.jnlp?[command line options for GenomeView separated 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.
Present your data through a Java Web Start session (recommended)
A session file is a text file that contains instructions for GenomeView on which data to load and how to configure itself.
The basic set-up to start GenomeView with a session file is
http://genomeview.org/start/launch.jnlp?--session <URL to the session file>
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.