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.module.js
CHANGED
|
@@ -9803,7 +9803,7 @@ class ClickMenu {
|
|
|
9803
9803
|
let resid = residueArray[i];
|
|
9804
9804
|
|
|
9805
9805
|
if(ic.resid2refnum) delete ic.resid2refnum[resid];
|
|
9806
|
-
if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
|
|
9806
|
+
// if(ic.resid2refnum_ori) delete ic.resid2refnum_ori[resid];
|
|
9807
9807
|
if(ic.resid2domainid) delete ic.resid2domainid[resid];
|
|
9808
9808
|
}
|
|
9809
9809
|
|
|
@@ -37080,7 +37080,7 @@ class Alternate {
|
|
|
37080
37080
|
|
|
37081
37081
|
ic.drawCls.draw();
|
|
37082
37082
|
|
|
37083
|
-
ic.bShowHighlight = true;
|
|
37083
|
+
ic.bShowHighlight = true; //reset
|
|
37084
37084
|
}
|
|
37085
37085
|
|
|
37086
37086
|
async alternateWrapper() { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -42070,7 +42070,7 @@ class AnnoIg {
|
|
|
42070
42070
|
|
|
42071
42071
|
let tmscore = info.score;
|
|
42072
42072
|
|
|
42073
|
-
let igType = (parseFloat(tmscore) < ic.refnumCls.
|
|
42073
|
+
let igType = (parseFloat(tmscore) < ic.refnumCls.TMThresholdIgType ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
|
|
42074
42074
|
titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
|
|
42075
42075
|
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);
|
|
42076
42076
|
|
|
@@ -43417,13 +43417,11 @@ class Domain3d {
|
|
|
43417
43417
|
init3ddomain() { let ic = this.icn3d; ic.icn3dui;
|
|
43418
43418
|
//this.dcut = 8; // threshold for C-alpha interactions
|
|
43419
43419
|
|
|
43420
|
-
// It seemed the threshold 7 angstrom works better
|
|
43421
|
-
//this.dcut = 7; // threshold for C-alpha interactions
|
|
43422
43420
|
this.dcut = 8; // threshold for C-alpha interactions
|
|
43423
43421
|
|
|
43424
43422
|
// added by Jiyao
|
|
43425
|
-
//
|
|
43426
|
-
this.min_contacts =
|
|
43423
|
+
// Ig domain should not be separated into two parts, set min as 2
|
|
43424
|
+
this.min_contacts = 2; //3; // minimum number of contacts to be considered as neighbors
|
|
43427
43425
|
|
|
43428
43426
|
this.MAX_SSE = 512;
|
|
43429
43427
|
|
|
@@ -47121,34 +47119,32 @@ class Annotation {
|
|
|
47121
47119
|
}
|
|
47122
47120
|
|
|
47123
47121
|
async updateIg(bSelection, template) { let ic = this.icn3d, me = ic.icn3dui;
|
|
47124
|
-
|
|
47125
|
-
|
|
47126
|
-
|
|
47127
|
-
|
|
47128
|
-
|
|
47129
|
-
|
|
47122
|
+
ic.opts['color'] = 'ig strand';
|
|
47123
|
+
|
|
47124
|
+
// if(!bSelection && !template) {
|
|
47125
|
+
if(!bSelection) {
|
|
47126
|
+
// select all protein chains
|
|
47127
|
+
ic.hAtoms = {};
|
|
47128
|
+
for(let chainid in ic.protein_chainid) {
|
|
47129
|
+
ic.hAtoms = me.hashUtilsCls.unionHash(ic.hAtoms, ic.chains[chainid]);
|
|
47130
47130
|
}
|
|
47131
47131
|
}
|
|
47132
47132
|
|
|
47133
|
-
//
|
|
47134
|
-
|
|
47135
|
-
|
|
47136
|
-
|
|
47137
|
-
|
|
47138
|
-
|
|
47139
|
-
|
|
47140
|
-
}
|
|
47133
|
+
// clear previous refnum
|
|
47134
|
+
let residueHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
|
|
47135
|
+
for(let resid in residueHash) {
|
|
47136
|
+
if(ic.resid2refnum) delete ic.resid2refnum[resid];
|
|
47137
|
+
if(ic.residIgLoop) delete ic.residIgLoop[resid];
|
|
47138
|
+
if(ic.resid2domainid) delete ic.resid2domainid[resid];
|
|
47139
|
+
}
|
|
47141
47140
|
|
|
47142
|
-
|
|
47143
|
-
|
|
47144
|
-
|
|
47145
|
-
|
|
47146
|
-
|
|
47141
|
+
ic.bRunRefnumAgain = true;
|
|
47142
|
+
for(let chainid in ic.protein_chainid) {
|
|
47143
|
+
await ic.annoIgCls.showIg(chainid, template);
|
|
47144
|
+
ic.bRunRefnumAgain = false; // run it once for all chains
|
|
47145
|
+
}
|
|
47147
47146
|
|
|
47148
47147
|
if(ic.bShowRefnum) {
|
|
47149
|
-
// ic.opts.color = 'ig strand';
|
|
47150
|
-
// ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
|
|
47151
|
-
|
|
47152
47148
|
ic.hlUpdateCls.updateHlAll();
|
|
47153
47149
|
ic.drawCls.draw();
|
|
47154
47150
|
}
|
|
@@ -48883,10 +48879,14 @@ class HlSeq {
|
|
|
48883
48879
|
}
|
|
48884
48880
|
*/
|
|
48885
48881
|
|
|
48886
|
-
if(($(that).attr('domain') !== undefined || $(that).attr('feat') !== undefined) || $(that).attr('
|
|
48882
|
+
if(($(that).attr('domain') !== undefined || $(that).attr('feat') !== undefined) || $(that).attr('ig') !== undefined) {
|
|
48887
48883
|
let residNCBI = chainid + '_' + (j+1).toString();
|
|
48888
48884
|
residueid = ic.ncbi2resid[residNCBI];
|
|
48889
48885
|
}
|
|
48886
|
+
else if($(that).attr('3ddomain') !== undefined) {
|
|
48887
|
+
// the position of residues with coordinates
|
|
48888
|
+
residueid = ic.posid2resid[chainid + '_' + (j+1).toString()];
|
|
48889
|
+
}
|
|
48890
48890
|
else {
|
|
48891
48891
|
residueid = chainid + '_' + (j+1).toString();
|
|
48892
48892
|
}
|
|
@@ -50862,7 +50862,7 @@ class ShowInter {
|
|
|
50862
50862
|
}
|
|
50863
50863
|
}
|
|
50864
50864
|
|
|
50865
|
-
ic.bShowHighlight = false;
|
|
50865
|
+
//!!!ic.bShowHighlight = false;
|
|
50866
50866
|
}
|
|
50867
50867
|
|
|
50868
50868
|
hideHydrogens() { let ic = this.icn3d; ic.icn3dui;
|
|
@@ -52442,8 +52442,10 @@ class ContactMap {
|
|
|
52442
52442
|
// json format: [{"residue1": [1, ..., 1, ..., n, ..., n], "residue2": [1, 2, ..., n, ..., 1, 2, ..., n],
|
|
52443
52443
|
// "distance": [n*n matrix],"max_predicted_aligned_error":31.75}]
|
|
52444
52444
|
//let distMatrix = dataJson[0].distance; // version 2, one dimension
|
|
52445
|
-
let
|
|
52446
|
-
let
|
|
52445
|
+
let data = (dataJson[0]) ? dataJson[0] : dataJson; // dataJson[0] is from AlphaFold UniProt database
|
|
52446
|
+
let distMatrix = data.predicted_aligned_error || data.pae; // version 3, two dimensions
|
|
52447
|
+
let max = data.max_predicted_aligned_error || data.max_pae; // max_predicted_aligned_error is from AlphaFold UniProt database
|
|
52448
|
+
|
|
52447
52449
|
if(!distMatrix || !max) {
|
|
52448
52450
|
alert("The PAE file didn't have the right format...");
|
|
52449
52451
|
return;
|
|
@@ -53844,7 +53846,7 @@ class ChainalignParser {
|
|
|
53844
53846
|
ic.init();
|
|
53845
53847
|
}
|
|
53846
53848
|
else {
|
|
53847
|
-
ic.resetConfig();
|
|
53849
|
+
//ic.resetConfig();
|
|
53848
53850
|
|
|
53849
53851
|
ic.bResetAnno = true;
|
|
53850
53852
|
ic.bResetSets = true;
|
|
@@ -53940,7 +53942,9 @@ class ChainalignParser {
|
|
|
53940
53942
|
let hAtoms = {}, hAtomsTmp = {};
|
|
53941
53943
|
let bLastQuery = false;
|
|
53942
53944
|
|
|
53943
|
-
|
|
53945
|
+
let opts = {};
|
|
53946
|
+
|
|
53947
|
+
opts['color'] = (structArray.length > 1) ? 'structure' : ((structArray[0].length > 5) ? 'confidence' : 'chain');
|
|
53944
53948
|
|
|
53945
53949
|
for(let i = 0, il = structArray.length; i < il; ++i) {
|
|
53946
53950
|
if(i == structArray.length - 1) bLastQuery = true;
|
|
@@ -53972,11 +53976,22 @@ class ChainalignParser {
|
|
|
53972
53976
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
|
|
53973
53977
|
}
|
|
53974
53978
|
|
|
53975
|
-
//
|
|
53976
|
-
|
|
53977
|
-
ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
|
|
53979
|
+
// add color only for the newly loaded structures
|
|
53980
|
+
ic.setColorCls.setColorByOptions(opts, hAtoms);
|
|
53978
53981
|
|
|
53979
|
-
|
|
53982
|
+
if(ic.bAnnoShown) {
|
|
53983
|
+
await ic.showAnnoCls.showAnnotations();
|
|
53984
|
+
ic.annotationCls.resetAnnoTabAll();
|
|
53985
|
+
}
|
|
53986
|
+
|
|
53987
|
+
// await ic.ParserUtilsCls.renderStructure();
|
|
53988
|
+
// ic.drawCls.draw();
|
|
53989
|
+
|
|
53990
|
+
// if(ic.bAnnoShown) {
|
|
53991
|
+
// await ic.showAnnoCls.showAnnotations();
|
|
53992
|
+
// ic.annotationCls.resetAnnoTabAll();
|
|
53993
|
+
// }
|
|
53994
|
+
|
|
53980
53995
|
if(me.cfg.rotate !== undefined) ic.resizeCanvasCls.rotStruc(me.cfg.rotate, true);
|
|
53981
53996
|
|
|
53982
53997
|
if(bQuery && me.cfg.matchedchains) {
|
|
@@ -55528,7 +55543,7 @@ class MmdbParser {
|
|
|
55528
55543
|
if(Object.keys(data.atoms).length == 0) { // for large structures such as 3J3Q
|
|
55529
55544
|
// use mmtfid
|
|
55530
55545
|
let pdbid = data.pdbId;
|
|
55531
|
-
await ic.
|
|
55546
|
+
await ic.bcifParserCls.downloadBcif(pdbid);
|
|
55532
55547
|
|
|
55533
55548
|
return;
|
|
55534
55549
|
}
|
|
@@ -65629,7 +65644,7 @@ class ApplyCommand {
|
|
|
65629
65644
|
else if(command == 'clear selection') {
|
|
65630
65645
|
ic.hlObjectsCls.removeHlObjects();
|
|
65631
65646
|
ic.hlUpdateCls.removeHl2D();
|
|
65632
|
-
ic.bShowHighlight = false;
|
|
65647
|
+
// !!!ic.bShowHighlight = false;
|
|
65633
65648
|
|
|
65634
65649
|
ic.bSelectResidue = false;
|
|
65635
65650
|
}
|
|
@@ -67786,6 +67801,8 @@ class SelectCollections {
|
|
|
67786
67801
|
true
|
|
67787
67802
|
);
|
|
67788
67803
|
ic.bSelectResidue = false;
|
|
67804
|
+
|
|
67805
|
+
ic.bShowHighlight = true; // reset
|
|
67789
67806
|
}
|
|
67790
67807
|
});
|
|
67791
67808
|
|
|
@@ -71214,7 +71231,8 @@ class Dssp {
|
|
|
71214
71231
|
class Refnum {
|
|
71215
71232
|
constructor(icn3d) {
|
|
71216
71233
|
this.icn3d = icn3d;
|
|
71217
|
-
this.
|
|
71234
|
+
this.TMThresholdIgType = 0.85;
|
|
71235
|
+
this.TMThresholdTemplate = 0.4;
|
|
71218
71236
|
this.topClusters = 5;
|
|
71219
71237
|
}
|
|
71220
71238
|
|
|
@@ -71448,6 +71466,7 @@ class Dssp {
|
|
|
71448
71466
|
ic.domainid2pdb = {};
|
|
71449
71467
|
|
|
71450
71468
|
let bNoMoreIg = true;
|
|
71469
|
+
let bFoundDomain = false;
|
|
71451
71470
|
for(let i = 0, il = struArray.length; i < il; ++i) {
|
|
71452
71471
|
let struct = struArray[i];
|
|
71453
71472
|
let chainidArray = ic.structures[struct];
|
|
@@ -71461,6 +71480,12 @@ class Dssp {
|
|
|
71461
71480
|
if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
|
|
71462
71481
|
if(!ic.domainid2score) ic.domainid2score = {};
|
|
71463
71482
|
|
|
71483
|
+
if(domainAtomsArray.length == 0) {
|
|
71484
|
+
continue;
|
|
71485
|
+
}
|
|
71486
|
+
|
|
71487
|
+
bFoundDomain = true;
|
|
71488
|
+
|
|
71464
71489
|
for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
|
|
71465
71490
|
bNoMoreIg = false;
|
|
71466
71491
|
|
|
@@ -71474,6 +71499,10 @@ class Dssp {
|
|
|
71474
71499
|
let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtomsArray[k]).length;
|
|
71475
71500
|
//let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
|
|
71476
71501
|
let domainid = chainid + ',' + k + '_' + resiSum;
|
|
71502
|
+
|
|
71503
|
+
// clear score
|
|
71504
|
+
delete ic.domainid2score[domainid];
|
|
71505
|
+
|
|
71477
71506
|
ic.domainid2pdb[domainid] = pdb_target;
|
|
71478
71507
|
|
|
71479
71508
|
if(!template) {
|
|
@@ -71503,6 +71532,10 @@ class Dssp {
|
|
|
71503
71532
|
}
|
|
71504
71533
|
}
|
|
71505
71534
|
|
|
71535
|
+
if(!bFoundDomain) {
|
|
71536
|
+
return bNoMoreIg;
|
|
71537
|
+
}
|
|
71538
|
+
|
|
71506
71539
|
//try {
|
|
71507
71540
|
if(!template) {
|
|
71508
71541
|
let dataArray2 = [];
|
|
@@ -71638,27 +71671,13 @@ class Dssp {
|
|
|
71638
71671
|
// clear previous refnum assignment if any
|
|
71639
71672
|
// delete ic.resid2refnum[resid];
|
|
71640
71673
|
delete ic.residIgLoop[resid];
|
|
71674
|
+
delete ic.resid2domainid[resid];
|
|
71641
71675
|
}
|
|
71642
71676
|
}
|
|
71643
71677
|
|
|
71644
71678
|
if(resCnt < minResidues) continue;
|
|
71645
71679
|
|
|
71646
71680
|
domainAtomsArray.push(domainAtoms);
|
|
71647
|
-
/*
|
|
71648
|
-
let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtoms);
|
|
71649
|
-
let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtoms);
|
|
71650
|
-
let resiSum = atomFirst.resi + ':' + atomLast.resi + ':' + Object.keys(domainAtoms).length;
|
|
71651
|
-
|
|
71652
|
-
for(let m = 0, ml = segArray.length; m < ml; m += 2) {
|
|
71653
|
-
let startResi = segArray[m];
|
|
71654
|
-
let endResi = segArray[m+1];
|
|
71655
|
-
for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
|
|
71656
|
-
let resid = chainid + '_' + pos2resi[n - 1];
|
|
71657
|
-
//domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
|
|
71658
|
-
ic.resid2domainid[resid] = chainid + ',' + k + '_' + resiSum;
|
|
71659
|
-
}
|
|
71660
|
-
}
|
|
71661
|
-
*/
|
|
71662
71681
|
}
|
|
71663
71682
|
}
|
|
71664
71683
|
|
|
@@ -71683,9 +71702,6 @@ class Dssp {
|
|
|
71683
71702
|
|
|
71684
71703
|
parseAlignData_part1(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
|
|
71685
71704
|
// async parseAlignData(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
|
|
71686
|
-
let tmscoreThreshold = 0.45; // 0.4; //0.5;
|
|
71687
|
-
//let rmsdThreshold = 10;
|
|
71688
|
-
|
|
71689
71705
|
// find the best alignment for each chain
|
|
71690
71706
|
let domainid2segs = {};
|
|
71691
71707
|
let domainid2refpdbnamelist = {};
|
|
@@ -71698,6 +71714,7 @@ class Dssp {
|
|
|
71698
71714
|
if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
|
|
71699
71715
|
|
|
71700
71716
|
let minResidues = 20;
|
|
71717
|
+
|
|
71701
71718
|
for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
|
|
71702
71719
|
//let queryData = (me.bNode) ? dataArray[i] : dataArray[i].value; //[0];
|
|
71703
71720
|
let queryData = (dataArray[i]) ? dataArray[i].value : undefined; //[0];
|
|
@@ -71708,6 +71725,7 @@ class Dssp {
|
|
|
71708
71725
|
}
|
|
71709
71726
|
|
|
71710
71727
|
if(queryData[0].score === undefined) continue;
|
|
71728
|
+
let score = parseFloat(queryData[0].score);
|
|
71711
71729
|
|
|
71712
71730
|
//let domainid_index = domainidpairArray[i].split(',');
|
|
71713
71731
|
//let domainid = domainid_index[0];
|
|
@@ -71716,16 +71734,13 @@ class Dssp {
|
|
|
71716
71734
|
//let chainid = domainid.split('-')[0];
|
|
71717
71735
|
|
|
71718
71736
|
if(!bRound1) {
|
|
71719
|
-
if(queryData[0].score <
|
|
71720
|
-
if(!me.bNode) console.log("domainid " + domainid + " and refpdbname " + refpdbname + " were skipped due to a TM-score less than " +
|
|
71737
|
+
if(queryData[0].score < this.TMThresholdTemplate || queryData[0].num_res < minResidues) {
|
|
71738
|
+
if(!me.bNode) console.log("bRound1: " + bRound1 + ": domainid " + domainid + " and refpdbname " + refpdbname + " were skipped due to a TM-score less than " + this.TMThresholdTemplate);
|
|
71721
71739
|
continue;
|
|
71722
71740
|
}
|
|
71723
71741
|
}
|
|
71724
71742
|
else {
|
|
71725
|
-
|
|
71726
|
-
// continue;
|
|
71727
|
-
// }
|
|
71728
|
-
if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) {
|
|
71743
|
+
if(queryData[0].score < this.TMThresholdTemplate || queryData[0].num_res < minResidues / 2) {
|
|
71729
71744
|
continue;
|
|
71730
71745
|
}
|
|
71731
71746
|
}
|
|
@@ -71736,6 +71751,9 @@ class Dssp {
|
|
|
71736
71751
|
else {
|
|
71737
71752
|
// 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));
|
|
71738
71753
|
if(!me.bNode) console.log("domainid: " + domainid + " refpdbname " + refpdbname + " TM-score: " + queryData[0].score);
|
|
71754
|
+
|
|
71755
|
+
if(!domainid2refpdbnamelist[domainid]) domainid2refpdbnamelist[domainid] = {};
|
|
71756
|
+
domainid2refpdbnamelist[domainid][refpdbname] = score;
|
|
71739
71757
|
}
|
|
71740
71758
|
|
|
71741
71759
|
// Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
|
|
@@ -71795,8 +71813,7 @@ class Dssp {
|
|
|
71795
71813
|
delete ic.domainid2refpdbname[domainid];
|
|
71796
71814
|
delete ic.domainid2score[domainid];
|
|
71797
71815
|
}
|
|
71798
|
-
continue;
|
|
71799
|
-
}
|
|
71816
|
+
continue; }
|
|
71800
71817
|
// }
|
|
71801
71818
|
|
|
71802
71819
|
}
|
|
@@ -71816,7 +71833,6 @@ class Dssp {
|
|
|
71816
71833
|
// }
|
|
71817
71834
|
|
|
71818
71835
|
// let tmAdjust = 0.1;
|
|
71819
|
-
let score = parseFloat(queryData[0].score);
|
|
71820
71836
|
|
|
71821
71837
|
// if the TM score difference is within 0.1 and more strands are found, use the template with more strands
|
|
71822
71838
|
// if(!domainid2segs.hasOwnProperty(domainid) ||
|
|
@@ -71829,9 +71845,7 @@ class Dssp {
|
|
|
71829
71845
|
ic.domainid2score[domainid] = queryData[0].score + '_' + queryData[0].frac_identical + '_' + queryData[0].num_res ;
|
|
71830
71846
|
|
|
71831
71847
|
if(bRound1) {
|
|
71832
|
-
|
|
71833
|
-
ic.domainid2refpdbname[domainid] = score >= this.TMThreshold ? [refpdbname] : ['all_templates'];
|
|
71834
|
-
// if(me.bNode) ic.domainid2refpdbname[domainid] = ['all_templates'];
|
|
71848
|
+
ic.domainid2refpdbname[domainid] = score >= this.TMThresholdIgType ? [refpdbname] : ['all_templates'];
|
|
71835
71849
|
}
|
|
71836
71850
|
else {
|
|
71837
71851
|
ic.domainid2refpdbname[domainid] = [refpdbname];
|
|
@@ -71843,11 +71857,6 @@ class Dssp {
|
|
|
71843
71857
|
ic.domainid2ig2kabat[domainid] = queryData[0].ig2kabat;
|
|
71844
71858
|
ic.domainid2ig2imgt[domainid] = queryData[0].ig2imgt;
|
|
71845
71859
|
}
|
|
71846
|
-
|
|
71847
|
-
if(bRound1) {
|
|
71848
|
-
if(!domainid2refpdbnamelist[domainid]) domainid2refpdbnamelist[domainid] = {};
|
|
71849
|
-
domainid2refpdbnamelist[domainid][refpdbname] = score;
|
|
71850
|
-
}
|
|
71851
71860
|
}
|
|
71852
71861
|
|
|
71853
71862
|
// combine the top clusters for the 2nd round alignment
|
|
@@ -71874,6 +71883,7 @@ class Dssp {
|
|
|
71874
71883
|
let domainid2segs = this.parseAlignData_part1(dataArray, domainidpairArray, bRound1);
|
|
71875
71884
|
|
|
71876
71885
|
// no more Igs to detect
|
|
71886
|
+
// no need to rerun the rest residues any more
|
|
71877
71887
|
if(Object.keys(domainid2segs).length == 0) {
|
|
71878
71888
|
bNoMoreIg = true;
|
|
71879
71889
|
return bNoMoreIg;
|
|
@@ -71945,7 +71955,7 @@ class Dssp {
|
|
|
71945
71955
|
|
|
71946
71956
|
dataArray3 = await this.promiseWithFixedJobs(ajaxArray);
|
|
71947
71957
|
|
|
71948
|
-
await this.parseAlignData(dataArray3, domainidpairArray3, false);
|
|
71958
|
+
bNoMoreIg = await this.parseAlignData(dataArray3, domainidpairArray3, false);
|
|
71949
71959
|
|
|
71950
71960
|
// end of round 2
|
|
71951
71961
|
return bNoMoreIg;
|
|
@@ -71995,7 +72005,7 @@ class Dssp {
|
|
|
71995
72005
|
|
|
71996
72006
|
// assign ic.resid2refnum, ic.refnum2residArray, ic.chainsMapping
|
|
71997
72007
|
if(!ic.resid2refnum) ic.resid2refnum = {};
|
|
71998
|
-
if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
|
|
72008
|
+
// if(!ic.resid2refnum_ori) ic.resid2refnum_ori = {};
|
|
71999
72009
|
if(!ic.refnum2residArray) ic.refnum2residArray = {};
|
|
72000
72010
|
if(!ic.chainsMapping) ic.chainsMapping = {};
|
|
72001
72011
|
|
|
@@ -72168,7 +72178,7 @@ class Dssp {
|
|
|
72168
72178
|
// only sheet or loop will be aligned
|
|
72169
72179
|
if(atom.ss != 'helix') {
|
|
72170
72180
|
ic.resid2refnum[resid] = refnumLabel;
|
|
72171
|
-
ic.resid2refnum_ori[resid] = refnumLabel;
|
|
72181
|
+
// ic.resid2refnum_ori[resid] = refnumLabel;
|
|
72172
72182
|
ic.resid2domainid[resid] = domainid;
|
|
72173
72183
|
}
|
|
72174
72184
|
//}
|
|
@@ -72407,50 +72417,55 @@ class Dssp {
|
|
|
72407
72417
|
}
|
|
72408
72418
|
}
|
|
72409
72419
|
|
|
72410
|
-
let bIgDomain = (ic.domainid2info && Object.keys(ic.domainid2info).length > 0) ? 1 : 0;
|
|
72420
|
+
// let bIgDomain = (ic.domainid2info && Object.keys(ic.domainid2info).length > 0) ? 1 : 0;
|
|
72421
|
+
let stru2bIgDomain = {};
|
|
72422
|
+
for(let domainid in ic.domainid2info) {
|
|
72423
|
+
let stru = domainid.split('_')[0];
|
|
72424
|
+
stru2bIgDomain[stru] = 1;
|
|
72425
|
+
}
|
|
72411
72426
|
|
|
72412
|
-
|
|
72427
|
+
// if(bIgDomain) {
|
|
72428
|
+
for(let structure in ic.structures) {
|
|
72429
|
+
let bIgDomain = stru2bIgDomain.hasOwnProperty(structure) ? 1 : 0;
|
|
72413
72430
|
|
|
72414
|
-
|
|
72415
|
-
for(let
|
|
72416
|
-
|
|
72417
|
-
|
|
72418
|
-
let chnid = ic.structures[structure][m];
|
|
72419
|
-
let igArray = ic.chain2igArray[chnid];
|
|
72420
|
-
|
|
72421
|
-
if(igArray && igArray.length > 0) {
|
|
72422
|
-
refData += '{"' + chnid + '": {\n';
|
|
72423
|
-
|
|
72424
|
-
for(let i = 0, il = igArray.length; i < il; ++i) {
|
|
72425
|
-
let startPosArray = igArray[i].startPosArray;
|
|
72426
|
-
let endPosArray = igArray[i].endPosArray;
|
|
72427
|
-
let domainid = igArray[i].domainid;
|
|
72428
|
-
let info = ic.domainid2info[domainid];
|
|
72429
|
-
if(!info) continue;
|
|
72430
|
-
|
|
72431
|
-
refData += '"' + domainid + '": {\n';
|
|
72432
|
-
|
|
72433
|
-
refData += '"refpdbname":"' + info.refpdbname + '", "score":' + info.score + ', "seqid":' + info.seqid + ', "nresAlign":' + info.nresAlign + ', "data": [';
|
|
72434
|
-
for(let j = 0, jl = startPosArray.length; j < jl; ++j) {
|
|
72435
|
-
let startPos = startPosArray[j];
|
|
72436
|
-
let endPos = endPosArray[j];
|
|
72437
|
-
for(let k = startPos; k <= endPos; ++k) {
|
|
72438
|
-
const resid = chnid + '_' + ic.chainsSeq[chnid][k].resi + '_' + ic.chainsSeq[chnid][k].name;
|
|
72439
|
-
refData += '{"' + resid + '": "' + resid2refnum[resid] + '"},\n';
|
|
72440
|
-
}
|
|
72441
|
-
}
|
|
72442
|
-
refData += '],\n';
|
|
72431
|
+
refData += '{"' + structure + '": {"Ig domain" : ' + bIgDomain + ', "igs": [\n';
|
|
72432
|
+
for(let m = 0, ml = ic.structures[structure].length; m < ml; ++m) {
|
|
72433
|
+
let chnid = ic.structures[structure][m];
|
|
72434
|
+
let igArray = ic.chain2igArray[chnid];
|
|
72443
72435
|
|
|
72444
|
-
|
|
72436
|
+
if(igArray && igArray.length > 0) {
|
|
72437
|
+
refData += '{"' + chnid + '": {\n';
|
|
72438
|
+
|
|
72439
|
+
for(let i = 0, il = igArray.length; i < il; ++i) {
|
|
72440
|
+
let startPosArray = igArray[i].startPosArray;
|
|
72441
|
+
let endPosArray = igArray[i].endPosArray;
|
|
72442
|
+
let domainid = igArray[i].domainid;
|
|
72443
|
+
let info = ic.domainid2info[domainid];
|
|
72444
|
+
if(!info) continue;
|
|
72445
|
+
|
|
72446
|
+
refData += '"' + domainid + '": {\n';
|
|
72447
|
+
|
|
72448
|
+
refData += '"refpdbname":"' + info.refpdbname + '", "score":' + info.score + ', "seqid":' + info.seqid + ', "nresAlign":' + info.nresAlign + ', "data": [';
|
|
72449
|
+
for(let j = 0, jl = startPosArray.length; j < jl; ++j) {
|
|
72450
|
+
let startPos = startPosArray[j];
|
|
72451
|
+
let endPos = endPosArray[j];
|
|
72452
|
+
for(let k = startPos; k <= endPos; ++k) {
|
|
72453
|
+
const resid = chnid + '_' + ic.chainsSeq[chnid][k].resi + '_' + ic.chainsSeq[chnid][k].name;
|
|
72454
|
+
refData += '{"' + resid + '": "' + resid2refnum[resid] + '"},\n';
|
|
72455
|
+
}
|
|
72445
72456
|
}
|
|
72457
|
+
refData += '],\n';
|
|
72446
72458
|
|
|
72447
|
-
refData += '}
|
|
72459
|
+
refData += '},\n';
|
|
72448
72460
|
}
|
|
72449
|
-
}
|
|
72450
72461
|
|
|
72451
|
-
|
|
72462
|
+
refData += '}},\n';
|
|
72463
|
+
}
|
|
72452
72464
|
}
|
|
72465
|
+
|
|
72466
|
+
refData += ']}},\n';
|
|
72453
72467
|
}
|
|
72468
|
+
// }
|
|
72454
72469
|
}
|
|
72455
72470
|
// 2. show Kabat ref numbers
|
|
72456
72471
|
else if(type == 'kabat' || type == 'Kabat') {
|
|
@@ -72759,7 +72774,7 @@ class Dssp {
|
|
|
72759
72774
|
ic.resid2refnum[currResid] = strandArray[i].strand + (oriStartRefnum - k).toString();
|
|
72760
72775
|
|
|
72761
72776
|
ic.resid2domainid[currResid] = domainid;
|
|
72762
|
-
ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
|
|
72777
|
+
// ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
|
|
72763
72778
|
}
|
|
72764
72779
|
|
|
72765
72780
|
break;
|
|
@@ -72796,7 +72811,7 @@ class Dssp {
|
|
|
72796
72811
|
ic.resid2refnum[currResid] = strandArray[i].strand + (oriEndRefnum + k).toString();
|
|
72797
72812
|
|
|
72798
72813
|
ic.resid2domainid[currResid] = domainid;
|
|
72799
|
-
ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
|
|
72814
|
+
// ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
|
|
72800
72815
|
}
|
|
72801
72816
|
|
|
72802
72817
|
break;
|
|
@@ -72827,7 +72842,7 @@ class Dssp {
|
|
|
72827
72842
|
let domainid = ic.resid2domainid[resid];
|
|
72828
72843
|
removeDomainidHash[domainid] = 1;
|
|
72829
72844
|
continue;
|
|
72830
|
-
}
|
|
72845
|
+
}
|
|
72831
72846
|
}
|
|
72832
72847
|
}
|
|
72833
72848
|
|
|
@@ -73020,6 +73035,7 @@ class Dssp {
|
|
|
73020
73035
|
// remove domians without B,C,E,F strands
|
|
73021
73036
|
if(removeDomainidHash.hasOwnProperty(domainid)) {
|
|
73022
73037
|
delete ic.resid2refnum[residueid];
|
|
73038
|
+
delete ic.residIgLoop[residueid];
|
|
73023
73039
|
delete ic.resid2domainid[residueid];
|
|
73024
73040
|
|
|
73025
73041
|
continue;
|
|
@@ -78428,6 +78444,8 @@ class ThreeDPrint {
|
|
|
78428
78444
|
}
|
|
78429
78445
|
|
|
78430
78446
|
ic.drawCls.draw();
|
|
78447
|
+
|
|
78448
|
+
ic.bShowHighlight = true; // reset
|
|
78431
78449
|
}
|
|
78432
78450
|
|
|
78433
78451
|
//Reset the hydrogen bonds, distance lines to dashed lines. Reset the thickness to the default values.
|