Biojs.HpaSummaryFeatures 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
Component to represent Human Protein Atlas summary protein expression
information from a DAS XML
Version
1.0.0.
To get the above Biojs.HpaSummaryFeatures to work on your page, you need to do the following:
- Include the file Biojs.HpaSummaryFeatures.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/Biojs.HpaSummaryFeatures.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.HpaSummaryFeatures into.
window.onload = function() { var instance = new Biojs.HpaSummaryFeatures({ target: 'YourOwnDivId', hpaDasUrl: 'http://das.proteinatlas.org/das/proteinatlas/features?segment=Q9NTI5', width: '585px', imageWidth: '150px' }); };
Required Parameters
-
target | {string}
Identifier of the DIV tag where the component should be displayed.
-
hpaDasUrl | {string}
Url pointing to an XML including HPA infomration in DAS format
-
width | {string}
[900px] List of points including summary information for this feature
-
imageWidth | {string}
[200px] List of points including summary information for this feature
-
target | {string}
Identifier of the DIV tag where the component should be displayed.
-
title | {string}
Title of the summary
-
imageUrl | {string}
URL of an image file with expression data
-
imageTitle | {string}
Title or description of an image file with expression data
-
notes | {string}
List of point including summary information for this feature
-
linkUrl | {string}
List of points including summary information for this feature
-
linkTitle | {string}
List of points including summary information for this feature
-
width | {string}
[900px] List of points including summary information for this feature
-
imageWidth | {string}
[200px] List of points including summary information for this feature
Optional Parameters
-
proxyUrl | {string}
Since the same origin policy (http://en.wikipedia.org/wiki/Same_origin_policy) in the browsers Biojs include a proxy script in PHP which redirects Ajax requests from local to any other domain. You can use tour own proxy script by modifying this value.
Default: '../biojs/dependencies/proxy/proxy.php'
setHpaDasUrl
Set an URL with HPA DAS XML to start the query and visualization of HPA summary features
Parameters:
-
{string} hpaDasUrl
DAS XML with HPA summary information
Example 1:
instance.setHpaDasUrl("http://www.ebi.ac.uk/~rafael/web/copa/biojs/src/test/data/Q9NTI5_hpa_summary.xml");
Example 2:
instance.setHpaDasUrl("http://www.ebi.ac.uk/~rafael/web/copa/biojs/src/test/data/unknownsegment.xml");
onFeatureSelected
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}
type
The name of the event. -
{int}
textSelected
Selected text.
Example :
instance.onTextSelected(
function( objEvent ) {
alert(objEvent.textSelected);
}
);
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 );
}
);

