Class Biojs.ProteinPortafolio
Version
1.0.0.
Extends
Biojs.
Defined in: Biojs.ProteinPortafolio.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Biojs.ProteinPortafolio(options)
ProteinPortafolio component shows the description of a protein as well as its PDB alignments if there is any.
|
| Field Attributes | Field Name and Description |
|---|---|
| <inner> |
Array containing the supported event names
|
| <inner> |
Default values for the options
|
| Method Attributes | Method Name and Description |
|---|---|
|
constructor(options)
|
|
|
getAlignmentsByPdb(pdb)
Get the available alignments for the current protein filtered by selection (PDB files containing a part of the requested region).
|
|
|
setProtein(accession)
Sets the protein accession which changes everything to reflect the new protein information
|
|
|
setSize(size)
Change the font size.
|
- Methods borrowed from class Biojs:
- addListener, extend, getId, listen, raiseEvent, setEventHandlers, setOptions
| Event Attributes | Event Name and Description |
|---|---|
|
onClick(actionPerformed)
|
|
|
onPdbSelected(actionPerformed)
|
Class Detail
Biojs.ProteinPortafolio(options)
ProteinPortafolio component shows the description of a protein as well as its PDB alignments if there is any.
Component shows the PDBLogos of the selected alignment and ables to play with the sequence and
the 3D draw of the alignment.
Author: John Gomez.
Author: John Gomez.
var instance = new Biojs.ProteinPortafolio({
target : "YourOwnDivId",
accession : 'P99999'
});
- Parameters:
- {Object} options
- An object with the options for ProteinPortafolio component.
- Options detailed:
- {string} target
- Identifier of the DIV tag where the component should be displayed.
- {string} [fontFamily='"Andale
- mono", courier, monospace'] Font list to be applied to the component content.
- {string} [fontColor="white"]
- HTML color code for the font.
- {string} [backgroundColor="#7BBFE9"]
- Background color for the entire div content.
- {Object} [selectionFontColor="white"]
- This color will be used to change the font color of selected text.
- {Object} [
- selectionBackgroundColor="yellow"] This color will be used to change the background of selected text.
- {string} [pdb3DIcon='../biojs/css/images/3d.png']
- The only PDB icon is able to defines the 3D structure. Set source URL for 3D icon
Field Detail
<inner>
eventTypes
Array containing the supported event names
<inner>
opt
Default values for the options
Method Detail
constructor(options)
- Parameters:
- options
{Object}
getAlignmentsByPdb(pdb)
Get the available alignments for the current protein filtered by selection (PDB files containing a part of the requested region).
// Get the alignments matching with bases 4, 8 and 100.
alert ( instance.getAlignmentsByPdb("2F73") );
- Parameters:
- {string} pdb
- identifier.
- Returns:
- {Object} .
getCurrentAlignment()
setProtein(accession)
Sets the protein accession which changes everything to reflect the new protein information
instance.setProtein("P07148");
instance.setProtein("P12345");
- Parameters:
- {string} accession
- The new protein identifier
setSize(size)
Change the font size. Do nothing it no value is provided.
instance.setSize("72px");
- Parameters:
- {string} size Optional
- The new font size in pixels.
Event Detail
onClick(actionPerformed)
instance.onClick(
function( objEvent ) {
alert("The character " + objEvent.selected + " was clicked.");
}
);
- Parameters:
- {function} actionPerformed
- A function which receives an Biojs.Event object as argument.
- Event object data:
- {Object} source
- The component which did triggered the event.
- {string} type
- The name of the event.
- {int} selected
- Selected character.
onPdbSelected(actionPerformed)
instance.onPdbSelected(
function( e ) {
alert("Selected " + e.alignmentId + " alignment.");
}
);
- Parameters:
- {function} actionPerformed
- A function which receives an Biojs.Event object as argument.
- Event object data:
- {Object} source
- The component which did triggered the event.
- {string} alignmentId
- Identifier .
- {string} pdbId
- Selected pdb entry.
- {int} start
- Start position of the alignment.
- {int} end
- End position of the alignment.