icn3d 3.31.4 → 3.31.6
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 +136 -118
- package/icn3d.min.js +5 -3
- package/icn3d.module.js +136 -118
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -8902,7 +8902,7 @@ class ClickMenu {
|
|
|
8902
8902
|
let resid = residueArray[i];
|
|
8903
8903
|
|
|
8904
8904
|
if(ic.resid2refnum) delete ic.resid2refnum[resid];
|
|
8905
|
-
if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
|
|
8905
|
+
// if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
|
|
8906
8906
|
if(ic.resid2domainid) delete ic.resid2domainid[resid];
|
|
8907
8907
|
}
|
|
8908
8908
|
|
|
@@ -36179,7 +36179,7 @@ class Alternate {
|
|
|
36179
36179
|
|
|
36180
36180
|
ic.drawCls.draw();
|
|
36181
36181
|
|
|
36182
|
-
ic.bShowHighlight = true;
|
|
36182
|
+
ic.bShowHighlight = true; //reset
|
|
36183
36183
|
}
|
|
36184
36184
|
|
|
36185
36185
|
async alternateWrapper() { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -41169,7 +41169,7 @@ class AnnoIg {
|
|
|
41169
41169
|
|
|
41170
41170
|
let tmscore = info.score;
|
|
41171
41171
|
|
|
41172
|
-
let igType = (parseFloat(tmscore) < ic.refnumCls.
|
|
41172
|
+
let igType = (parseFloat(tmscore) < ic.refnumCls.TMThresholdIgType ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
|
|
41173
41173
|
titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
|
|
41174
41174
|
fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', type: ' + ic.ref2igtype[info.refpdbname] + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
|
|
41175
41175
|
|
|
@@ -42516,13 +42516,11 @@ class Domain3d {
|
|
|
42516
42516
|
init3ddomain() { let ic = this.icn3d; ic.icn3dui;
|
|
42517
42517
|
//this.dcut = 8; // threshold for C-alpha interactions
|
|
42518
42518
|
|
|
42519
|
-
// It seemed the threshold 7 angstrom works better
|
|
42520
|
-
//this.dcut = 7; // threshold for C-alpha interactions
|
|
42521
42519
|
this.dcut = 8; // threshold for C-alpha interactions
|
|
42522
42520
|
|
|
42523
42521
|
// added by Jiyao
|
|
42524
|
-
//
|
|
42525
|
-
this.min_contacts =
|
|
42522
|
+
// Ig domain should not be separated into two parts, set min as 2
|
|
42523
|
+
this.min_contacts = 2; //3; // minimum number of contacts to be considered as neighbors
|
|
42526
42524
|
|
|
42527
42525
|
this.MAX_SSE = 512;
|
|
42528
42526
|
|
|
@@ -46220,34 +46218,32 @@ class Annotation {
|
|
|
46220
46218
|
}
|
|
46221
46219
|
|
|
46222
46220
|
async updateIg(bSelection, template) { let ic = this.icn3d, me = ic.icn3dui;
|
|
46223
|
-
|
|
46224
|
-
|
|
46225
|
-
|
|
46226
|
-
|
|
46227
|
-
|
|
46228
|
-
|
|
46221
|
+
ic.opts['color'] = 'ig strand';
|
|
46222
|
+
|
|
46223
|
+
// if(!bSelection && !template) {
|
|
46224
|
+
if(!bSelection) {
|
|
46225
|
+
// select all protein chains
|
|
46226
|
+
ic.hAtoms = {};
|
|
46227
|
+
for(let chainid in ic.protein_chainid) {
|
|
46228
|
+
ic.hAtoms = me.hashUtilsCls.unionHash(ic.hAtoms, ic.chains[chainid]);
|
|
46229
46229
|
}
|
|
46230
46230
|
}
|
|
46231
46231
|
|
|
46232
|
-
//
|
|
46233
|
-
|
|
46234
|
-
|
|
46235
|
-
|
|
46236
|
-
|
|
46237
|
-
|
|
46238
|
-
|
|
46239
|
-
}
|
|
46232
|
+
// clear previous refnum
|
|
46233
|
+
let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
|
|
46234
|
+
for(let resid in residueHash) {
|
|
46235
|
+
if(ic.resid2refnum) delete ic.resid2refnum[resid];
|
|
46236
|
+
if(ic.residIgLoop) delete ic.residIgLoop[resid];
|
|
46237
|
+
if(ic.resid2domainid) delete ic.resid2domainid[resid];
|
|
46238
|
+
}
|
|
46240
46239
|
|
|
46241
|
-
|
|
46242
|
-
|
|
46243
|
-
|
|
46244
|
-
|
|
46245
|
-
|
|
46240
|
+
ic.bRunRefnumAgain = true;
|
|
46241
|
+
for(let chainid in ic.protein_chainid) {
|
|
46242
|
+
await ic.annoIgCls.showIg(chainid, template);
|
|
46243
|
+
ic.bRunRefnumAgain = false; // run it once for all chains
|
|
46244
|
+
}
|
|
46246
46245
|
|
|
46247
46246
|
if(ic.bShowRefnum) {
|
|
46248
|
-
// ic.opts.color = 'ig strand';
|
|
46249
|
-
// ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
46250
|
-
|
|
46251
46247
|
ic.hlUpdateCls.updateHlAll();
|
|
46252
46248
|
ic.drawCls.draw();
|
|
46253
46249
|
}
|
|
@@ -47982,10 +47978,14 @@ class HlSeq {
|
|
|
47982
47978
|
}
|
|
47983
47979
|
*/
|
|
47984
47980
|
|
|
47985
|
-
if(($(that).attr('domain') !== undefined || $(that).attr('feat') !== undefined) || $(that).attr('
|
|
47981
|
+
if(($(that).attr('domain') !== undefined || $(that).attr('feat') !== undefined) || $(that).attr('ig') !== undefined) {
|
|
47986
47982
|
let residNCBI = chainid + '_' + (j+1).toString();
|
|
47987
47983
|
residueid = ic.ncbi2resid[residNCBI];
|
|
47988
47984
|
}
|
|
47985
|
+
else if($(that).attr('3ddomain') !== undefined) {
|
|
47986
|
+
// the position of residues with coordinates
|
|
47987
|
+
residueid = ic.posid2resid[chainid + '_' + (j+1).toString()];
|
|
47988
|
+
}
|
|
47989
47989
|
else {
|
|
47990
47990
|
residueid = chainid + '_' + (j+1).toString();
|
|
47991
47991
|
}
|
|
@@ -49961,7 +49961,7 @@ class ShowInter {
|
|
|
49961
49961
|
}
|
|
49962
49962
|
}
|
|
49963
49963
|
|
|
49964
|
-
ic.bShowHighlight = false;
|
|
49964
|
+
//!!!ic.bShowHighlight = false;
|
|
49965
49965
|
}
|
|
49966
49966
|
|
|
49967
49967
|
hideHydrogens() { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -51541,8 +51541,10 @@ class ContactMap {
|
|
|
51541
51541
|
// json format: [{"residue1": [1, ..., 1, ..., n, ..., n], "residue2": [1, 2, ..., n, ..., 1, 2, ..., n],
|
|
51542
51542
|
// "distance": [n*n matrix],"max_predicted_aligned_error":31.75}]
|
|
51543
51543
|
//let distMatrix = dataJson[0].distance; // version 2, one dimension
|
|
51544
|
-
let
|
|
51545
|
-
let
|
|
51544
|
+
let data = (dataJson[0]) ? dataJson[0] : dataJson; // dataJson[0] is from AlphaFold UniProt database
|
|
51545
|
+
let distMatrix = data.predicted_aligned_error || data.pae; // version 3, two dimensions
|
|
51546
|
+
let max = data.max_predicted_aligned_error || data.max_pae; // max_predicted_aligned_error is from AlphaFold UniProt database
|
|
51547
|
+
|
|
51546
51548
|
if(!distMatrix || !max) {
|
|
51547
51549
|
var aaa = 1; //alert("The PAE file didn't have the right format...");
|
|
51548
51550
|
return;
|
|
@@ -52943,7 +52945,7 @@ class ChainalignParser {
|
|
|
52943
52945
|
ic.init();
|
|
52944
52946
|
}
|
|
52945
52947
|
else {
|
|
52946
|
-
ic.resetConfig();
|
|
52948
|
+
//ic.resetConfig();
|
|
52947
52949
|
|
|
52948
52950
|
ic.bResetAnno = true;
|
|
52949
52951
|
ic.bResetSets = true;
|
|
@@ -53039,7 +53041,9 @@ class ChainalignParser {
|
|
|
53039
53041
|
let hAtoms = {}, hAtomsTmp = {};
|
|
53040
53042
|
let bLastQuery = false;
|
|
53041
53043
|
|
|
53042
|
-
|
|
53044
|
+
let opts = {};
|
|
53045
|
+
|
|
53046
|
+
opts['color'] = (structArray.length > 1) ? 'structure' : ((structArray[0].length > 5) ? 'confidence' : 'chain');
|
|
53043
53047
|
|
|
53044
53048
|
for(let i = 0, il = structArray.length; i < il; ++i) {
|
|
53045
53049
|
if(i == structArray.length - 1) bLastQuery = true;
|
|
@@ -53071,11 +53075,22 @@ class ChainalignParser {
|
|
|
53071
53075
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
|
|
53072
53076
|
}
|
|
53073
53077
|
|
|
53074
|
-
//
|
|
53075
|
-
|
|
53076
|
-
ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
|
|
53078
|
+
// add color only for the newly loaded structures
|
|
53079
|
+
ic.setColorCls.setColorByOptions(opts, hAtoms);
|
|
53077
53080
|
|
|
53078
|
-
|
|
53081
|
+
if(ic.bAnnoShown) {
|
|
53082
|
+
await ic.showAnnoCls.showAnnotations();
|
|
53083
|
+
ic.annotationCls.resetAnnoTabAll();
|
|
53084
|
+
}
|
|
53085
|
+
|
|
53086
|
+
// await ic.ParserUtilsCls.renderStructure();
|
|
53087
|
+
// ic.drawCls.draw();
|
|
53088
|
+
|
|
53089
|
+
// if(ic.bAnnoShown) {
|
|
53090
|
+
// await ic.showAnnoCls.showAnnotations();
|
|
53091
|
+
// ic.annotationCls.resetAnnoTabAll();
|
|
53092
|
+
// }
|
|
53093
|
+
|
|
53079
53094
|
if(me.cfg.rotate !== undefined) ic.resizeCanvasCls.rotStruc(me.cfg.rotate, true);
|
|
53080
53095
|
|
|
53081
53096
|
if(bQuery && me.cfg.matchedchains) {
|
|
@@ -54627,7 +54642,7 @@ class MmdbParser {
|
|
|
54627
54642
|
if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
|
|
54628
54643
|
// use mmtfid
|
|
54629
54644
|
let pdbid = data.pdbId;
|
|
54630
|
-
await ic.
|
|
54645
|
+
await ic.bcifParserCls.downloadBcif(pdbid);
|
|
54631
54646
|
|
|
54632
54647
|
return;
|
|
54633
54648
|
}
|
|
@@ -64728,7 +64743,7 @@ class ApplyCommand {
|
|
|
64728
64743
|
else if(command == 'clear selection') {
|
|
64729
64744
|
ic.hlObjectsCls.removeHlObjects();
|
|
64730
64745
|
ic.hlUpdateCls.removeHl2D();
|
|
64731
|
-
ic.bShowHighlight = false;
|
|
64746
|
+
// !!!ic.bShowHighlight = false;
|
|
64732
64747
|
|
|
64733
64748
|
ic.bSelectResidue = false;
|
|
64734
64749
|
}
|
|
@@ -66885,6 +66900,8 @@ class SelectCollections {
|
|
|
66885
66900
|
true
|
|
66886
66901
|
);
|
|
66887
66902
|
ic.bSelectResidue = false;
|
|
66903
|
+
|
|
66904
|
+
ic.bShowHighlight = true; // reset
|
|
66888
66905
|
}
|
|
66889
66906
|
});
|
|
66890
66907
|
|
|
@@ -70313,7 +70330,8 @@ class Dssp {
|
|
|
70313
70330
|
class Refnum {
|
|
70314
70331
|
constructor(icn3d) {
|
|
70315
70332
|
this.icn3d = icn3d;
|
|
70316
|
-
this.
|
|
70333
|
+
this.TMThresholdIgType = 0.85;
|
|
70334
|
+
this.TMThresholdTemplate = 0.4;
|
|
70317
70335
|
this.topClusters = 5;
|
|
70318
70336
|
}
|
|
70319
70337
|
|
|
@@ -70547,6 +70565,7 @@ class Dssp {
|
|
|
70547
70565
|
ic.domainid2pdb = {};
|
|
70548
70566
|
|
|
70549
70567
|
let bNoMoreIg = true;
|
|
70568
|
+
let bFoundDomain = false;
|
|
70550
70569
|
for(let i = 0, il = struArray.length; i < il; ++i) {
|
|
70551
70570
|
let struct = struArray[i];
|
|
70552
70571
|
let chainidArray = ic.structures[struct];
|
|
@@ -70560,6 +70579,12 @@ class Dssp {
|
|
|
70560
70579
|
if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
|
|
70561
70580
|
if(!ic.domainid2score) ic.domainid2score = {};
|
|
70562
70581
|
|
|
70582
|
+
if(domainAtomsArray.length == 0) {
|
|
70583
|
+
continue;
|
|
70584
|
+
}
|
|
70585
|
+
|
|
70586
|
+
bFoundDomain = true;
|
|
70587
|
+
|
|
70563
70588
|
for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
|
|
70564
70589
|
bNoMoreIg = false;
|
|
70565
70590
|
|
|
@@ -70573,6 +70598,10 @@ class Dssp {
|
|
|
70573
70598
|
let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtomsArray[k]).length;
|
|
70574
70599
|
//let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
|
|
70575
70600
|
let domainid = chainid + ',' + k + '_' + resiSum;
|
|
70601
|
+
|
|
70602
|
+
// clear score
|
|
70603
|
+
delete ic.domainid2score[domainid];
|
|
70604
|
+
|
|
70576
70605
|
ic.domainid2pdb[domainid] = pdb_target;
|
|
70577
70606
|
|
|
70578
70607
|
if(!template) {
|
|
@@ -70602,6 +70631,10 @@ class Dssp {
|
|
|
70602
70631
|
}
|
|
70603
70632
|
}
|
|
70604
70633
|
|
|
70634
|
+
if(!bFoundDomain) {
|
|
70635
|
+
return bNoMoreIg;
|
|
70636
|
+
}
|
|
70637
|
+
|
|
70605
70638
|
//try {
|
|
70606
70639
|
if(!template) {
|
|
70607
70640
|
let dataArray2 = [];
|
|
@@ -70737,27 +70770,13 @@ class Dssp {
|
|
|
70737
70770
|
// clear previous refnum assignment if any
|
|
70738
70771
|
// delete ic.resid2refnum[resid];
|
|
70739
70772
|
delete ic.residIgLoop[resid];
|
|
70773
|
+
delete ic.resid2domainid[resid];
|
|
70740
70774
|
}
|
|
70741
70775
|
}
|
|
70742
70776
|
|
|
70743
70777
|
if(resCnt < minResidues) continue;
|
|
70744
70778
|
|
|
70745
70779
|
domainAtomsArray.push(domainAtoms);
|
|
70746
|
-
/*
|
|
70747
|
-
let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtoms);
|
|
70748
|
-
let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtoms);
|
|
70749
|
-
let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtoms).length;
|
|
70750
|
-
|
|
70751
|
-
for(let m = 0, ml = segArray.length; m < ml; m += 2) {
|
|
70752
|
-
let startResi = segArray[m];
|
|
70753
|
-
let endResi = segArray[m+1];
|
|
70754
|
-
for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
|
|
70755
|
-
let resid = chainid + '_' + pos2resi[n - 1];
|
|
70756
|
-
//domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
|
|
70757
|
-
ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
|
|
70758
|
-
}
|
|
70759
|
-
}
|
|
70760
|
-
*/
|
|
70761
70780
|
}
|
|
70762
70781
|
}
|
|
70763
70782
|
|
|
@@ -70782,9 +70801,6 @@ class Dssp {
|
|
|
70782
70801
|
|
|
70783
70802
|
parseAlignData_part1(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
|
|
70784
70803
|
// async parseAlignData(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
|
|
70785
|
-
let tmscoreThreshold = 0.45; // 0.4; //0.5;
|
|
70786
|
-
//let rmsdThreshold = 10;
|
|
70787
|
-
|
|
70788
70804
|
// find the best alignment for each chain
|
|
70789
70805
|
let domainid2segs = {};
|
|
70790
70806
|
let domainid2refpdbnamelist = {};
|
|
@@ -70797,6 +70813,7 @@ class Dssp {
|
|
|
70797
70813
|
if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
|
|
70798
70814
|
|
|
70799
70815
|
let minResidues = 20;
|
|
70816
|
+
|
|
70800
70817
|
for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
|
|
70801
70818
|
//let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
|
|
70802
70819
|
let queryData = (dataArray[i]) ? dataArray[i].value : undefined; //[0];
|
|
@@ -70807,6 +70824,7 @@ class Dssp {
|
|
|
70807
70824
|
}
|
|
70808
70825
|
|
|
70809
70826
|
if(queryData[0].score === undefined) continue;
|
|
70827
|
+
let score = parseFloat(queryData[0].score);
|
|
70810
70828
|
|
|
70811
70829
|
//let domainid_index = domainidpairArray[i].split(',');
|
|
70812
70830
|
//let domainid = domainid_index[0];
|
|
@@ -70815,16 +70833,13 @@ class Dssp {
|
|
|
70815
70833
|
//let chainid = domainid.split('-')[0];
|
|
70816
70834
|
|
|
70817
70835
|
if(!bRound1) {
|
|
70818
|
-
if(queryData[0].score <
|
|
70819
|
-
if(!me.bNode) console.log("domainid " + domainid + " and refpdbname " + refpdbname + " were skipped due to a TM-score less than " +
|
|
70836
|
+
if(queryData[0].score < this.TMThresholdTemplate || queryData[0].num_res < minResidues) {
|
|
70837
|
+
if(!me.bNode) console.log("bRound1: " + bRound1 + ": domainid " + domainid + " and refpdbname " + refpdbname + " were skipped due to a TM-score less than " + this.TMThresholdTemplate);
|
|
70820
70838
|
continue;
|
|
70821
70839
|
}
|
|
70822
70840
|
}
|
|
70823
70841
|
else {
|
|
70824
|
-
|
|
70825
|
-
// continue;
|
|
70826
|
-
// }
|
|
70827
|
-
if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
|
|
70842
|
+
if(queryData[0].score < this.TMThresholdTemplate || queryData[0].num_res < minResidues / 2) {
|
|
70828
70843
|
continue;
|
|
70829
70844
|
}
|
|
70830
70845
|
}
|
|
@@ -70835,6 +70850,9 @@ class Dssp {
|
|
|
70835
70850
|
else {
|
|
70836
70851
|
// if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " RMSD: " + queryData[0].super_rmsd + ", num_seg: " + queryData[0].num_seg + ", 10/RMSD + num_seg/5: " + (10 / queryData[0].super_rmsd + queryData[0].num_seg / 5).toFixed(1));
|
|
70837
70852
|
if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
|
|
70853
|
+
|
|
70854
|
+
if(!domainid2refpdbnamelist[domainid]) domainid2refpdbnamelist[domainid] = {};
|
|
70855
|
+
domainid2refpdbnamelist[domainid][refpdbname] = score;
|
|
70838
70856
|
}
|
|
70839
70857
|
|
|
70840
70858
|
// Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
|
|
@@ -70894,8 +70912,7 @@ class Dssp {
|
|
|
70894
70912
|
delete ic.domainid2refpdbname[domainid];
|
|
70895
70913
|
delete ic.domainid2score[domainid];
|
|
70896
70914
|
}
|
|
70897
|
-
continue;
|
|
70898
|
-
}
|
|
70915
|
+
continue; }
|
|
70899
70916
|
// }
|
|
70900
70917
|
|
|
70901
70918
|
}
|
|
@@ -70915,7 +70932,6 @@ class Dssp {
|
|
|
70915
70932
|
// }
|
|
70916
70933
|
|
|
70917
70934
|
// let tmAdjust = 0.1;
|
|
70918
|
-
let score = parseFloat(queryData[0].score);
|
|
70919
70935
|
|
|
70920
70936
|
// if the TM score difference is within 0.1 and more strands are found, use the template with more strands
|
|
70921
70937
|
// if(!domainid2segs.hasOwnProperty(domainid) ||
|
|
@@ -70928,9 +70944,7 @@ class Dssp {
|
|
|
70928
70944
|
ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
|
|
70929
70945
|
|
|
70930
70946
|
if(bRound1) {
|
|
70931
|
-
|
|
70932
|
-
ic.domainid2refpdbname[domainid] = score >= this.TMThreshold ? [refpdbname] : ['all_templates'];
|
|
70933
|
-
// if(me.bNode) ic.domainid2refpdbname[domainid] = ['all_templates'];
|
|
70947
|
+
ic.domainid2refpdbname[domainid] = score >= this.TMThresholdIgType ? [refpdbname] : ['all_templates'];
|
|
70934
70948
|
}
|
|
70935
70949
|
else {
|
|
70936
70950
|
ic.domainid2refpdbname[domainid] = [refpdbname];
|
|
@@ -70942,11 +70956,6 @@ class Dssp {
|
|
|
70942
70956
|
ic.domainid2ig2kabat[domainid] = queryData[0].ig2kabat;
|
|
70943
70957
|
ic.domainid2ig2imgt[domainid] = queryData[0].ig2imgt;
|
|
70944
70958
|
}
|
|
70945
|
-
|
|
70946
|
-
if(bRound1) {
|
|
70947
|
-
if(!domainid2refpdbnamelist[domainid]) domainid2refpdbnamelist[domainid] = {};
|
|
70948
|
-
domainid2refpdbnamelist[domainid][refpdbname] = score;
|
|
70949
|
-
}
|
|
70950
70959
|
}
|
|
70951
70960
|
|
|
70952
70961
|
// combine the top clusters for the 2nd round alignment
|
|
@@ -70973,6 +70982,7 @@ class Dssp {
|
|
|
70973
70982
|
let domainid2segs = this.parseAlignData_part1(dataArray, domainidpairArray, bRound1);
|
|
70974
70983
|
|
|
70975
70984
|
// no more Igs to detect
|
|
70985
|
+
// no need to rerun the rest residues any more
|
|
70976
70986
|
if(Object.keys(domainid2segs).length == 0) {
|
|
70977
70987
|
bNoMoreIg = true;
|
|
70978
70988
|
return bNoMoreIg;
|
|
@@ -71044,7 +71054,7 @@ class Dssp {
|
|
|
71044
71054
|
|
|
71045
71055
|
dataArray3 = await this.promiseWithFixedJobs(ajaxArray);
|
|
71046
71056
|
|
|
71047
|
-
await this.parseAlignData(dataArray3, domainidpairArray3, false);
|
|
71057
|
+
bNoMoreIg = await this.parseAlignData(dataArray3, domainidpairArray3, false);
|
|
71048
71058
|
|
|
71049
71059
|
// end of round 2
|
|
71050
71060
|
return bNoMoreIg;
|
|
@@ -71094,7 +71104,7 @@ class Dssp {
|
|
|
71094
71104
|
|
|
71095
71105
|
// assign ic.resid2refnum, ic.refnum2residArray, ic.chainsMapping
|
|
71096
71106
|
if(!ic.resid2refnum) ic.resid2refnum = {};
|
|
71097
|
-
if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
|
|
71107
|
+
// if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
|
|
71098
71108
|
if(!ic.refnum2residArray) ic.refnum2residArray = {};
|
|
71099
71109
|
if(!ic.chainsMapping) ic.chainsMapping = {};
|
|
71100
71110
|
|
|
@@ -71267,7 +71277,7 @@ class Dssp {
|
|
|
71267
71277
|
// only sheet or loop will be aligned
|
|
71268
71278
|
if(atom.ss != 'helix') {
|
|
71269
71279
|
ic.resid2refnum[resid] = refnumLabel;
|
|
71270
|
-
ic.resid2refnum_ori[resid] = refnumLabel;
|
|
71280
|
+
// ic.resid2refnum_ori[resid] = refnumLabel;
|
|
71271
71281
|
ic.resid2domainid[resid] = domainid;
|
|
71272
71282
|
}
|
|
71273
71283
|
//}
|
|
@@ -71506,50 +71516,55 @@ class Dssp {
|
|
|
71506
71516
|
}
|
|
71507
71517
|
}
|
|
71508
71518
|
|
|
71509
|
-
let bIgDomain = (ic.domainid2info && Object.keys(ic.domainid2info).length > 0) ? 1 : 0;
|
|
71519
|
+
// let bIgDomain = (ic.domainid2info && Object.keys(ic.domainid2info).length > 0) ? 1 : 0;
|
|
71520
|
+
let stru2bIgDomain = {};
|
|
71521
|
+
for(let domainid in ic.domainid2info) {
|
|
71522
|
+
let stru = domainid.split('_')[0];
|
|
71523
|
+
stru2bIgDomain[stru] = 1;
|
|
71524
|
+
}
|
|
71510
71525
|
|
|
71511
|
-
|
|
71526
|
+
// if(bIgDomain) {
|
|
71527
|
+
for(let structure in ic.structures) {
|
|
71528
|
+
let bIgDomain = stru2bIgDomain.hasOwnProperty(structure) ? 1 : 0;
|
|
71512
71529
|
|
|
71513
|
-
|
|
71514
|
-
for(let
|
|
71515
|
-
|
|
71516
|
-
|
|
71517
|
-
let chnid = ic.structures[structure][m];
|
|
71518
|
-
let igArray = ic.chain2igArray[chnid];
|
|
71519
|
-
|
|
71520
|
-
if(igArray && igArray.length > 0) {
|
|
71521
|
-
refData += '{"' + chnid + '": {\n';
|
|
71522
|
-
|
|
71523
|
-
for(let i = 0, il = igArray.length; i < il; ++i) {
|
|
71524
|
-
let startPosArray = igArray[i].startPosArray;
|
|
71525
|
-
let endPosArray = igArray[i].endPosArray;
|
|
71526
|
-
let domainid = igArray[i].domainid;
|
|
71527
|
-
let info = ic.domainid2info[domainid];
|
|
71528
|
-
if(!info) continue;
|
|
71529
|
-
|
|
71530
|
-
refData += '"' + domainid + '": {\n';
|
|
71531
|
-
|
|
71532
|
-
refData += '"refpdbname":"' + info.refpdbname + '", "score":' + info.score + ', "seqid":' + info.seqid + ', "nresAlign":' + info.nresAlign + ', "data": [';
|
|
71533
|
-
for(let j = 0, jl = startPosArray.length; j < jl; ++j) {
|
|
71534
|
-
let startPos = startPosArray[j];
|
|
71535
|
-
let endPos = endPosArray[j];
|
|
71536
|
-
for(let k = startPos; k <= endPos; ++k) {
|
|
71537
|
-
const resid = chnid + '_' + ic.chainsSeq[chnid][k].resi + '_' + ic.chainsSeq[chnid][k].name;
|
|
71538
|
-
refData += '{"' + resid + '": "' + resid2refnum[resid] + '"},\n';
|
|
71539
|
-
}
|
|
71540
|
-
}
|
|
71541
|
-
refData += '],\n';
|
|
71530
|
+
refData += '{"' + structure + '": {"Ig domain" : ' + bIgDomain + ', "igs": [\n';
|
|
71531
|
+
for(let m = 0, ml = ic.structures[structure].length; m < ml; ++m) {
|
|
71532
|
+
let chnid = ic.structures[structure][m];
|
|
71533
|
+
let igArray = ic.chain2igArray[chnid];
|
|
71542
71534
|
|
|
71543
|
-
|
|
71535
|
+
if(igArray && igArray.length > 0) {
|
|
71536
|
+
refData += '{"' + chnid + '": {\n';
|
|
71537
|
+
|
|
71538
|
+
for(let i = 0, il = igArray.length; i < il; ++i) {
|
|
71539
|
+
let startPosArray = igArray[i].startPosArray;
|
|
71540
|
+
let endPosArray = igArray[i].endPosArray;
|
|
71541
|
+
let domainid = igArray[i].domainid;
|
|
71542
|
+
let info = ic.domainid2info[domainid];
|
|
71543
|
+
if(!info) continue;
|
|
71544
|
+
|
|
71545
|
+
refData += '"' + domainid + '": {\n';
|
|
71546
|
+
|
|
71547
|
+
refData += '"refpdbname":"' + info.refpdbname + '", "score":' + info.score + ', "seqid":' + info.seqid + ', "nresAlign":' + info.nresAlign + ', "data": [';
|
|
71548
|
+
for(let j = 0, jl = startPosArray.length; j < jl; ++j) {
|
|
71549
|
+
let startPos = startPosArray[j];
|
|
71550
|
+
let endPos = endPosArray[j];
|
|
71551
|
+
for(let k = startPos; k <= endPos; ++k) {
|
|
71552
|
+
const resid = chnid + '_' + ic.chainsSeq[chnid][k].resi + '_' + ic.chainsSeq[chnid][k].name;
|
|
71553
|
+
refData += '{"' + resid + '": "' + resid2refnum[resid] + '"},\n';
|
|
71554
|
+
}
|
|
71544
71555
|
}
|
|
71556
|
+
refData += '],\n';
|
|
71545
71557
|
|
|
71546
|
-
refData += '}
|
|
71558
|
+
refData += '},\n';
|
|
71547
71559
|
}
|
|
71548
|
-
}
|
|
71549
71560
|
|
|
71550
|
-
|
|
71561
|
+
refData += '}},\n';
|
|
71562
|
+
}
|
|
71551
71563
|
}
|
|
71564
|
+
|
|
71565
|
+
refData += ']}},\n';
|
|
71552
71566
|
}
|
|
71567
|
+
// }
|
|
71553
71568
|
}
|
|
71554
71569
|
// 2. show Kabat ref numbers
|
|
71555
71570
|
else if(type == 'kabat' || type == 'Kabat') {
|
|
@@ -71858,7 +71873,7 @@ class Dssp {
|
|
|
71858
71873
|
ic.resid2refnum[currResid] = strandArray[i].strand + (oriStartRefnum - k).toString();
|
|
71859
71874
|
|
|
71860
71875
|
ic.resid2domainid[currResid] = domainid;
|
|
71861
|
-
ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
|
|
71876
|
+
// ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
|
|
71862
71877
|
}
|
|
71863
71878
|
|
|
71864
71879
|
break;
|
|
@@ -71895,7 +71910,7 @@ class Dssp {
|
|
|
71895
71910
|
ic.resid2refnum[currResid] = strandArray[i].strand + (oriEndRefnum + k).toString();
|
|
71896
71911
|
|
|
71897
71912
|
ic.resid2domainid[currResid] = domainid;
|
|
71898
|
-
ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
|
|
71913
|
+
// ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
|
|
71899
71914
|
}
|
|
71900
71915
|
|
|
71901
71916
|
break;
|
|
@@ -71926,7 +71941,7 @@ class Dssp {
|
|
|
71926
71941
|
let domainid = ic.resid2domainid[resid];
|
|
71927
71942
|
removeDomainidHash[domainid] = 1;
|
|
71928
71943
|
continue;
|
|
71929
|
-
}
|
|
71944
|
+
}
|
|
71930
71945
|
}
|
|
71931
71946
|
}
|
|
71932
71947
|
|
|
@@ -72119,6 +72134,7 @@ class Dssp {
|
|
|
72119
72134
|
// remove domians without B,C,E,F strands
|
|
72120
72135
|
if(removeDomainidHash.hasOwnProperty(domainid)) {
|
|
72121
72136
|
delete ic.resid2refnum[residueid];
|
|
72137
|
+
delete ic.residIgLoop[residueid];
|
|
72122
72138
|
delete ic.resid2domainid[residueid];
|
|
72123
72139
|
|
|
72124
72140
|
continue;
|
|
@@ -77527,6 +77543,8 @@ class ThreeDPrint {
|
|
|
77527
77543
|
}
|
|
77528
77544
|
|
|
77529
77545
|
ic.drawCls.draw();
|
|
77546
|
+
|
|
77547
|
+
ic.bShowHighlight = true; // reset
|
|
77530
77548
|
}
|
|
77531
77549
|
|
|
77532
77550
|
//Reset the hydrogen bonds, distance lines to dashed lines. Reset the thickness to the default values.
|