Class Index | File Index

Classes


Namespace draw_symbols


Defined in: naview.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Generates text data based on text plotting rules syntax.
Namespace Detail
draw_symbols
Generates text data based on text plotting rules syntax.
Text data object syntax examples:
{
"text": "text to be drawn" //text to be drawn
"positioning": {
"type": "absolute" //for specific text drawing coordinates
"x": number //x positioning on svg
"y": number //y positioning on svg
},
"fill": "text color" //text color. when absent, defaults froms style object are used
"font_style": "normal" //normal, italic or bold. when absent, defaults froms style object are used
"font_size": number //size of font. when absent, defaults froms style object are used
"font_family": Arial //font family. when absent, defaults froms style object are used
}

positioning anchored to a given residue/protein element is also possible:

{
"text": "text to be drawn" //text to be drawn
"positioning": {
"type": "residue_or_element" //for text drawing coordinates centered to an element selection
"reference": 5 // examples include: 5, W5, DomainI;Helix4, and all possible objects with a centroid
"dx": number // optional: number of pixels to move from reference centroid in the horizontal axis
"dy": number // optional: number of pixels to move from reference centroid in the vertical axis
}
...
}
drawing a residue name, id and properties is also possible when reference indicates a residue:
{
"props": ["residue_attribute", "random_string", "residue_property"]
"positioning": {

"type": "residue_or_element" //for text drawing coordinates centered to an element selection
"reference": 5
...
}
...
}
residue properties include one and three letter names ("res_1" and "res_3"), residue index in protein ("res_ind")
random strings such as ",", " ", ": " are summed to attributes and properties
Parameters:
{Array} symbols_data
array of objects including text data to be drawn
{Object} centroid_data
dictionary of valid residue indexes and protein element names
{Object} property_data
dictionary of properties per each valid residue indexes
{Ibject} full_protein_data
parsed protein data generated from processRawUniProt
See:
convertToResInd
whereIsResIdElName
draw_text_symbols

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Sep 08 2021 09:00:35 GMT-0300 (BRT)