icn3d 3.30.0 → 3.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/icn3d.js +159 -39
- package/icn3d.min.js +5 -5
- package/icn3d.module.js +159 -39
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -11995,12 +11995,69 @@ class SetDialog {
|
|
|
11995
11995
|
|
|
11996
11996
|
group2tpl['Other'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'ECadherin_4zt1A_human_n2', 'LaminAC_1ifrA_human', 'ORF7a_1xakA_virus'];
|
|
11997
11997
|
|
|
11998
|
+
let tpl2strandsig = {};
|
|
11999
|
+
tpl2strandsig['ASF1A_2iijA_human'] = "A A' B C C' E F G G+";
|
|
12000
|
+
tpl2strandsig['B2Microglobulin_7phrL_human_C1'] = "A B C C' D E F G";
|
|
12001
|
+
tpl2strandsig['BArrestin1_4jqiA_rat_n1'] = "A- A A' B C C' E F G";
|
|
12002
|
+
tpl2strandsig['BTLA_2aw2A_human_Iset'] = "A A' B C C' D E F G";
|
|
12003
|
+
tpl2strandsig['C3_2qkiD_human_n1'] = "A A' B C C' E F G";
|
|
12004
|
+
tpl2strandsig['CD19_6al5A_human_C2orV-n1'] = "A' B C C' D E F G";
|
|
12005
|
+
tpl2strandsig['CD28_1yjdC_human_V'] = "A A' B C C' C'' D E F G";
|
|
12006
|
+
tpl2strandsig['CD2_1hnfA_human_C2-n2'] = "A B C C' E F G";
|
|
12007
|
+
tpl2strandsig['CD2_1hnfA_human_V-n1'] = "A' B C C' C'' D E F G";
|
|
12008
|
+
tpl2strandsig['CD3d_6jxrd_human_Iset'] = "A B C D E F G";
|
|
12009
|
+
tpl2strandsig['CD3e_6jxrf_human_Iset'] = "A B C C' D E F G";
|
|
12010
|
+
tpl2strandsig['CD3g_6jxrg_human_Iset'] = "A B C C' E F G G+";
|
|
12011
|
+
tpl2strandsig['CD8a_1cd8A_human_V'] = "A A' B C C' C'' D E F G";
|
|
12012
|
+
tpl2strandsig['CoAtomerGamma1_1r4xA_human'] = "A- A B C D E F G";
|
|
12013
|
+
tpl2strandsig['Contactin1_2ee2A_human_FN3-n9'] = "A A' B C C' E F G";
|
|
12014
|
+
tpl2strandsig['Contactin1_3s97C_human_C2-n2'] = "A A' B C D E F G";
|
|
12015
|
+
tpl2strandsig['CuZnSuperoxideDismutase_1hl5C_human'] = "A- A B C C' E F G";
|
|
12016
|
+
tpl2strandsig['ECadherin_4zt1A_human_n2'] = "A' B C D E F G";
|
|
12017
|
+
tpl2strandsig['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = "A--- A-- A- A B C C' C'' D E F G";
|
|
12018
|
+
tpl2strandsig['FAB-HEAVY_5esv_C1-n2'] = "A B C D E F G";
|
|
12019
|
+
tpl2strandsig['FAB-HEAVY_5esv_V-n1'] = "A B C C' C'' D E F G";
|
|
12020
|
+
tpl2strandsig['FAB-LIGHT_5esv_C1-n2'] = "A B C C' E F G";
|
|
12021
|
+
tpl2strandsig['FAB-LIGHT_5esv_V-n1'] = "A A' B C C' C'' D E F G";
|
|
12022
|
+
tpl2strandsig['GHR_1axiB_human_FN3-n1'] = "A B C C' D E F G";
|
|
12023
|
+
tpl2strandsig['ICOS_6x4gA_human_V'] = "A B C C' C'' D E F G";
|
|
12024
|
+
tpl2strandsig['IL6Rb_1bquB_human_FN3-n2'] = "A B C C' E F G";
|
|
12025
|
+
tpl2strandsig['IL6Rb_1bquB_human_FN3-n3'] = "A B C C' E F G";
|
|
12026
|
+
tpl2strandsig['InsulinR_8guyE_human_FN3-n1'] = "A B C C' E F G";
|
|
12027
|
+
tpl2strandsig['InsulinR_8guyE_human_FN3-n2'] = "A B C C' E F G";
|
|
12028
|
+
tpl2strandsig['IsdA_2iteA_bacteria'] = "A- A B C C' D E F G";
|
|
12029
|
+
tpl2strandsig['JAM1_1nbqA_human_VorIset-n2'] = "A A' B C C' D E F G";
|
|
12030
|
+
tpl2strandsig['LAG3_7tzgD_human_C2-n2'] = "A A' B C C' D E F G";
|
|
12031
|
+
tpl2strandsig['LAG3_7tzgD_human_V-n1'] = "A' B C C' D E F G";
|
|
12032
|
+
tpl2strandsig['LaminAC_1ifrA_human'] = "A- A B C C' E E+ F G";
|
|
12033
|
+
tpl2strandsig['MHCIa_7phrH_human_C1'] = "A B C C' D E F G";
|
|
12034
|
+
tpl2strandsig['MPT63_1lmiA_bacteria'] = "A-- A- A BC C' E F G";
|
|
12035
|
+
tpl2strandsig['NaCaExchanger_2fwuA_dog_n2'] = "A A' B C C' E F G";
|
|
12036
|
+
tpl2strandsig['NaKATPaseTransporterBeta_2zxeB_spurdogshark']= "A A' B C D E F G";
|
|
12037
|
+
tpl2strandsig['ORF7a_1xakA_virus'] = "A' B C D E F G";
|
|
12038
|
+
tpl2strandsig['PD1_4zqkB_human_V'] = "A A' B C C' D E F G";
|
|
12039
|
+
tpl2strandsig['PDL1_4z18B_human_V-n1'] = "A A' B C C' C'' D E F G";
|
|
12040
|
+
tpl2strandsig['Palladin_2dm3A_human_Iset-n1'] = "A A' B C C' D E F G";
|
|
12041
|
+
tpl2strandsig['RBPJ_6py8C_human_Unk-n1'] = "A A' B C C' E F G";
|
|
12042
|
+
tpl2strandsig['RBPJ_6py8C_human_Unk-n2'] = "A B C D E F G";
|
|
12043
|
+
tpl2strandsig['Sidekick2_1wf5A_human_FN3-n7'] = "A B C C' E F G";
|
|
12044
|
+
tpl2strandsig['Siglec3_5j0bB_human_C2-n2'] = "A A' B C D E F G";
|
|
12045
|
+
tpl2strandsig['TCRa_6jxrm_human_C1-n2'] = "A B C D E F G";
|
|
12046
|
+
tpl2strandsig['TCRa_6jxrm_human_V-n1'] = "A A' B C C' C'' D E F G";
|
|
12047
|
+
tpl2strandsig['TEAD1_3kysC_human'] = "A A+ A' B C C' E F G G+";
|
|
12048
|
+
tpl2strandsig['TP34_2o6cA_bacteria'] = "A- A B C C' D E F G";
|
|
12049
|
+
tpl2strandsig['TP47_1o75A_bacteria'] = "A B C C' D E F G";
|
|
12050
|
+
tpl2strandsig['Titin_4uowM_human_Unk-n152'] = "A A' B C C' D E F G";
|
|
12051
|
+
tpl2strandsig['VISTA_6oilA_human_V'] = "A A' B C C' C'' D E F G G+";
|
|
12052
|
+
tpl2strandsig['VNAR_1t6vN_shark_V'] = "A A' B C C' D E F G";
|
|
12053
|
+
tpl2strandsig['VTCN1_Q7Z7D3_human_V-n2'] = "A B C C' D E F G G+";
|
|
12054
|
+
|
|
11998
12055
|
let html = '';
|
|
11999
12056
|
for(let group in group2tpl) {
|
|
12000
12057
|
html += "<optgroup label='" + group + "'>";
|
|
12001
12058
|
for(let i = 0, il = group2tpl[group].length; i < il; ++i) {
|
|
12002
12059
|
let template = group2tpl[group][i];
|
|
12003
|
-
html += me.htmlCls.optionStr + "'" + template + "'>" + template + "</option>";
|
|
12060
|
+
html += me.htmlCls.optionStr + "'" + template + "'>" + template + ", Strands: " + tpl2strandsig[template] + "</option>";
|
|
12004
12061
|
}
|
|
12005
12062
|
html += "</optgroup>";
|
|
12006
12063
|
}
|
|
@@ -12388,6 +12445,7 @@ class Events {
|
|
|
12388
12445
|
me.htmlCls.HEIGHT = $( window ).height();
|
|
12389
12446
|
ic.applyCenterCls.setWidthHeight(me.htmlCls.WIDTH, me.htmlCls.HEIGHT);
|
|
12390
12447
|
ic.drawCls.draw();
|
|
12448
|
+
|
|
12391
12449
|
ic.resizeCanvasCls.openFullscreen($("#" + me.pre + "canvas")[0]);
|
|
12392
12450
|
});
|
|
12393
12451
|
|
|
@@ -26778,7 +26836,8 @@ class Axes {
|
|
|
26778
26836
|
createArrow(dir, origin, axisLen, color, headLength, headWidth, bGlycan) { let ic = this.icn3d, me = ic.icn3dui;
|
|
26779
26837
|
if(me.bNode) return;
|
|
26780
26838
|
|
|
26781
|
-
let coneGeometry = new THREE.CylinderBufferGeometry( 0, 0.5, 1, 32, 1 );
|
|
26839
|
+
// let coneGeometry = new THREE.CylinderBufferGeometry( 0, 0.5, 1, 32, 1 );
|
|
26840
|
+
let coneGeometry = new THREE.CylinderGeometry( 0, 0.5, 1, 32, 1 );
|
|
26782
26841
|
//coneGeometry.translate( 0, - 0.5, 0 );
|
|
26783
26842
|
coneGeometry.translate( 0, 0.5, 0 );
|
|
26784
26843
|
let material;
|
|
@@ -37931,10 +37990,15 @@ class AnnoIg {
|
|
|
37931
37990
|
if(!info) continue;
|
|
37932
37991
|
|
|
37933
37992
|
let tmscore = info.score;
|
|
37934
|
-
let igType = ic.ref2igtype[info.refpdbname];
|
|
37935
|
-
let confidance = (parseFloat(tmscore) < 0.75 ) ? '?' : '';
|
|
37936
|
-
titleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
|
|
37937
|
-
fullTitleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
|
|
37993
|
+
// let igType = ic.ref2igtype[info.refpdbname];
|
|
37994
|
+
// let confidance = (parseFloat(tmscore) < 0.75 ) ? '?' : '';
|
|
37995
|
+
// titleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
|
|
37996
|
+
// fullTitleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
|
|
37997
|
+
|
|
37998
|
+
let igType = (parseFloat(tmscore) < 0.75 ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
|
|
37999
|
+
titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
|
|
38000
|
+
fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
|
|
38001
|
+
|
|
37938
38002
|
domainArray.push(igType);
|
|
37939
38003
|
|
|
37940
38004
|
let segs = [];
|
|
@@ -38196,6 +38260,7 @@ class AnnoDomain {
|
|
|
38196
38260
|
|
|
38197
38261
|
let result = ic.domain3dCls.c2b_NewSplitChain(atoms);
|
|
38198
38262
|
let subdomains = result.subdomains;
|
|
38263
|
+
let pos2resi = result.pos2resi;
|
|
38199
38264
|
//let substruct = result.substruct;
|
|
38200
38265
|
//let jsonStr = ic.domain3dCls.getDomainJsonForAlign(atoms);
|
|
38201
38266
|
|
|
@@ -38210,6 +38275,8 @@ class AnnoDomain {
|
|
|
38210
38275
|
|
|
38211
38276
|
data.domains[chainid].domains.push(domain);
|
|
38212
38277
|
}
|
|
38278
|
+
|
|
38279
|
+
data.domains[chainid].pos2resi = pos2resi;
|
|
38213
38280
|
}
|
|
38214
38281
|
}
|
|
38215
38282
|
|
|
@@ -38246,7 +38313,7 @@ class AnnoDomain {
|
|
|
38246
38313
|
let html = '<div id="' + ic.pre + chnid + '_domainseq_sequence" class="icn3d-dl_sequence">';
|
|
38247
38314
|
let html2 = html;
|
|
38248
38315
|
let html3 = html;
|
|
38249
|
-
let domainArray, proteinname;
|
|
38316
|
+
let domainArray, pos2resi, proteinname;
|
|
38250
38317
|
let pos = chnid.indexOf('_');
|
|
38251
38318
|
let chain = chnid.substr(pos + 1);
|
|
38252
38319
|
// MMDB symmetry chain has the form of 'A1'
|
|
@@ -38254,9 +38321,11 @@ class AnnoDomain {
|
|
|
38254
38321
|
chain = chain.substr(0, chain.length - 1);
|
|
38255
38322
|
}
|
|
38256
38323
|
|
|
38257
|
-
if(bCalcDirect) {
|
|
38324
|
+
// if(bCalcDirect) {
|
|
38258
38325
|
proteinname = chnid;
|
|
38259
38326
|
domainArray = (data.domains[chnid]) ? data.domains[chnid].domains : [];
|
|
38327
|
+
pos2resi = data.domains[chnid].pos2resi;
|
|
38328
|
+
/*
|
|
38260
38329
|
}
|
|
38261
38330
|
else {
|
|
38262
38331
|
let molinfo = data.moleculeInfor;
|
|
@@ -38275,6 +38344,7 @@ class AnnoDomain {
|
|
|
38275
38344
|
domainArray = [];
|
|
38276
38345
|
}
|
|
38277
38346
|
}
|
|
38347
|
+
*/
|
|
38278
38348
|
|
|
38279
38349
|
for(let index = 0, indexl = domainArray.length; index < indexl; ++index) {
|
|
38280
38350
|
//var fulltitle = '3D domain ' +(index+1).toString() + ' of ' + proteinname + '(PDB ID: ' + data.pdbId + ')';
|
|
@@ -38283,13 +38353,14 @@ class AnnoDomain {
|
|
|
38283
38353
|
let subdomainArray = domainArray[index].intervals;
|
|
38284
38354
|
// remove duplicate, e.g., at https://www.ncbi.nlm.nih.gov/Structure/mmdb/mmdb_strview.cgi?v=2&program=icn3d&domain&molinfor&uid=1itw
|
|
38285
38355
|
let domainFromHash = {}, domainToHash = {};
|
|
38286
|
-
let fromArray = [], toArray = [];
|
|
38356
|
+
let fromArray = [], toArray = [], posFromArray = [], posToArray = [];
|
|
38287
38357
|
let resiHash = {};
|
|
38288
38358
|
let resCnt = 0;
|
|
38289
38359
|
|
|
38290
38360
|
for(let i = 0, il = subdomainArray.length; i < il; ++i) {
|
|
38291
38361
|
let domainFrom = Math.round(subdomainArray[i][0]) - 1; // convert 1-based to 0-based
|
|
38292
38362
|
let domainTo = Math.round(subdomainArray[i][1]) - 1;
|
|
38363
|
+
|
|
38293
38364
|
if(domainFromHash.hasOwnProperty(domainFrom) || domainToHash.hasOwnProperty(domainTo)) {
|
|
38294
38365
|
continue; // do nothing for duplicated "from" or "to", e.g, PDBID 1ITW, 5FWI
|
|
38295
38366
|
}
|
|
@@ -38300,8 +38371,11 @@ class AnnoDomain {
|
|
|
38300
38371
|
|
|
38301
38372
|
// use the NCBI residue number, and convert to PDB residue number during selection
|
|
38302
38373
|
// if(ic.bNCBI || bCalcDirect) {
|
|
38303
|
-
fromArray.push(domainFrom);
|
|
38304
|
-
toArray.push(domainTo);
|
|
38374
|
+
fromArray.push(pos2resi[domainFrom]);
|
|
38375
|
+
toArray.push(pos2resi[domainTo]);
|
|
38376
|
+
|
|
38377
|
+
posFromArray.push(domainFrom);
|
|
38378
|
+
posToArray.push(domainTo);
|
|
38305
38379
|
// }
|
|
38306
38380
|
// else {
|
|
38307
38381
|
// fromArray.push(domainFrom + ic.baseResi[chnid]);
|
|
@@ -38310,7 +38384,9 @@ class AnnoDomain {
|
|
|
38310
38384
|
|
|
38311
38385
|
resCnt += domainTo - domainFrom + 1;
|
|
38312
38386
|
for(let j = domainFrom; j <= domainTo; ++j) {
|
|
38313
|
-
resiHash[j+1] = 1;
|
|
38387
|
+
// resiHash[j+1] = 1;
|
|
38388
|
+
let resi = pos2resi[j];
|
|
38389
|
+
resiHash[resi] = 1;
|
|
38314
38390
|
}
|
|
38315
38391
|
}
|
|
38316
38392
|
|
|
@@ -38320,20 +38396,21 @@ class AnnoDomain {
|
|
|
38320
38396
|
|
|
38321
38397
|
if(!ic.resid2domain) ic.resid2domain = {};
|
|
38322
38398
|
if(!ic.resid2domain[chnid]) ic.resid2domain[chnid] = [];
|
|
38323
|
-
for(let i = 0, il =
|
|
38324
|
-
let from = parseInt(
|
|
38325
|
-
let to = parseInt(
|
|
38399
|
+
for(let i = 0, il = posFromArray.length; i < il; ++i) {
|
|
38400
|
+
let from = parseInt(posFromArray[i]);
|
|
38401
|
+
let to = parseInt(posToArray[i]);
|
|
38326
38402
|
for(let j = from; j <= to; ++j) {
|
|
38327
38403
|
// 0-based
|
|
38328
38404
|
let obj = {};
|
|
38329
|
-
let resi = ic.ParserUtilsCls.getResi(chnid, j);
|
|
38405
|
+
// let resi = ic.ParserUtilsCls.getResi(chnid, j);
|
|
38406
|
+
let resi = pos2resi[j];
|
|
38330
38407
|
obj[chnid + '_' + resi] = domainName;
|
|
38331
38408
|
ic.resid2domain[chnid].push(obj);
|
|
38332
38409
|
}
|
|
38333
38410
|
}
|
|
38334
38411
|
}
|
|
38335
38412
|
|
|
38336
|
-
let htmlTmp2 = '<div class="icn3d-seqTitle icn3d-link icn3d-blue" 3ddomain="' +(index+1).toString() + '" from="' +
|
|
38413
|
+
let htmlTmp2 = '<div class="icn3d-seqTitle icn3d-link icn3d-blue" 3ddomain="' +(index+1).toString() + '" from="' + posFromArray + '" to="' + posToArray + '" shorttitle="' + title + '" index="' + index + '" setname="' + chnid + '_3d_domain_' +(index+1).toString() + '" anno="sequence" chain="' + chnid + '" title="' + fulltitle + '">' + title + ' </div>';
|
|
38337
38414
|
let htmlTmp3 = '<span class="icn3d-residueNum" title="residue count">' + resCnt.toString() + ' Res</span>';
|
|
38338
38415
|
html3 += htmlTmp2 + htmlTmp3 + '<br>';
|
|
38339
38416
|
let htmlTmp = '<span class="icn3d-seqLine">';
|
|
@@ -38347,7 +38424,8 @@ class AnnoDomain {
|
|
|
38347
38424
|
html += ic.showSeqCls.insertGap(chnid, i, '-');
|
|
38348
38425
|
//if(i >= domainFrom && i <= domainTo) {
|
|
38349
38426
|
let resi = ic.ParserUtilsCls.getResi(chnid, i);
|
|
38350
|
-
|
|
38427
|
+
// if(resiHash.hasOwnProperty(i+1)) {
|
|
38428
|
+
if(resiHash.hasOwnProperty(resi)) {
|
|
38351
38429
|
let cFull = ic.giSeq[chnid][i];
|
|
38352
38430
|
let c = cFull;
|
|
38353
38431
|
if(cFull.length > 1) {
|
|
@@ -38372,12 +38450,12 @@ class AnnoDomain {
|
|
|
38372
38450
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
|
|
38373
38451
|
|
|
38374
38452
|
if(me.cfg.blast_rep_id != chnid) { // regular
|
|
38375
|
-
for(let i = 0, il =
|
|
38453
|
+
for(let i = 0, il = posFromArray.length; i < il; ++i) {
|
|
38376
38454
|
// let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i] - ic.baseResi[chnid] - 1) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
|
|
38377
|
-
let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(
|
|
38455
|
+
let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(posFromArray[i]) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(posFromArray[i] - posToArray[i-1] - 1) / ic.maxAnnoLength);
|
|
38378
38456
|
|
|
38379
38457
|
html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;"> </div>';
|
|
38380
|
-
html2 += '<div style="display:inline-block; color:white!important; font-weight:bold; background-color:#' + color + '; width:' + Math.round(ic.seqAnnWidth *(
|
|
38458
|
+
html2 += '<div style="display:inline-block; color:white!important; font-weight:bold; background-color:#' + color + '; width:' + Math.round(ic.seqAnnWidth *(posToArray[i] - posFromArray[i] + 1) / ic.maxAnnoLength) + 'px;" class="icn3d-seqTitle icn3d-link icn3d-blue" 3ddomain="' +(index+1).toString() + '" from="' + posFromArray + '" to="' + posToArray + '" shorttitle="' + title + '" index="' + index + '" setname="' + chnid + '_3d_domain_' +(index+1).toString() + '" id="' + chnid + '_3d_domain_' + index + '" anno="sequence" chain="' + chnid + '" title="' + fulltitle + '">3D domain ' +(index+1).toString() + '</div>';
|
|
38381
38459
|
}
|
|
38382
38460
|
}
|
|
38383
38461
|
else { // with potential gaps
|
|
@@ -39911,7 +39989,7 @@ class Domain3d {
|
|
|
39911
39989
|
if(!ic.posid2resid) ic.posid2resid = {};
|
|
39912
39990
|
|
|
39913
39991
|
let substructItem = {};
|
|
39914
|
-
let pos2resi = {};
|
|
39992
|
+
let pos2resi = {}; // 0-based
|
|
39915
39993
|
for(let i = 0; i < residueArray.length; ++i) {
|
|
39916
39994
|
let resid = residueArray[i];
|
|
39917
39995
|
|
|
@@ -39943,7 +40021,8 @@ class Domain3d {
|
|
|
39943
40021
|
|
|
39944
40022
|
//resiArray.push(resi);
|
|
39945
40023
|
resiArray.push(i+1);
|
|
39946
|
-
pos2resi[i+1] = resi;
|
|
40024
|
+
// pos2resi[i+1] = resi;
|
|
40025
|
+
pos2resi[i] = resi;
|
|
39947
40026
|
|
|
39948
40027
|
ic.posid2resid[atom.structure + '_' + atom.chain + '_' + (i+1).toString()] = resid;
|
|
39949
40028
|
// let residNCBI = ic.resid2ncbi[resid];
|
|
@@ -39992,7 +40071,7 @@ class Domain3d {
|
|
|
39992
40071
|
// get a list of Calpha-Calpha contacts
|
|
39993
40072
|
///list< pair< pair< int, let >, let > >
|
|
39994
40073
|
let cts = this.c2b_AlphaContacts(seqLen, x0, y0, z0, dcut, resiArray);
|
|
39995
|
-
|
|
40074
|
+
|
|
39996
40075
|
//
|
|
39997
40076
|
// Produce a "map" of the SSEs, i.e. vec_sse[i] = 0 means residue i + 1
|
|
39998
40077
|
// is in a loop, and vec_sse[i] = k means residue i + 1 belongs to SSE
|
|
@@ -40465,8 +40544,8 @@ class Domain3d {
|
|
|
40465
40544
|
//ss: sstype ss_start ss_end x1 y1 z1 x2 y2 z2
|
|
40466
40545
|
//sstype: 1 (helix), 2 (sheet)
|
|
40467
40546
|
let sstype = (substruct[k].Sheet) ? 2 : 1;
|
|
40468
|
-
let from = pos2resi[substruct[k].From];
|
|
40469
|
-
let to = pos2resi[substruct[k].To];
|
|
40547
|
+
let from = pos2resi[substruct[k].From - 1]; // 1-based to 0-based
|
|
40548
|
+
let to = pos2resi[substruct[k].To - 1];
|
|
40470
40549
|
|
|
40471
40550
|
// 1-based residue numbers
|
|
40472
40551
|
let fromPos = substruct[k].From;
|
|
@@ -62415,6 +62494,27 @@ class LoadScript {
|
|
|
62415
62494
|
return nameArray;
|
|
62416
62495
|
}
|
|
62417
62496
|
|
|
62497
|
+
updateTransformation(steps) { let ic = this.icn3d; ic.icn3dui;
|
|
62498
|
+
let commandTransformation = (ic.commands[steps-1]) ? ic.commands[steps-1].split('|||') : [];
|
|
62499
|
+
|
|
62500
|
+
if(commandTransformation.length == 2) {
|
|
62501
|
+
let transformation = JSON.parse(commandTransformation[1]);
|
|
62502
|
+
|
|
62503
|
+
ic._zoomFactor = transformation.factor;
|
|
62504
|
+
|
|
62505
|
+
ic.mouseChange.x = transformation.mouseChange.x;
|
|
62506
|
+
ic.mouseChange.y = transformation.mouseChange.y;
|
|
62507
|
+
|
|
62508
|
+
ic.quaternion._x = transformation.quaternion._x;
|
|
62509
|
+
ic.quaternion._y = transformation.quaternion._y;
|
|
62510
|
+
ic.quaternion._z = transformation.quaternion._z;
|
|
62511
|
+
ic.quaternion._w = transformation.quaternion._w;
|
|
62512
|
+
}
|
|
62513
|
+
|
|
62514
|
+
// ic.bRender = true;
|
|
62515
|
+
ic.drawCls.draw();
|
|
62516
|
+
}
|
|
62517
|
+
|
|
62418
62518
|
async execCommandsBase(start, end, steps, bFinalStep) { let ic = this.icn3d, me = ic.icn3dui;
|
|
62419
62519
|
let thisClass = this;
|
|
62420
62520
|
let i;
|
|
@@ -62594,7 +62694,10 @@ class LoadScript {
|
|
|
62594
62694
|
await thisClass.applyCommandGraphinteraction(command);
|
|
62595
62695
|
}
|
|
62596
62696
|
else if(command.indexOf('cartoon 2d domain') == 0) {
|
|
62697
|
+
ic.bRender = true;
|
|
62698
|
+
thisClass.updateTransformation(steps);
|
|
62597
62699
|
await thisClass.applyCommandCartoon2d(command);
|
|
62700
|
+
ic.bRender = false;
|
|
62598
62701
|
}
|
|
62599
62702
|
else if(command.indexOf('set half pae map') == 0) {
|
|
62600
62703
|
await thisClass.applyCommandAfmap(command);
|
|
@@ -62609,7 +62712,10 @@ class LoadScript {
|
|
|
62609
62712
|
let pos = command.lastIndexOf(' ');
|
|
62610
62713
|
let type = command.substr(pos + 1);
|
|
62611
62714
|
|
|
62715
|
+
ic.bRender = true;
|
|
62716
|
+
thisClass.updateTransformation(steps);
|
|
62612
62717
|
await ic.cartoon2dCls.draw2Dcartoon(type);
|
|
62718
|
+
ic.bRender = false;
|
|
62613
62719
|
}
|
|
62614
62720
|
else if(command.indexOf('add msa track') == 0) {
|
|
62615
62721
|
//add msa track | chainid " + chainid + " | startpos " + startpos + " | type " + type + " | fastaList " + fastaList
|
|
@@ -62647,7 +62753,7 @@ class LoadScript {
|
|
|
62647
62753
|
await ic.applyCommandCls.applyCommand(ic.commands[i]);
|
|
62648
62754
|
}
|
|
62649
62755
|
}
|
|
62650
|
-
|
|
62756
|
+
|
|
62651
62757
|
//if(i === steps - 1) {
|
|
62652
62758
|
if(i === steps || bFinalStep) {
|
|
62653
62759
|
this.renderFinalStep(i);
|
|
@@ -67277,19 +67383,25 @@ class Dssp {
|
|
|
67277
67383
|
}
|
|
67278
67384
|
|
|
67279
67385
|
// 2b. remove strands with less than 3 residues except G strand
|
|
67386
|
+
let removeDomainidHash = {};
|
|
67280
67387
|
for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
|
|
67281
|
-
let strandTmp = strandArray[i].strand.substr(0, 1);
|
|
67388
|
+
// let strandTmp = strandArray[i].strand.substr(0, 1);
|
|
67389
|
+
let strandTmp = strandArray[i].strand;
|
|
67282
67390
|
if(strandTmp != 'G' && strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
|
|
67283
|
-
if(strandTmp == 'B' || strandTmp == 'C' || strandTmp == 'E' || strandTmp == 'F') {
|
|
67284
|
-
if(!me.bNode) console.log("Some of the Ig strands B, C, E, F are removed since they are too short...");
|
|
67285
|
-
return false;
|
|
67286
|
-
}
|
|
67287
|
-
|
|
67288
67391
|
if(i != il - 1) { // modify
|
|
67289
67392
|
strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
|
|
67290
67393
|
}
|
|
67291
67394
|
|
|
67292
67395
|
strandArray.splice(i, 1);
|
|
67396
|
+
|
|
67397
|
+
if(strandTmp == 'B' || strandTmp == 'C' || strandTmp == 'E' || strandTmp == 'F') {
|
|
67398
|
+
if(!me.bNode) console.log("Ig strand " + strandTmp + " is removed since it is too short...");
|
|
67399
|
+
|
|
67400
|
+
let resid = chnid + '_' + strandArray[i].startResi;
|
|
67401
|
+
let domainid = ic.resid2domainid[resid];
|
|
67402
|
+
removeDomainidHash[domainid] = 1;
|
|
67403
|
+
continue;
|
|
67404
|
+
}
|
|
67293
67405
|
}
|
|
67294
67406
|
}
|
|
67295
67407
|
|
|
@@ -67479,6 +67591,14 @@ class Dssp {
|
|
|
67479
67591
|
prevStrand = currStrand;
|
|
67480
67592
|
prevStrandCnt = strandCnt - 1;
|
|
67481
67593
|
|
|
67594
|
+
// remove domians without B,C,E,F strands
|
|
67595
|
+
if(removeDomainidHash.hasOwnProperty(domainid)) {
|
|
67596
|
+
delete ic.resid2refnum[residueid];
|
|
67597
|
+
delete ic.resid2domainid[residueid];
|
|
67598
|
+
|
|
67599
|
+
continue;
|
|
67600
|
+
}
|
|
67601
|
+
|
|
67482
67602
|
// assign the adjusted reference numbers
|
|
67483
67603
|
ic.resid2refnum[residueid] = refnumLabel;
|
|
67484
67604
|
ic.resid2domainid[residueid] = domainid;
|
|
@@ -70260,7 +70380,7 @@ class Cartoon2d {
|
|
|
70260
70380
|
idStr = idStr.substr(0, idStr.indexOf('-'));
|
|
70261
70381
|
}
|
|
70262
70382
|
else {
|
|
70263
|
-
idStr = idStr.substr(idStr.lastIndexOf('_') + 1);
|
|
70383
|
+
idStr = idStr; //idStr.substr(idStr.lastIndexOf('_') + 1);
|
|
70264
70384
|
}
|
|
70265
70385
|
|
|
70266
70386
|
return idStr;
|
|
@@ -70957,14 +71077,14 @@ class ResizeCanvas {
|
|
|
70957
71077
|
!document.webkitFullscreenElement && !document.msFullscreenElement) {
|
|
70958
71078
|
if(elem.requestFullscreen) {
|
|
70959
71079
|
elem.requestFullscreen();
|
|
70960
|
-
} else if(elem.mozRequestFullScreen) {
|
|
71080
|
+
} else if(elem.mozRequestFullScreen) { // Firefox
|
|
70961
71081
|
elem.mozRequestFullScreen();
|
|
70962
|
-
} else if(elem.webkitRequestFullscreen) {
|
|
71082
|
+
} else if(elem.webkitRequestFullscreen) { // Chrome, Safari and Opera
|
|
70963
71083
|
elem.webkitRequestFullscreen();
|
|
70964
|
-
} else if(elem.msRequestFullscreen) {
|
|
71084
|
+
} else if(elem.msRequestFullscreen) { // IE/Edge
|
|
70965
71085
|
elem.msRequestFullscreen();
|
|
70966
71086
|
}
|
|
70967
|
-
}
|
|
71087
|
+
}
|
|
70968
71088
|
}
|
|
70969
71089
|
|
|
70970
71090
|
//Rotate the structure in one of the directions: "left", "right", "up", and "down".
|
|
@@ -75655,7 +75775,7 @@ class iCn3DUI {
|
|
|
75655
75775
|
//even when multiple iCn3D viewers are shown together.
|
|
75656
75776
|
this.pre = this.cfg.divid + "_";
|
|
75657
75777
|
|
|
75658
|
-
this.REVISION = '3.30.
|
|
75778
|
+
this.REVISION = '3.30.1';
|
|
75659
75779
|
|
|
75660
75780
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
75661
75781
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|