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.module.js
CHANGED
|
@@ -9568,14 +9568,14 @@ class SetMenu {
|
|
|
9568
9568
|
}
|
|
9569
9569
|
|
|
9570
9570
|
//!!!
|
|
9571
|
-
|
|
9571
|
+
/*
|
|
9572
9572
|
html += this.getMenuText('m1_exportrefnum', 'Reference Numbers', undefined, undefined, 2);
|
|
9573
9573
|
html += "<ul>";
|
|
9574
9574
|
html += this.getLink('mn1_exportIgstrand', 'Ig Strand', undefined, 3);
|
|
9575
9575
|
html += this.getLink('mn1_exportKabat', 'Kabat', undefined, 3);
|
|
9576
9576
|
html += this.getLink('mn1_exportImgt', 'IMGT', undefined, 3);
|
|
9577
9577
|
html += "</ul>";
|
|
9578
|
-
|
|
9578
|
+
*/
|
|
9579
9579
|
|
|
9580
9580
|
html += "<li><br/></li>";
|
|
9581
9581
|
|
|
@@ -10416,8 +10416,8 @@ class SetMenu {
|
|
|
10416
10416
|
//}
|
|
10417
10417
|
|
|
10418
10418
|
//!!!
|
|
10419
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
10420
|
-
html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
10419
|
+
//html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
10420
|
+
//html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
10421
10421
|
}
|
|
10422
10422
|
else {
|
|
10423
10423
|
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
@@ -10548,7 +10548,7 @@ class SetMenu {
|
|
|
10548
10548
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
|
|
10549
10549
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
|
|
10550
10550
|
//!!!
|
|
10551
|
-
html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
|
|
10551
|
+
//html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
|
|
10552
10552
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
|
|
10553
10553
|
html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
|
|
10554
10554
|
}
|
|
@@ -10640,13 +10640,13 @@ class SetMenu {
|
|
|
10640
10640
|
|
|
10641
10641
|
html += "<ul>";
|
|
10642
10642
|
//!!!
|
|
10643
|
-
|
|
10643
|
+
/*
|
|
10644
10644
|
html += this.getLink('mn6_igrefYes', 'Show Ig Ref. Number', undefined, 2);
|
|
10645
10645
|
html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
|
|
10646
10646
|
html += this.getLink('mn6_igrefNo', 'Hide Ig Ref. Number', undefined, 2);
|
|
10647
10647
|
|
|
10648
10648
|
html += this.getMenuSep();
|
|
10649
|
-
|
|
10649
|
+
*/
|
|
10650
10650
|
html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
|
|
10651
10651
|
html += "</ul>";
|
|
10652
10652
|
html += "</li>";
|
|
@@ -11872,12 +11872,14 @@ class SetDialog {
|
|
|
11872
11872
|
|
|
11873
11873
|
|
|
11874
11874
|
html += me.htmlCls.divStr + "dl_selection' class='" + dialogClass + "'>";
|
|
11875
|
-
html += this.addNotebookTitle('dl_selection', '
|
|
11875
|
+
html += this.addNotebookTitle('dl_selection', 'Please input the selection file');
|
|
11876
11876
|
html += "Selection file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "selectionfile'><br/>";
|
|
11877
11877
|
html += me.htmlCls.buttonStr + "reload_selectionfile' style='margin-top: 6px;'>Load</button>";
|
|
11878
11878
|
html += "</div>";
|
|
11879
11879
|
|
|
11880
11880
|
html += me.htmlCls.divStr + "dl_collection' class='" + dialogClass + "'>";
|
|
11881
|
+
html += this.addNotebookTitle('dl_collection', 'Please input the collection file');
|
|
11882
|
+
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>";
|
|
11881
11883
|
html += "Collection file: " + me.htmlCls.inputFileStr + "id='" + me.pre + "collectionfile'><br/>";
|
|
11882
11884
|
html += me.htmlCls.buttonStr + "reload_collectionfile' style='margin-top: 6px;'>Load</button>";
|
|
11883
11885
|
html += "</div>";
|
|
@@ -14112,7 +14114,8 @@ class Events {
|
|
|
14112
14114
|
let dataStr = JSON.parse(e.target.result);
|
|
14113
14115
|
let collection = [dataStr["structures"].map(({ id }) => id), dataStr["structures"].map(({ title }) => title)];
|
|
14114
14116
|
let collectionHtml = ic.selectCollectionsCls.setAtomMenu(collection[0], collection[1]);
|
|
14115
|
-
|
|
14117
|
+
let bNoDuplicate = true;
|
|
14118
|
+
await ic.chainalignParserCls.downloadMmdbAf(collection[0][0], undefined, undefined, bNoDuplicate);
|
|
14116
14119
|
|
|
14117
14120
|
ic.opts["color"] = "structure";
|
|
14118
14121
|
ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
@@ -38535,7 +38538,8 @@ class AnnoDomain {
|
|
|
38535
38538
|
for(let j = from; j <= to; ++j) {
|
|
38536
38539
|
// 0-based
|
|
38537
38540
|
let obj = {};
|
|
38538
|
-
|
|
38541
|
+
let resi = ic.ParserUtilsCls.getResi(chnid, j+1);
|
|
38542
|
+
obj[chnid + '_' + resi] = domainName;
|
|
38539
38543
|
ic.resid2domain[chnid].push(obj);
|
|
38540
38544
|
}
|
|
38541
38545
|
}
|
|
@@ -47095,7 +47099,7 @@ class LineGraph {
|
|
|
47095
47099
|
console.log("domainid: " + domainid);
|
|
47096
47100
|
}
|
|
47097
47101
|
|
|
47098
|
-
if(!
|
|
47102
|
+
if(!domainid2segs.hasOwnProperty(domainid) || queryData[0].score >= ic.domainid2score[domainid].split('_')[0]) {
|
|
47099
47103
|
ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
|
|
47100
47104
|
|
|
47101
47105
|
ic.domainid2refpdbname[domainid] = refpdbname;
|
|
@@ -47175,6 +47179,7 @@ class LineGraph {
|
|
|
47175
47179
|
|
|
47176
47180
|
// combine domainid into chainid
|
|
47177
47181
|
let processedChainid = {};
|
|
47182
|
+
|
|
47178
47183
|
for(let domainid in ic.domainid2refpdbname) {
|
|
47179
47184
|
// remove the first round template
|
|
47180
47185
|
if(ic.domainid2refpdbname[domainid].substr(0,1) == '1') {
|
|
@@ -50647,6 +50652,7 @@ class ChainalignParser {
|
|
|
50647
50652
|
me.htmlCls.clickMenuCls.setLogCmd("Align " + mmdbid1 + " with " + mmdbid2, false);
|
|
50648
50653
|
|
|
50649
50654
|
let bNoAlert = true;
|
|
50655
|
+
|
|
50650
50656
|
let bAligned = this.processAlign(align, i, queryData, bEqualMmdbid, bEqualChain, bNoAlert);
|
|
50651
50657
|
|
|
50652
50658
|
if(bAligned) {
|
|
@@ -51158,7 +51164,6 @@ class ChainalignParser {
|
|
|
51158
51164
|
ic.qt_start_end[index] = align[0].segs;
|
|
51159
51165
|
|
|
51160
51166
|
let rmsd = align[0].super_rmsd;
|
|
51161
|
-
console.log();
|
|
51162
51167
|
|
|
51163
51168
|
let logStr = "alignment RMSD: " + rmsd.toPrecision(4);
|
|
51164
51169
|
if(me.cfg.aligntool == 'tmalign') logStr += "; TM-score: " + align[0].score.toPrecision(4);
|
|
@@ -51243,7 +51248,7 @@ console.log();
|
|
|
51243
51248
|
}
|
|
51244
51249
|
}
|
|
51245
51250
|
|
|
51246
|
-
async downloadMmdbAf(idlist, bQuery, vastplusAtype) { let ic = this.icn3d, me = ic.icn3dui;
|
|
51251
|
+
async downloadMmdbAf(idlist, bQuery, vastplusAtype, bNoDuplicate) { let ic = this.icn3d, me = ic.icn3dui;
|
|
51247
51252
|
let thisClass = this;
|
|
51248
51253
|
|
|
51249
51254
|
ic.structArray = (ic.structures) ? Object.keys(ic.structures) : [];
|
|
@@ -51262,11 +51267,17 @@ console.log();
|
|
|
51262
51267
|
let structArrayTmp = idlist.split(',');
|
|
51263
51268
|
|
|
51264
51269
|
let structArray = [];
|
|
51265
|
-
|
|
51270
|
+
|
|
51266
51271
|
for(let i = 0, il = structArrayTmp.length; i < il; ++i) {
|
|
51267
|
-
|
|
51272
|
+
let id = structArrayTmp[i].toUpperCase();
|
|
51273
|
+
// sometimes we want to load same structure multiple times
|
|
51274
|
+
if(!ic.structures.hasOwnProperty(id) && structArray.indexOf(id) == -1) {
|
|
51268
51275
|
structArray.push(structArrayTmp[i]);
|
|
51269
51276
|
}
|
|
51277
|
+
else {
|
|
51278
|
+
// only when bNoDuplicate is undefined/false, it's allowed to load multiple copies of the same structure
|
|
51279
|
+
if(!bNoDuplicate) structArray.push(structArrayTmp[i] + me.htmlCls.postfix);
|
|
51280
|
+
}
|
|
51270
51281
|
}
|
|
51271
51282
|
|
|
51272
51283
|
if(structArray.length == 0) return;
|
|
@@ -54740,6 +54751,7 @@ class RealignParser {
|
|
|
54740
54751
|
// reinitialize
|
|
54741
54752
|
ic.qt_start_end = [];
|
|
54742
54753
|
|
|
54754
|
+
let chainidHash = {};
|
|
54743
54755
|
for(let index = 0, indexl = chainidArray.length - 1; index < indexl; ++index) {
|
|
54744
54756
|
let fromStruct = chainidArray[index + 1].substr(0, chainidArray[index + 1].indexOf('_')); //.toUpperCase();
|
|
54745
54757
|
|
|
@@ -54747,6 +54759,8 @@ class RealignParser {
|
|
|
54747
54759
|
|
|
54748
54760
|
let chainTo = toStruct + chainidArray[0].substr(chainidArray[0].indexOf('_'));
|
|
54749
54761
|
let chainFrom = fromStruct + chainidArray[index + 1].substr(chainidArray[index + 1].indexOf('_'));
|
|
54762
|
+
chainidHash[chainTo] = 1;
|
|
54763
|
+
chainidHash[chainFrom] = 1;
|
|
54750
54764
|
|
|
54751
54765
|
chainidArray[0] = chainTo;
|
|
54752
54766
|
chainidArray[index + 1] = chainFrom;
|
|
@@ -54776,13 +54790,17 @@ class RealignParser {
|
|
|
54776
54790
|
// set ic.qt_start_end in alignCoords()
|
|
54777
54791
|
|
|
54778
54792
|
let result = ic.ParserUtilsCls.alignCoords(coord2, coord1, fromStruct, undefined, chainTo, chainFrom, index + 1, bChainAlign);
|
|
54793
|
+
|
|
54779
54794
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
|
|
54780
54795
|
rmsd = parseFloat(result.rmsd);
|
|
54781
54796
|
}
|
|
54782
54797
|
|
|
54783
54798
|
// If rmsd from vastsrv is too large, realign the chains
|
|
54784
|
-
if(me.cfg.chainalign && !me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
|
|
54785
|
-
|
|
54799
|
+
//if(me.cfg.chainalign && !me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
|
|
54800
|
+
if(!me.cfg.usepdbnum && me.cfg.resdef && rmsd > 5) {
|
|
54801
|
+
console.log("RMSD from VAST is larger than 5. Realign the chains with TM-align.");
|
|
54802
|
+
//let nameArray = me.cfg.chainalign.split(',');
|
|
54803
|
+
let nameArray = Object.keys(chainidHash);
|
|
54786
54804
|
if(nameArray.length > 0) {
|
|
54787
54805
|
ic.hAtoms = ic.definedSetsCls.getAtomsFromNameArray(nameArray);
|
|
54788
54806
|
}
|
|
@@ -55226,7 +55244,7 @@ class RealignParser {
|
|
|
55226
55244
|
struct2resid[chainid] = [];
|
|
55227
55245
|
}
|
|
55228
55246
|
|
|
55229
|
-
if(bPredefined) {
|
|
55247
|
+
if(bPredefined) {
|
|
55230
55248
|
//base = parseInt(ic.chainsSeq[chainid][0].resi);
|
|
55231
55249
|
|
|
55232
55250
|
if(i == 0) ;
|
|
@@ -55242,6 +55260,7 @@ class RealignParser {
|
|
|
55242
55260
|
|
|
55243
55261
|
// master
|
|
55244
55262
|
resiArray = predefinedResPair[0].split(",");
|
|
55263
|
+
|
|
55245
55264
|
result = thisClass.getSeqCoorResid(resiArray, chainid_t);
|
|
55246
55265
|
|
|
55247
55266
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
|
|
@@ -55256,6 +55275,7 @@ class RealignParser {
|
|
|
55256
55275
|
|
|
55257
55276
|
// slave
|
|
55258
55277
|
resiArray = predefinedResPair[1].split(",");
|
|
55278
|
+
|
|
55259
55279
|
result = thisClass.getSeqCoorResid(resiArray, chainid);
|
|
55260
55280
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
|
|
55261
55281
|
|
|
@@ -56481,6 +56501,7 @@ class ParserUtils {
|
|
|
56481
56501
|
if(rmsd) {
|
|
56482
56502
|
me.htmlCls.clickMenuCls.setLogCmd("realignment RMSD: " + rmsd.toPrecision(4), false);
|
|
56483
56503
|
let html = "<br><b>Realignment RMSD</b>: " + rmsd.toPrecision(4) + " Å<br><br>";
|
|
56504
|
+
|
|
56484
56505
|
if(ic.bAfMem && !me.cfg.chainalign) {
|
|
56485
56506
|
//if(window.dialog && window.dialog.hasClass('ui-dialog-content')) window.dialog.dialog( "close" );
|
|
56486
56507
|
html += me.utilsCls.getMemDesc();
|
|
@@ -63046,7 +63067,7 @@ class DefinedSets {
|
|
|
63046
63067
|
|
|
63047
63068
|
nameArrayTmp.forEach((elem) => {
|
|
63048
63069
|
structureArray.forEach((structure) => {
|
|
63049
|
-
if (ic.defNames2Residues[elem][0].split("_")[0].includes(structure.split("_")[0])){
|
|
63070
|
+
if (ic.defNames2Residues[elem] && ic.defNames2Residues[elem][0] && ic.defNames2Residues[elem][0].split("_")[0].includes(structure.split("_")[0])){
|
|
63050
63071
|
if ($.inArray(elem, nameArray) === -1) nameArray.push(elem);
|
|
63051
63072
|
}
|
|
63052
63073
|
});
|
|
@@ -63616,6 +63637,10 @@ class DefinedSets {
|
|
|
63616
63637
|
|
|
63617
63638
|
}
|
|
63618
63639
|
|
|
63640
|
+
/**
|
|
63641
|
+
* @author Jack Lin <th3linja@yahoo.com> / https://github.com/ncbi/icn3d
|
|
63642
|
+
*/
|
|
63643
|
+
|
|
63619
63644
|
class SelectCollections {
|
|
63620
63645
|
constructor(icn3d) {
|
|
63621
63646
|
this.icn3d = icn3d;
|
|
@@ -63683,7 +63708,8 @@ class SelectCollections {
|
|
|
63683
63708
|
ic.nameArray = nameArray;
|
|
63684
63709
|
if (nameArray !== null) {
|
|
63685
63710
|
ic.bShowHighlight = false;
|
|
63686
|
-
|
|
63711
|
+
let bNoDuplicate = true;
|
|
63712
|
+
await ic.chainalignParserCls.downloadMmdbAf(nameArray.toString(), undefined, undefined, bNoDuplicate);
|
|
63687
63713
|
|
|
63688
63714
|
ic.dAtoms = {};
|
|
63689
63715
|
ic.hAtoms = {};
|
|
@@ -75412,7 +75438,7 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
|
|
|
75412
75438
|
// load multiple PDBs
|
|
75413
75439
|
// ic.bNCBI = true;
|
|
75414
75440
|
ic.bMmdbafid = true;
|
|
75415
|
-
|
|
75441
|
+
|
|
75416
75442
|
let bQuery = true;
|
|
75417
75443
|
await ic.chainalignParserCls.downloadMmdbAf(mmdbafid, bQuery);
|
|
75418
75444
|
}
|