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.module.js
CHANGED
|
@@ -12896,12 +12896,69 @@ class SetDialog {
|
|
|
12896
12896
|
|
|
12897
12897
|
group2tpl['Other'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'ECadherin_4zt1A_human_n2', 'LaminAC_1ifrA_human', 'ORF7a_1xakA_virus'];
|
|
12898
12898
|
|
|
12899
|
+
let tpl2strandsig = {};
|
|
12900
|
+
tpl2strandsig['ASF1A_2iijA_human'] = "A A' B C C' E F G G+";
|
|
12901
|
+
tpl2strandsig['B2Microglobulin_7phrL_human_C1'] = "A B C C' D E F G";
|
|
12902
|
+
tpl2strandsig['BArrestin1_4jqiA_rat_n1'] = "A- A A' B C C' E F G";
|
|
12903
|
+
tpl2strandsig['BTLA_2aw2A_human_Iset'] = "A A' B C C' D E F G";
|
|
12904
|
+
tpl2strandsig['C3_2qkiD_human_n1'] = "A A' B C C' E F G";
|
|
12905
|
+
tpl2strandsig['CD19_6al5A_human_C2orV-n1'] = "A' B C C' D E F G";
|
|
12906
|
+
tpl2strandsig['CD28_1yjdC_human_V'] = "A A' B C C' C'' D E F G";
|
|
12907
|
+
tpl2strandsig['CD2_1hnfA_human_C2-n2'] = "A B C C' E F G";
|
|
12908
|
+
tpl2strandsig['CD2_1hnfA_human_V-n1'] = "A' B C C' C'' D E F G";
|
|
12909
|
+
tpl2strandsig['CD3d_6jxrd_human_Iset'] = "A B C D E F G";
|
|
12910
|
+
tpl2strandsig['CD3e_6jxrf_human_Iset'] = "A B C C' D E F G";
|
|
12911
|
+
tpl2strandsig['CD3g_6jxrg_human_Iset'] = "A B C C' E F G G+";
|
|
12912
|
+
tpl2strandsig['CD8a_1cd8A_human_V'] = "A A' B C C' C'' D E F G";
|
|
12913
|
+
tpl2strandsig['CoAtomerGamma1_1r4xA_human'] = "A- A B C D E F G";
|
|
12914
|
+
tpl2strandsig['Contactin1_2ee2A_human_FN3-n9'] = "A A' B C C' E F G";
|
|
12915
|
+
tpl2strandsig['Contactin1_3s97C_human_C2-n2'] = "A A' B C D E F G";
|
|
12916
|
+
tpl2strandsig['CuZnSuperoxideDismutase_1hl5C_human'] = "A- A B C C' E F G";
|
|
12917
|
+
tpl2strandsig['ECadherin_4zt1A_human_n2'] = "A' B C D E F G";
|
|
12918
|
+
tpl2strandsig['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = "A--- A-- A- A B C C' C'' D E F G";
|
|
12919
|
+
tpl2strandsig['FAB-HEAVY_5esv_C1-n2'] = "A B C D E F G";
|
|
12920
|
+
tpl2strandsig['FAB-HEAVY_5esv_V-n1'] = "A B C C' C'' D E F G";
|
|
12921
|
+
tpl2strandsig['FAB-LIGHT_5esv_C1-n2'] = "A B C C' E F G";
|
|
12922
|
+
tpl2strandsig['FAB-LIGHT_5esv_V-n1'] = "A A' B C C' C'' D E F G";
|
|
12923
|
+
tpl2strandsig['GHR_1axiB_human_FN3-n1'] = "A B C C' D E F G";
|
|
12924
|
+
tpl2strandsig['ICOS_6x4gA_human_V'] = "A B C C' C'' D E F G";
|
|
12925
|
+
tpl2strandsig['IL6Rb_1bquB_human_FN3-n2'] = "A B C C' E F G";
|
|
12926
|
+
tpl2strandsig['IL6Rb_1bquB_human_FN3-n3'] = "A B C C' E F G";
|
|
12927
|
+
tpl2strandsig['InsulinR_8guyE_human_FN3-n1'] = "A B C C' E F G";
|
|
12928
|
+
tpl2strandsig['InsulinR_8guyE_human_FN3-n2'] = "A B C C' E F G";
|
|
12929
|
+
tpl2strandsig['IsdA_2iteA_bacteria'] = "A- A B C C' D E F G";
|
|
12930
|
+
tpl2strandsig['JAM1_1nbqA_human_VorIset-n2'] = "A A' B C C' D E F G";
|
|
12931
|
+
tpl2strandsig['LAG3_7tzgD_human_C2-n2'] = "A A' B C C' D E F G";
|
|
12932
|
+
tpl2strandsig['LAG3_7tzgD_human_V-n1'] = "A' B C C' D E F G";
|
|
12933
|
+
tpl2strandsig['LaminAC_1ifrA_human'] = "A- A B C C' E E+ F G";
|
|
12934
|
+
tpl2strandsig['MHCIa_7phrH_human_C1'] = "A B C C' D E F G";
|
|
12935
|
+
tpl2strandsig['MPT63_1lmiA_bacteria'] = "A-- A- A BC C' E F G";
|
|
12936
|
+
tpl2strandsig['NaCaExchanger_2fwuA_dog_n2'] = "A A' B C C' E F G";
|
|
12937
|
+
tpl2strandsig['NaKATPaseTransporterBeta_2zxeB_spurdogshark']= "A A' B C D E F G";
|
|
12938
|
+
tpl2strandsig['ORF7a_1xakA_virus'] = "A' B C D E F G";
|
|
12939
|
+
tpl2strandsig['PD1_4zqkB_human_V'] = "A A' B C C' D E F G";
|
|
12940
|
+
tpl2strandsig['PDL1_4z18B_human_V-n1'] = "A A' B C C' C'' D E F G";
|
|
12941
|
+
tpl2strandsig['Palladin_2dm3A_human_Iset-n1'] = "A A' B C C' D E F G";
|
|
12942
|
+
tpl2strandsig['RBPJ_6py8C_human_Unk-n1'] = "A A' B C C' E F G";
|
|
12943
|
+
tpl2strandsig['RBPJ_6py8C_human_Unk-n2'] = "A B C D E F G";
|
|
12944
|
+
tpl2strandsig['Sidekick2_1wf5A_human_FN3-n7'] = "A B C C' E F G";
|
|
12945
|
+
tpl2strandsig['Siglec3_5j0bB_human_C2-n2'] = "A A' B C D E F G";
|
|
12946
|
+
tpl2strandsig['TCRa_6jxrm_human_C1-n2'] = "A B C D E F G";
|
|
12947
|
+
tpl2strandsig['TCRa_6jxrm_human_V-n1'] = "A A' B C C' C'' D E F G";
|
|
12948
|
+
tpl2strandsig['TEAD1_3kysC_human'] = "A A+ A' B C C' E F G G+";
|
|
12949
|
+
tpl2strandsig['TP34_2o6cA_bacteria'] = "A- A B C C' D E F G";
|
|
12950
|
+
tpl2strandsig['TP47_1o75A_bacteria'] = "A B C C' D E F G";
|
|
12951
|
+
tpl2strandsig['Titin_4uowM_human_Unk-n152'] = "A A' B C C' D E F G";
|
|
12952
|
+
tpl2strandsig['VISTA_6oilA_human_V'] = "A A' B C C' C'' D E F G G+";
|
|
12953
|
+
tpl2strandsig['VNAR_1t6vN_shark_V'] = "A A' B C C' D E F G";
|
|
12954
|
+
tpl2strandsig['VTCN1_Q7Z7D3_human_V-n2'] = "A B C C' D E F G G+";
|
|
12955
|
+
|
|
12899
12956
|
let html = '';
|
|
12900
12957
|
for(let group in group2tpl) {
|
|
12901
12958
|
html += "<optgroup label='" + group + "'>";
|
|
12902
12959
|
for(let i = 0, il = group2tpl[group].length; i < il; ++i) {
|
|
12903
12960
|
let template = group2tpl[group][i];
|
|
12904
|
-
html += me.htmlCls.optionStr + "'" + template + "'>" + template + "</option>";
|
|
12961
|
+
html += me.htmlCls.optionStr + "'" + template + "'>" + template + ", Strands: " + tpl2strandsig[template] + "</option>";
|
|
12905
12962
|
}
|
|
12906
12963
|
html += "</optgroup>";
|
|
12907
12964
|
}
|
|
@@ -13289,6 +13346,7 @@ class Events {
|
|
|
13289
13346
|
me.htmlCls.HEIGHT = $( window ).height();
|
|
13290
13347
|
ic.applyCenterCls.setWidthHeight(me.htmlCls.WIDTH, me.htmlCls.HEIGHT);
|
|
13291
13348
|
ic.drawCls.draw();
|
|
13349
|
+
|
|
13292
13350
|
ic.resizeCanvasCls.openFullscreen($("#" + me.pre + "canvas")[0]);
|
|
13293
13351
|
});
|
|
13294
13352
|
|
|
@@ -27679,7 +27737,8 @@ class Axes {
|
|
|
27679
27737
|
createArrow(dir, origin, axisLen, color, headLength, headWidth, bGlycan) { let ic = this.icn3d, me = ic.icn3dui;
|
|
27680
27738
|
if(me.bNode) return;
|
|
27681
27739
|
|
|
27682
|
-
let coneGeometry = new THREE.CylinderBufferGeometry( 0, 0.5, 1, 32, 1 );
|
|
27740
|
+
// let coneGeometry = new THREE.CylinderBufferGeometry( 0, 0.5, 1, 32, 1 );
|
|
27741
|
+
let coneGeometry = new THREE.CylinderGeometry( 0, 0.5, 1, 32, 1 );
|
|
27683
27742
|
//coneGeometry.translate( 0, - 0.5, 0 );
|
|
27684
27743
|
coneGeometry.translate( 0, 0.5, 0 );
|
|
27685
27744
|
let material;
|
|
@@ -38832,10 +38891,15 @@ class AnnoIg {
|
|
|
38832
38891
|
if(!info) continue;
|
|
38833
38892
|
|
|
38834
38893
|
let tmscore = info.score;
|
|
38835
|
-
let igType = ic.ref2igtype[info.refpdbname];
|
|
38836
|
-
let confidance = (parseFloat(tmscore) < 0.75 ) ? '?' : '';
|
|
38837
|
-
titleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
|
|
38838
|
-
fullTitleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
|
|
38894
|
+
// let igType = ic.ref2igtype[info.refpdbname];
|
|
38895
|
+
// let confidance = (parseFloat(tmscore) < 0.75 ) ? '?' : '';
|
|
38896
|
+
// titleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
|
|
38897
|
+
// fullTitleArray.push(igType + confidance + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
|
|
38898
|
+
|
|
38899
|
+
let igType = (parseFloat(tmscore) < 0.75 ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
|
|
38900
|
+
titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
|
|
38901
|
+
fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
|
|
38902
|
+
|
|
38839
38903
|
domainArray.push(igType);
|
|
38840
38904
|
|
|
38841
38905
|
let segs = [];
|
|
@@ -39097,6 +39161,7 @@ class AnnoDomain {
|
|
|
39097
39161
|
|
|
39098
39162
|
let result = ic.domain3dCls.c2b_NewSplitChain(atoms);
|
|
39099
39163
|
let subdomains = result.subdomains;
|
|
39164
|
+
let pos2resi = result.pos2resi;
|
|
39100
39165
|
//let substruct = result.substruct;
|
|
39101
39166
|
//let jsonStr = ic.domain3dCls.getDomainJsonForAlign(atoms);
|
|
39102
39167
|
|
|
@@ -39111,6 +39176,8 @@ class AnnoDomain {
|
|
|
39111
39176
|
|
|
39112
39177
|
data.domains[chainid].domains.push(domain);
|
|
39113
39178
|
}
|
|
39179
|
+
|
|
39180
|
+
data.domains[chainid].pos2resi = pos2resi;
|
|
39114
39181
|
}
|
|
39115
39182
|
}
|
|
39116
39183
|
|
|
@@ -39147,7 +39214,7 @@ class AnnoDomain {
|
|
|
39147
39214
|
let html = '<div id="' + ic.pre + chnid + '_domainseq_sequence" class="icn3d-dl_sequence">';
|
|
39148
39215
|
let html2 = html;
|
|
39149
39216
|
let html3 = html;
|
|
39150
|
-
let domainArray, proteinname;
|
|
39217
|
+
let domainArray, pos2resi, proteinname;
|
|
39151
39218
|
let pos = chnid.indexOf('_');
|
|
39152
39219
|
let chain = chnid.substr(pos + 1);
|
|
39153
39220
|
// MMDB symmetry chain has the form of 'A1'
|
|
@@ -39155,9 +39222,11 @@ class AnnoDomain {
|
|
|
39155
39222
|
chain = chain.substr(0, chain.length - 1);
|
|
39156
39223
|
}
|
|
39157
39224
|
|
|
39158
|
-
if(bCalcDirect) {
|
|
39225
|
+
// if(bCalcDirect) {
|
|
39159
39226
|
proteinname = chnid;
|
|
39160
39227
|
domainArray = (data.domains[chnid]) ? data.domains[chnid].domains : [];
|
|
39228
|
+
pos2resi = data.domains[chnid].pos2resi;
|
|
39229
|
+
/*
|
|
39161
39230
|
}
|
|
39162
39231
|
else {
|
|
39163
39232
|
let molinfo = data.moleculeInfor;
|
|
@@ -39176,6 +39245,7 @@ class AnnoDomain {
|
|
|
39176
39245
|
domainArray = [];
|
|
39177
39246
|
}
|
|
39178
39247
|
}
|
|
39248
|
+
*/
|
|
39179
39249
|
|
|
39180
39250
|
for(let index = 0, indexl = domainArray.length; index < indexl; ++index) {
|
|
39181
39251
|
//var fulltitle = '3D domain ' +(index+1).toString() + ' of ' + proteinname + '(PDB ID: ' + data.pdbId + ')';
|
|
@@ -39184,13 +39254,14 @@ class AnnoDomain {
|
|
|
39184
39254
|
let subdomainArray = domainArray[index].intervals;
|
|
39185
39255
|
// remove duplicate, e.g., at https://www.ncbi.nlm.nih.gov/Structure/mmdb/mmdb_strview.cgi?v=2&program=icn3d&domain&molinfor&uid=1itw
|
|
39186
39256
|
let domainFromHash = {}, domainToHash = {};
|
|
39187
|
-
let fromArray = [], toArray = [];
|
|
39257
|
+
let fromArray = [], toArray = [], posFromArray = [], posToArray = [];
|
|
39188
39258
|
let resiHash = {};
|
|
39189
39259
|
let resCnt = 0;
|
|
39190
39260
|
|
|
39191
39261
|
for(let i = 0, il = subdomainArray.length; i < il; ++i) {
|
|
39192
39262
|
let domainFrom = Math.round(subdomainArray[i][0]) - 1; // convert 1-based to 0-based
|
|
39193
39263
|
let domainTo = Math.round(subdomainArray[i][1]) - 1;
|
|
39264
|
+
|
|
39194
39265
|
if(domainFromHash.hasOwnProperty(domainFrom) || domainToHash.hasOwnProperty(domainTo)) {
|
|
39195
39266
|
continue; // do nothing for duplicated "from" or "to", e.g, PDBID 1ITW, 5FWI
|
|
39196
39267
|
}
|
|
@@ -39201,8 +39272,11 @@ class AnnoDomain {
|
|
|
39201
39272
|
|
|
39202
39273
|
// use the NCBI residue number, and convert to PDB residue number during selection
|
|
39203
39274
|
// if(ic.bNCBI || bCalcDirect) {
|
|
39204
|
-
fromArray.push(domainFrom);
|
|
39205
|
-
toArray.push(domainTo);
|
|
39275
|
+
fromArray.push(pos2resi[domainFrom]);
|
|
39276
|
+
toArray.push(pos2resi[domainTo]);
|
|
39277
|
+
|
|
39278
|
+
posFromArray.push(domainFrom);
|
|
39279
|
+
posToArray.push(domainTo);
|
|
39206
39280
|
// }
|
|
39207
39281
|
// else {
|
|
39208
39282
|
// fromArray.push(domainFrom + ic.baseResi[chnid]);
|
|
@@ -39211,7 +39285,9 @@ class AnnoDomain {
|
|
|
39211
39285
|
|
|
39212
39286
|
resCnt += domainTo - domainFrom + 1;
|
|
39213
39287
|
for(let j = domainFrom; j <= domainTo; ++j) {
|
|
39214
|
-
resiHash[j+1] = 1;
|
|
39288
|
+
// resiHash[j+1] = 1;
|
|
39289
|
+
let resi = pos2resi[j];
|
|
39290
|
+
resiHash[resi] = 1;
|
|
39215
39291
|
}
|
|
39216
39292
|
}
|
|
39217
39293
|
|
|
@@ -39221,20 +39297,21 @@ class AnnoDomain {
|
|
|
39221
39297
|
|
|
39222
39298
|
if(!ic.resid2domain) ic.resid2domain = {};
|
|
39223
39299
|
if(!ic.resid2domain[chnid]) ic.resid2domain[chnid] = [];
|
|
39224
|
-
for(let i = 0, il =
|
|
39225
|
-
let from = parseInt(
|
|
39226
|
-
let to = parseInt(
|
|
39300
|
+
for(let i = 0, il = posFromArray.length; i < il; ++i) {
|
|
39301
|
+
let from = parseInt(posFromArray[i]);
|
|
39302
|
+
let to = parseInt(posToArray[i]);
|
|
39227
39303
|
for(let j = from; j <= to; ++j) {
|
|
39228
39304
|
// 0-based
|
|
39229
39305
|
let obj = {};
|
|
39230
|
-
let resi = ic.ParserUtilsCls.getResi(chnid, j);
|
|
39306
|
+
// let resi = ic.ParserUtilsCls.getResi(chnid, j);
|
|
39307
|
+
let resi = pos2resi[j];
|
|
39231
39308
|
obj[chnid + '_' + resi] = domainName;
|
|
39232
39309
|
ic.resid2domain[chnid].push(obj);
|
|
39233
39310
|
}
|
|
39234
39311
|
}
|
|
39235
39312
|
}
|
|
39236
39313
|
|
|
39237
|
-
let htmlTmp2 = '<div class="icn3d-seqTitle icn3d-link icn3d-blue" 3ddomain="' +(index+1).toString() + '" from="' +
|
|
39314
|
+
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>';
|
|
39238
39315
|
let htmlTmp3 = '<span class="icn3d-residueNum" title="residue count">' + resCnt.toString() + ' Res</span>';
|
|
39239
39316
|
html3 += htmlTmp2 + htmlTmp3 + '<br>';
|
|
39240
39317
|
let htmlTmp = '<span class="icn3d-seqLine">';
|
|
@@ -39248,7 +39325,8 @@ class AnnoDomain {
|
|
|
39248
39325
|
html += ic.showSeqCls.insertGap(chnid, i, '-');
|
|
39249
39326
|
//if(i >= domainFrom && i <= domainTo) {
|
|
39250
39327
|
let resi = ic.ParserUtilsCls.getResi(chnid, i);
|
|
39251
|
-
|
|
39328
|
+
// if(resiHash.hasOwnProperty(i+1)) {
|
|
39329
|
+
if(resiHash.hasOwnProperty(resi)) {
|
|
39252
39330
|
let cFull = ic.giSeq[chnid][i];
|
|
39253
39331
|
let c = cFull;
|
|
39254
39332
|
if(cFull.length > 1) {
|
|
@@ -39273,12 +39351,12 @@ class AnnoDomain {
|
|
|
39273
39351
|
if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
|
|
39274
39352
|
|
|
39275
39353
|
if(me.cfg.blast_rep_id != chnid) { // regular
|
|
39276
|
-
for(let i = 0, il =
|
|
39354
|
+
for(let i = 0, il = posFromArray.length; i < il; ++i) {
|
|
39277
39355
|
// 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);
|
|
39278
|
-
let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(
|
|
39356
|
+
let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(posFromArray[i]) / ic.maxAnnoLength) : Math.round(ic.seqAnnWidth *(posFromArray[i] - posToArray[i-1] - 1) / ic.maxAnnoLength);
|
|
39279
39357
|
|
|
39280
39358
|
html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;"> </div>';
|
|
39281
|
-
html2 += '<div style="display:inline-block; color:white!important; font-weight:bold; background-color:#' + color + '; width:' + Math.round(ic.seqAnnWidth *(
|
|
39359
|
+
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>';
|
|
39282
39360
|
}
|
|
39283
39361
|
}
|
|
39284
39362
|
else { // with potential gaps
|
|
@@ -40812,7 +40890,7 @@ class Domain3d {
|
|
|
40812
40890
|
if(!ic.posid2resid) ic.posid2resid = {};
|
|
40813
40891
|
|
|
40814
40892
|
let substructItem = {};
|
|
40815
|
-
let pos2resi = {};
|
|
40893
|
+
let pos2resi = {}; // 0-based
|
|
40816
40894
|
for(let i = 0; i < residueArray.length; ++i) {
|
|
40817
40895
|
let resid = residueArray[i];
|
|
40818
40896
|
|
|
@@ -40844,7 +40922,8 @@ class Domain3d {
|
|
|
40844
40922
|
|
|
40845
40923
|
//resiArray.push(resi);
|
|
40846
40924
|
resiArray.push(i+1);
|
|
40847
|
-
pos2resi[i+1] = resi;
|
|
40925
|
+
// pos2resi[i+1] = resi;
|
|
40926
|
+
pos2resi[i] = resi;
|
|
40848
40927
|
|
|
40849
40928
|
ic.posid2resid[atom.structure + '_' + atom.chain + '_' + (i+1).toString()] = resid;
|
|
40850
40929
|
// let residNCBI = ic.resid2ncbi[resid];
|
|
@@ -40893,7 +40972,7 @@ class Domain3d {
|
|
|
40893
40972
|
// get a list of Calpha-Calpha contacts
|
|
40894
40973
|
///list< pair< pair< int, let >, let > >
|
|
40895
40974
|
let cts = this.c2b_AlphaContacts(seqLen, x0, y0, z0, dcut, resiArray);
|
|
40896
|
-
|
|
40975
|
+
|
|
40897
40976
|
//
|
|
40898
40977
|
// Produce a "map" of the SSEs, i.e. vec_sse[i] = 0 means residue i + 1
|
|
40899
40978
|
// is in a loop, and vec_sse[i] = k means residue i + 1 belongs to SSE
|
|
@@ -41366,8 +41445,8 @@ class Domain3d {
|
|
|
41366
41445
|
//ss: sstype ss_start ss_end x1 y1 z1 x2 y2 z2
|
|
41367
41446
|
//sstype: 1 (helix), 2 (sheet)
|
|
41368
41447
|
let sstype = (substruct[k].Sheet) ? 2 : 1;
|
|
41369
|
-
let from = pos2resi[substruct[k].From];
|
|
41370
|
-
let to = pos2resi[substruct[k].To];
|
|
41448
|
+
let from = pos2resi[substruct[k].From - 1]; // 1-based to 0-based
|
|
41449
|
+
let to = pos2resi[substruct[k].To - 1];
|
|
41371
41450
|
|
|
41372
41451
|
// 1-based residue numbers
|
|
41373
41452
|
let fromPos = substruct[k].From;
|
|
@@ -63316,6 +63395,27 @@ class LoadScript {
|
|
|
63316
63395
|
return nameArray;
|
|
63317
63396
|
}
|
|
63318
63397
|
|
|
63398
|
+
updateTransformation(steps) { let ic = this.icn3d; ic.icn3dui;
|
|
63399
|
+
let commandTransformation = (ic.commands[steps-1]) ? ic.commands[steps-1].split('|||') : [];
|
|
63400
|
+
|
|
63401
|
+
if(commandTransformation.length == 2) {
|
|
63402
|
+
let transformation = JSON.parse(commandTransformation[1]);
|
|
63403
|
+
|
|
63404
|
+
ic._zoomFactor = transformation.factor;
|
|
63405
|
+
|
|
63406
|
+
ic.mouseChange.x = transformation.mouseChange.x;
|
|
63407
|
+
ic.mouseChange.y = transformation.mouseChange.y;
|
|
63408
|
+
|
|
63409
|
+
ic.quaternion._x = transformation.quaternion._x;
|
|
63410
|
+
ic.quaternion._y = transformation.quaternion._y;
|
|
63411
|
+
ic.quaternion._z = transformation.quaternion._z;
|
|
63412
|
+
ic.quaternion._w = transformation.quaternion._w;
|
|
63413
|
+
}
|
|
63414
|
+
|
|
63415
|
+
// ic.bRender = true;
|
|
63416
|
+
ic.drawCls.draw();
|
|
63417
|
+
}
|
|
63418
|
+
|
|
63319
63419
|
async execCommandsBase(start, end, steps, bFinalStep) { let ic = this.icn3d, me = ic.icn3dui;
|
|
63320
63420
|
let thisClass = this;
|
|
63321
63421
|
let i;
|
|
@@ -63495,7 +63595,10 @@ class LoadScript {
|
|
|
63495
63595
|
await thisClass.applyCommandGraphinteraction(command);
|
|
63496
63596
|
}
|
|
63497
63597
|
else if(command.indexOf('cartoon 2d domain') == 0) {
|
|
63598
|
+
ic.bRender = true;
|
|
63599
|
+
thisClass.updateTransformation(steps);
|
|
63498
63600
|
await thisClass.applyCommandCartoon2d(command);
|
|
63601
|
+
ic.bRender = false;
|
|
63499
63602
|
}
|
|
63500
63603
|
else if(command.indexOf('set half pae map') == 0) {
|
|
63501
63604
|
await thisClass.applyCommandAfmap(command);
|
|
@@ -63510,7 +63613,10 @@ class LoadScript {
|
|
|
63510
63613
|
let pos = command.lastIndexOf(' ');
|
|
63511
63614
|
let type = command.substr(pos + 1);
|
|
63512
63615
|
|
|
63616
|
+
ic.bRender = true;
|
|
63617
|
+
thisClass.updateTransformation(steps);
|
|
63513
63618
|
await ic.cartoon2dCls.draw2Dcartoon(type);
|
|
63619
|
+
ic.bRender = false;
|
|
63514
63620
|
}
|
|
63515
63621
|
else if(command.indexOf('add msa track') == 0) {
|
|
63516
63622
|
//add msa track | chainid " + chainid + " | startpos " + startpos + " | type " + type + " | fastaList " + fastaList
|
|
@@ -63548,7 +63654,7 @@ class LoadScript {
|
|
|
63548
63654
|
await ic.applyCommandCls.applyCommand(ic.commands[i]);
|
|
63549
63655
|
}
|
|
63550
63656
|
}
|
|
63551
|
-
|
|
63657
|
+
|
|
63552
63658
|
//if(i === steps - 1) {
|
|
63553
63659
|
if(i === steps || bFinalStep) {
|
|
63554
63660
|
this.renderFinalStep(i);
|
|
@@ -68178,19 +68284,25 @@ class Dssp {
|
|
|
68178
68284
|
}
|
|
68179
68285
|
|
|
68180
68286
|
// 2b. remove strands with less than 3 residues except G strand
|
|
68287
|
+
let removeDomainidHash = {};
|
|
68181
68288
|
for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
|
|
68182
|
-
let strandTmp = strandArray[i].strand.substr(0, 1);
|
|
68289
|
+
// let strandTmp = strandArray[i].strand.substr(0, 1);
|
|
68290
|
+
let strandTmp = strandArray[i].strand;
|
|
68183
68291
|
if(strandTmp != 'G' && strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
|
|
68184
|
-
if(strandTmp == 'B' || strandTmp == 'C' || strandTmp == 'E' || strandTmp == 'F') {
|
|
68185
|
-
if(!me.bNode) console.log("Some of the Ig strands B, C, E, F are removed since they are too short...");
|
|
68186
|
-
return false;
|
|
68187
|
-
}
|
|
68188
|
-
|
|
68189
68292
|
if(i != il - 1) { // modify
|
|
68190
68293
|
strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
|
|
68191
68294
|
}
|
|
68192
68295
|
|
|
68193
68296
|
strandArray.splice(i, 1);
|
|
68297
|
+
|
|
68298
|
+
if(strandTmp == 'B' || strandTmp == 'C' || strandTmp == 'E' || strandTmp == 'F') {
|
|
68299
|
+
if(!me.bNode) console.log("Ig strand " + strandTmp + " is removed since it is too short...");
|
|
68300
|
+
|
|
68301
|
+
let resid = chnid + '_' + strandArray[i].startResi;
|
|
68302
|
+
let domainid = ic.resid2domainid[resid];
|
|
68303
|
+
removeDomainidHash[domainid] = 1;
|
|
68304
|
+
continue;
|
|
68305
|
+
}
|
|
68194
68306
|
}
|
|
68195
68307
|
}
|
|
68196
68308
|
|
|
@@ -68380,6 +68492,14 @@ class Dssp {
|
|
|
68380
68492
|
prevStrand = currStrand;
|
|
68381
68493
|
prevStrandCnt = strandCnt - 1;
|
|
68382
68494
|
|
|
68495
|
+
// remove domians without B,C,E,F strands
|
|
68496
|
+
if(removeDomainidHash.hasOwnProperty(domainid)) {
|
|
68497
|
+
delete ic.resid2refnum[residueid];
|
|
68498
|
+
delete ic.resid2domainid[residueid];
|
|
68499
|
+
|
|
68500
|
+
continue;
|
|
68501
|
+
}
|
|
68502
|
+
|
|
68383
68503
|
// assign the adjusted reference numbers
|
|
68384
68504
|
ic.resid2refnum[residueid] = refnumLabel;
|
|
68385
68505
|
ic.resid2domainid[residueid] = domainid;
|
|
@@ -71161,7 +71281,7 @@ class Cartoon2d {
|
|
|
71161
71281
|
idStr = idStr.substr(0, idStr.indexOf('-'));
|
|
71162
71282
|
}
|
|
71163
71283
|
else {
|
|
71164
|
-
idStr = idStr.substr(idStr.lastIndexOf('_') + 1);
|
|
71284
|
+
idStr = idStr; //idStr.substr(idStr.lastIndexOf('_') + 1);
|
|
71165
71285
|
}
|
|
71166
71286
|
|
|
71167
71287
|
return idStr;
|
|
@@ -71858,14 +71978,14 @@ class ResizeCanvas {
|
|
|
71858
71978
|
!document.webkitFullscreenElement && !document.msFullscreenElement) {
|
|
71859
71979
|
if(elem.requestFullscreen) {
|
|
71860
71980
|
elem.requestFullscreen();
|
|
71861
|
-
} else if(elem.mozRequestFullScreen) {
|
|
71981
|
+
} else if(elem.mozRequestFullScreen) { // Firefox
|
|
71862
71982
|
elem.mozRequestFullScreen();
|
|
71863
|
-
} else if(elem.webkitRequestFullscreen) {
|
|
71983
|
+
} else if(elem.webkitRequestFullscreen) { // Chrome, Safari and Opera
|
|
71864
71984
|
elem.webkitRequestFullscreen();
|
|
71865
|
-
} else if(elem.msRequestFullscreen) {
|
|
71985
|
+
} else if(elem.msRequestFullscreen) { // IE/Edge
|
|
71866
71986
|
elem.msRequestFullscreen();
|
|
71867
71987
|
}
|
|
71868
|
-
}
|
|
71988
|
+
}
|
|
71869
71989
|
}
|
|
71870
71990
|
|
|
71871
71991
|
//Rotate the structure in one of the directions: "left", "right", "up", and "down".
|
|
@@ -76556,7 +76676,7 @@ class iCn3DUI {
|
|
|
76556
76676
|
//even when multiple iCn3D viewers are shown together.
|
|
76557
76677
|
this.pre = this.cfg.divid + "_";
|
|
76558
76678
|
|
|
76559
|
-
this.REVISION = '3.30.
|
|
76679
|
+
this.REVISION = '3.30.1';
|
|
76560
76680
|
|
|
76561
76681
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
76562
76682
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|