Biojs.GeneExpressionSummary showcase
PLEASE NOTE: the above example is being affected by the CSS rules of this site. Click on 'view in window' to see the component by using its own CSS stylesheet(s) only.
View in windowOverview
Gene expression summary
Version
1.0.0.
To get the above Biojs.GeneExpressionSummary to work on your page, you need to do the following:
- Include the file Biojs.GeneExpressionSummary.js and its dependencies to your page header.
Biojs scripts
<script language="JavaScript" type="text/javascript" src="src/Biojs.js">
External script(s)
<script language="JavaScript" type="text/javascript" src="../biojs/dependencies/jquery/jquery-1.6.4.js">
CSS stylesheet(s)
<link href="../biojs/css/GeneExpressionSummary.css" rel="stylesheet" type="text/css" />
- Create a div tag which holds an unique identifier.
<body> ... <div id="YourOwnDivId" /> ... </body>
- Create a code snippet within a <script> tag and instance Biojs.GeneExpressionSummary into.
window.onload = function() { var instance = new Biojs.GeneExpressionSummary({ target: 'YourOwnDivId', identifier: 'ENSG00000066279' }); };
Required Parameters
-
target | {string}
Identifier of the DIV tag where the component should be displayed.
-
identifier | {string}
ENSEMBL gene identifier or UniProt Acc needed as input to fetch the Gene expression summary data
Optional Parameters
-
featuresUrl | {string}
Url of the REST service which provides the summary data.
Default: 'http://www-test.ebi.ac.uk/gxa/das/s4/features' -
legend | {string}
Option to display the provenance legend.
Default: true -
proxyUrl | {string}
This component needs to request data from a web service. To bypass the same origin policy (http://en.wikipedia.org/wiki/Same_origin_policy) this component needs a proxy. You could use your own proxy by modifying this value or one of the BioJS proxies: '../biojs/dependencies/proxy/proxy.php' or '../biojs/dependencies/proxy/proxy.jsp'
Default: '../biojs/dependencies/proxy/proxy.php'
setIdentifier
Fetch the data by means of identifier.
Parameters:
-
{string} identifier
The segment identifier.
Example 1:
instance.setIdentifier("ENSG00000100867");
Example 2:
instance.setIdentifier("Q61171");
Example 3:
instance.setIdentifier("ENSG000000000000");
Example 4:
instance.setIdentifier("P00000");
onDbError
Parameters:
-
{function} actionPerformed
A function which receives an Biojs.Event object as argument.
Returned data in the Biojs.Event object:
-
{Object}
source
The component which did triggered the event. -
{string}
file
The name of the loaded file. -
{string}
result
A string with either value 'success' or 'failure'. -
{string}
message
Error message in case of result be 'failure'.
Example :
instance.onDbError( function( e ) { alert( e.message ); } );
onRequestError
Parameters:
-
{function} actionPerformed
A function which receives an Biojs.Event object as argument.
Returned data in the Biojs.Event object:
-
{Object}
source
The component which did triggered the event. -
{string}
file
The name of the loaded file. -
{string}
result
A string with either value 'success' or 'failure'. -
{string}
message
Error message in case of result be 'failure'.
Example :
instance.onRequestError( function( e ) { alert( e.message ); } );