-
Notifications
You must be signed in to change notification settings - Fork 1
/
add_man_cur_ligfuncmap.js
41 lines (34 loc) · 1.33 KB
/
add_man_cur_ligfuncmap.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"use strict";
var add_man_cur_ligfuncmap = function (data) {
let resItems = [];
let resCat = ["FUNCTIONAL_MAPPING_LIGANDS", resItems];
let accession = __alignment.uniprot;
// chech if we can load annotations for this accession
if (__cvData == null) return;
if (__cvData.forEach) {
__cvData.forEach(function (track) {
if (track != null)
if (track.track_name == "Functional_mapping_Ligands") {
var data = track.data;
// console.log("->>> FUNCTIONAL_MAPPING_LIGANDS reading .__cvData.track");
if (track.data.forEach) {
track.data.forEach(function (feat) {
// console.log("->>> FUNCTIONAL_MAPPING_LIGANDS reading .__cvData.track.data.feat");
if (track.reference) {
var icon_link = "";
if (track.fav_icon) {
var icon_link = ' <img src="' + track.fav_icon + '" width="16" height="16">'
};
feat.description = feat.description + '<br><br><b>Data source:</b>'
+ icon_link
+ ' <a href="' + track.reference + '" target="_blank">' + track.reference + '</a>'
};
resItems.push(feat);
});
};
};
});
};
data.push(resCat);
};
module.exports = add_man_cur_ligfuncmap;