icn3d 3.29.1 → 3.29.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 +47 -21
- package/icn3d.min.js +4 -6
- package/icn3d.module.js +47 -21
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -8667,14 +8667,14 @@ class SetMenu {
|
|
|
8667
8667
|
}
|
|
8668
8668
|
|
|
8669
8669
|
//!!!
|
|
8670
|
-
|
|
8670
|
+
/*
|
|
8671
8671
|
html += this.getMenuText('m1_exportrefnum', 'Reference Numbers', undefined, undefined, 2);
|
|
8672
8672
|
html += "<ul>";
|
|
8673
8673
|
html += this.getLink('mn1_exportIgstrand', 'Ig Strand', undefined, 3);
|
|
8674
8674
|
html += this.getLink('mn1_exportKabat', 'Kabat', undefined, 3);
|
|
8675
8675
|
html += this.getLink('mn1_exportImgt', 'IMGT', undefined, 3);
|
|
8676
8676
|
html += "</ul>";
|
|
8677
|
-
|
|
8677
|
+
*/
|
|
8678
8678
|
|
|
8679
8679
|
html += "<li><br/></li>";
|
|
8680
8680
|
|
|
@@ -9515,8 +9515,8 @@ class SetMenu {
|
|
|
9515
9515
|
//}
|
|
9516
9516
|
|
|
9517
9517
|
//!!!
|
|
9518
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
9519
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
9518
|
+
//html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
9519
|
+
//html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
9520
9520
|
}
|
|
9521
9521
|
else {
|
|
9522
9522
|
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
@@ -9647,7 +9647,7 @@ class SetMenu {
|
|
|
9647
9647
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
|
|
9648
9648
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
|
|
9649
9649
|
//!!!
|
|
9650
|
-
html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
|
|
9650
|
+
//html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
|
|
9651
9651
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
|
|
9652
9652
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
|
|
9653
9653
|
}
|
|
@@ -9739,13 +9739,13 @@ class SetMenu {
|
|
|
9739
9739
|
|
|
9740
9740
|
html += "<ul>";
|
|
9741
9741
|
//!!!
|
|
9742
|
-
|
|
9742
|
+
/*
|
|
9743
9743
|
html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
|
|
9744
9744
|
html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
|
|
9745
9745
|
html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
|
|
9746
9746
|
|
|
9747
9747
|
html += this.getMenuSep();
|
|
9748
|
-
|
|
9748
|
+
*/
|
|
9749
9749
|
html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
|
|
9750
9750
|
html += "</ul>";
|
|
9751
9751
|
html += "</li>";
|
|
@@ -10971,12 +10971,14 @@ class SetDialog {
|
|
|
10971
10971
|
|
|
10972
10972
|
|
|
10973
10973
|
html += me.htmlCls.divStr + "dl_selection' class='" + dialogClass + "'>";
|
|
10974
|
-
html += this.addNotebookTitle('dl_selection', '
|
|
10974
|
+
html += this.addNotebookTitle('dl_selection', 'Please input the selection file');
|
|
10975
10975
|
html += "Selection file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "selectionfile'><br/>";
|
|
10976
10976
|
html += me.htmlCls.buttonStr + "reload_selectionfile' style='margin-top: 6px;'>Load</button>";
|
|
10977
10977
|
html += "</div>";
|
|
10978
10978
|
|
|
10979
10979
|
html += me.htmlCls.divStr + "dl_collection' class='" + dialogClass + "'>";
|
|
10980
|
+
html += this.addNotebookTitle('dl_collection', 'Please input the collection file');
|
|
10981
|
+
html += "You can load a collection of structures via a file. Here is <a href='https://github.com/ncbi/icn3d/blob/master/example/collection.json' target='_blank'>one example file</a><br><br>";
|
|
10980
10982
|
html += "Collection file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "collectionfile'><br/>";
|
|
10981
10983
|
html += me.htmlCls.buttonStr + "reload_collectionfile' style='margin-top: 6px;'>Load</button>";
|
|
10982
10984
|
html += "</div>";
|
|
@@ -13211,7 +13213,8 @@ class Events {
|
|
|
13211
13213
|
let dataStr = JSON.parse(e.target.result);
|
|
13212
13214
|
let collection = [dataStr["structures"].map(({ id }) => id), dataStr["structures"].map(({ title }) => title)];
|
|
13213
13215
|
let collectionHtml = ic.selectCollectionsCls.setAtomMenu(collection[0], collection[1]);
|
|
13214
|
-
|
|
13216
|
+
let bNoDuplicate = true;
|
|
13217
|
+
await ic.chainalignParserCls.downloadMmdbAf(collection[0][0], undefined, undefined, bNoDuplicate);
|
|
13215
13218
|
|
|
13216
13219
|
ic.opts["color"] = "structure";
|
|
13217
13220
|
ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
@@ -37634,7 +37637,8 @@ class AnnoDomain {
|
|
|
37634
37637
|
for(let j = from; j <= to; ++j) {
|
|
37635
37638
|
// 0-based
|
|
37636
37639
|
let obj = {};
|
|
37637
|
-
|
|
37640
|
+
let resi = ic.ParserUtilsCls.getResi(chnid, j+1);
|
|
37641
|
+
obj[chnid + '_' + resi] = domainName;
|
|
37638
37642
|
ic.resid2domain[chnid].push(obj);
|
|
37639
37643
|
}
|
|
37640
37644
|
}
|
|
@@ -46194,7 +46198,7 @@ class LineGraph {
|
|
|
46194
46198
|
console.log("domainid: " + domainid);
|
|
46195
46199
|
}
|
|
46196
46200
|
|
|
46197
|
-
if(!
|
|
46201
|
+
if(!domainid2segs.hasOwnProperty(domainid) || queryData[0].score >= ic.domainid2score[domainid].split('_')[0]) {
|
|
46198
46202
|
ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
|
|
46199
46203
|
|
|
46200
46204
|
ic.domainid2refpdbname[domainid] = refpdbname;
|
|
@@ -46274,6 +46278,7 @@ class LineGraph {
|
|
|
46274
46278
|
|
|
46275
46279
|
// combine domainid into chainid
|
|
46276
46280
|
let processedChainid = {};
|
|
46281
|
+
|
|
46277
46282
|
for(let domainid in ic.domainid2refpdbname) {
|
|
46278
46283
|
// remove the first round template
|
|
46279
46284
|
if(ic.domainid2refpdbname[domainid].substr(0,1) == '1') {
|
|
@@ -49746,6 +49751,7 @@ class ChainalignParser {
|
|
|
49746
49751
|
me.htmlCls.clickMenuCls.setLogCmd("Align " + mmdbid1 + " with " + mmdbid2, false);
|
|
49747
49752
|
|
|
49748
49753
|
let bNoAlert = true;
|
|
49754
|
+
|
|
49749
49755
|
let bAligned = this.processAlign(align, i, queryData, bEqualMmdbid, bEqualChain, bNoAlert);
|
|
49750
49756
|
|
|
49751
49757
|
if(bAligned) {
|
|
@@ -50257,7 +50263,6 @@ class ChainalignParser {
|
|
|
50257
50263
|
ic.qt_start_end[index] = align[0].segs;
|
|
50258
50264
|
|
|
50259
50265
|
let rmsd = align[0].super_rmsd;
|
|
50260
|
-
console.log();
|
|
50261
50266
|
|
|
50262
50267
|
let logStr = "alignment RMSD: " + rmsd.toPrecision(4);
|
|
50263
50268
|
if(me.cfg.aligntool == 'tmalign') logStr += "; TM-score: " + align[0].score.toPrecision(4);
|
|
@@ -50342,7 +50347,7 @@ console.log();
|
|
|
50342
50347
|
}
|
|
50343
50348
|
}
|
|
50344
50349
|
|
|
50345
|
-
async downloadMmdbAf(idlist, bQuery, vastplusAtype) { let ic = this.icn3d, me = ic.icn3dui;
|
|
50350
|
+
async downloadMmdbAf(idlist, bQuery, vastplusAtype, bNoDuplicate) { let ic = this.icn3d, me = ic.icn3dui;
|
|
50346
50351
|
let thisClass = this;
|
|
50347
50352
|
|
|
50348
50353
|
ic.structArray = (ic.structures) ? Object.keys(ic.structures) : [];
|
|
@@ -50361,11 +50366,17 @@ console.log();
|
|
|
50361
50366
|
let structArrayTmp = idlist.split(',');
|
|
50362
50367
|
|
|
50363
50368
|
let structArray = [];
|
|
50364
|
-
|
|
50369
|
+
|
|
50365
50370
|
for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
|
|
50366
|
-
|
|
50371
|
+
let id = structArrayTmp[i].toUpperCase();
|
|
50372
|
+
// sometimes we want to load same structure multiple times
|
|
50373
|
+
if(!ic.structures.hasOwnProperty(id) && structArray.indexOf(id) == -1) {
|
|
50367
50374
|
structArray.push(structArrayTmp[i]);
|
|
50368
50375
|
}
|
|
50376
|
+
else {
|
|
50377
|
+
// only when bNoDuplicate is undefined/false, it's allowed to load multiple copies of the same structure
|
|
50378
|
+
if(!bNoDuplicate) structArray.push(structArrayTmp[i] + me.htmlCls.postfix);
|
|
50379
|
+
}
|
|
50369
50380
|
}
|
|
50370
50381
|
|
|
50371
50382
|
if(structArray.length == 0) return;
|
|
@@ -53839,6 +53850,7 @@ class RealignParser {
|
|
|
53839
53850
|
// reinitialize
|
|
53840
53851
|
ic.qt_start_end = [];
|
|
53841
53852
|
|
|
53853
|
+
let chainidHash = {};
|
|
53842
53854
|
for(let index = 0, indexl = chainidArray.length - 1; index < indexl; ++index) {
|
|
53843
53855
|
let fromStruct = chainidArray[index + 1].substr(0, chainidArray[index + 1].indexOf('_')); //.toUpperCase();
|
|
53844
53856
|
|
|
@@ -53846,6 +53858,8 @@ class RealignParser {
|
|
|
53846
53858
|
|
|
53847
53859
|
let chainTo = toStruct + chainidArray[0].substr(chainidArray[0].indexOf('_'));
|
|
53848
53860
|
let chainFrom = fromStruct + chainidArray[index + 1].substr(chainidArray[index + 1].indexOf('_'));
|
|
53861
|
+
chainidHash[chainTo] = 1;
|
|
53862
|
+
chainidHash[chainFrom] = 1;
|
|
53849
53863
|
|
|
53850
53864
|
chainidArray[0] = chainTo;
|
|
53851
53865
|
chainidArray[index + 1] = chainFrom;
|
|
@@ -53875,13 +53889,17 @@ class RealignParser {
|
|
|
53875
53889
|
// set ic.qt_start_end in alignCoords()
|
|
53876
53890
|
|
|
53877
53891
|
let result = ic.ParserUtilsCls.alignCoords(coord2, coord1, fromStruct, undefined, chainTo, chainFrom, index + 1, bChainAlign);
|
|
53892
|
+
|
|
53878
53893
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
|
|
53879
53894
|
rmsd = parseFloat(result.rmsd);
|
|
53880
53895
|
}
|
|
53881
53896
|
|
|
53882
53897
|
// If rmsd from vastsrv is too large, realign the chains
|
|
53883
|
-
if(me.cfg.chainalign && !me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
|
|
53884
|
-
|
|
53898
|
+
//if(me.cfg.chainalign && !me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
|
|
53899
|
+
if(!me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
|
|
53900
|
+
console.log("RMSD from VAST is larger than 5. Realign the chains with TM-align.");
|
|
53901
|
+
//let nameArray = me.cfg.chainalign.split(',');
|
|
53902
|
+
let nameArray = Object.keys(chainidHash);
|
|
53885
53903
|
if(nameArray.length > 0) {
|
|
53886
53904
|
ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
53887
53905
|
}
|
|
@@ -54325,7 +54343,7 @@ class RealignParser {
|
|
|
54325
54343
|
struct2resid[chainid] = [];
|
|
54326
54344
|
}
|
|
54327
54345
|
|
|
54328
|
-
if(bPredefined) {
|
|
54346
|
+
if(bPredefined) {
|
|
54329
54347
|
//base = parseInt(ic.chainsSeq[chainid][0].resi);
|
|
54330
54348
|
|
|
54331
54349
|
if(i == 0) ;
|
|
@@ -54341,6 +54359,7 @@ class RealignParser {
|
|
|
54341
54359
|
|
|
54342
54360
|
// master
|
|
54343
54361
|
resiArray = predefinedResPair[0].split(",");
|
|
54362
|
+
|
|
54344
54363
|
result = thisClass.getSeqCoorResid(resiArray, chainid_t);
|
|
54345
54364
|
|
|
54346
54365
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
|
|
@@ -54355,6 +54374,7 @@ class RealignParser {
|
|
|
54355
54374
|
|
|
54356
54375
|
// slave
|
|
54357
54376
|
resiArray = predefinedResPair[1].split(",");
|
|
54377
|
+
|
|
54358
54378
|
result = thisClass.getSeqCoorResid(resiArray, chainid);
|
|
54359
54379
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
|
|
54360
54380
|
|
|
@@ -55580,6 +55600,7 @@ class ParserUtils {
|
|
|
55580
55600
|
if(rmsd) {
|
|
55581
55601
|
me.htmlCls.clickMenuCls.setLogCmd("realignment RMSD: " + rmsd.toPrecision(4), false);
|
|
55582
55602
|
let html = "<br><b>Realignment RMSD</b>: " + rmsd.toPrecision(4) + " Å<br><br>";
|
|
55603
|
+
|
|
55583
55604
|
if(ic.bAfMem && !me.cfg.chainalign) {
|
|
55584
55605
|
//if(window.dialog && window.dialog.hasClass('ui-dialog-content')) window.dialog.dialog( "close" );
|
|
55585
55606
|
html += me.utilsCls.getMemDesc();
|
|
@@ -62145,7 +62166,7 @@ class DefinedSets {
|
|
|
62145
62166
|
|
|
62146
62167
|
nameArrayTmp.forEach((elem) => {
|
|
62147
62168
|
structureArray.forEach((structure) => {
|
|
62148
|
-
if (ic.defNames2Residues[elem][0].split("_")[0].includes(structure.split("_")[0])){
|
|
62169
|
+
if (ic.defNames2Residues[elem] && ic.defNames2Residues[elem][0] && ic.defNames2Residues[elem][0].split("_")[0].includes(structure.split("_")[0])){
|
|
62149
62170
|
if ($.inArray(elem, nameArray) === -1) nameArray.push(elem);
|
|
62150
62171
|
}
|
|
62151
62172
|
});
|
|
@@ -62715,6 +62736,10 @@ class DefinedSets {
|
|
|
62715
62736
|
|
|
62716
62737
|
}
|
|
62717
62738
|
|
|
62739
|
+
/**
|
|
62740
|
+
* @author Jack Lin <th3linja@yahoo.com> / https://github.com/ncbi/icn3d
|
|
62741
|
+
*/
|
|
62742
|
+
|
|
62718
62743
|
class SelectCollections {
|
|
62719
62744
|
constructor(icn3d) {
|
|
62720
62745
|
this.icn3d = icn3d;
|
|
@@ -62782,7 +62807,8 @@ class SelectCollections {
|
|
|
62782
62807
|
ic.nameArray = nameArray;
|
|
62783
62808
|
if (nameArray !== null) {
|
|
62784
62809
|
ic.bShowHighlight = false;
|
|
62785
|
-
|
|
62810
|
+
let bNoDuplicate = true;
|
|
62811
|
+
await ic.chainalignParserCls.downloadMmdbAf(nameArray.toString(), undefined, undefined, bNoDuplicate);
|
|
62786
62812
|
|
|
62787
62813
|
ic.dAtoms = {};
|
|
62788
62814
|
ic.hAtoms = {};
|
|
@@ -74511,7 +74537,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
74511
74537
|
// load multiple PDBs
|
|
74512
74538
|
// ic.bNCBI = true;
|
|
74513
74539
|
ic.bMmdbafid = true;
|
|
74514
|
-
|
|
74540
|
+
|
|
74515
74541
|
let bQuery = true;
|
|
74516
74542
|
await ic.chainalignParserCls.downloadMmdbAf(mmdbafid, bQuery);
|
|
74517
74543
|
}
|