icn3d 3.25.18 → 3.25.20

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 CHANGED
@@ -41966,17 +41966,7 @@ class ShowSeq {
41966
41966
  html3 += '</div></div>';
41967
41967
  }
41968
41968
  else if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid)) {
41969
- let result = this.showRefNum(giSeq, chnid);
41970
- html += result.html;
41971
- html3 += result.html3;
41972
-
41973
- let kabat_or_imgt = 1;
41974
- result = this.showRefNum(giSeq, chnid, kabat_or_imgt);
41975
- html += result.html;
41976
- html3 += result.html3;
41977
-
41978
- kabat_or_imgt = 2;
41979
- result = this.showRefNum(giSeq, chnid, kabat_or_imgt);
41969
+ let result = this.showAllRefNum(giSeq, chnid);
41980
41970
  html += result.html;
41981
41971
  html3 += result.html3;
41982
41972
  }
@@ -42004,7 +41994,27 @@ class ShowSeq {
42004
41994
  $("#" + ic.pre + 'tt_giseq_' + chnid).html(html3); // fixed title for scrolling
42005
41995
  }
42006
41996
 
42007
- showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d; ic.icn3dui;
41997
+ showAllRefNum(giSeq, chnid) { let ic = this.icn3d; ic.icn3dui;
41998
+ let html = '', html3 = '';
41999
+
42000
+ let result = this.showRefNum(giSeq, chnid);
42001
+ html += result.html;
42002
+ html3 += result.html3;
42003
+
42004
+ let kabat_or_imgt = 1;
42005
+ result = this.showRefNum(giSeq, chnid, kabat_or_imgt);
42006
+ html += result.html;
42007
+ html3 += result.html3;
42008
+
42009
+ kabat_or_imgt = 2;
42010
+ result = this.showRefNum(giSeq, chnid, kabat_or_imgt);
42011
+ html += result.html;
42012
+ html3 += result.html3;
42013
+
42014
+ return {'html': html, 'html3': html3};
42015
+ }
42016
+
42017
+ showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d, me = ic.icn3dui;
42008
42018
  let html = '', html3 = '';
42009
42019
 
42010
42020
  let chainList = '';
@@ -42036,11 +42046,12 @@ class ShowSeq {
42036
42046
 
42037
42047
  //check if Kabat refnum available
42038
42048
  let bKabatFound = false;
42049
+
42039
42050
  for(let i = 0, il = giSeq.length; i < il; ++i) {
42040
42051
  let currResi = ic.ParserUtilsCls.getResi(chnid, i);
42041
42052
  let residueid = chnid + '_' + currResi;
42042
42053
  let domainid = (bCustom) ? 0 : ic.resid2domainid[residueid];
42043
-
42054
+
42044
42055
  if(ic.domainid2ig2kabat[domainid] && Object.keys(ic.domainid2ig2kabat[domainid]).length > 0) {
42045
42056
  bKabatFound = true;
42046
42057
  break;
@@ -42073,7 +42084,7 @@ class ShowSeq {
42073
42084
  // sometimes one chain may have several Ig domains,set an index for each IgDomain
42074
42085
  let index = 1, bStart = false;
42075
42086
 
42076
- if(!bCustom && !kabat_or_imgt) {
42087
+ if(!bCustom && !kabat_or_imgt && !me.bNode) { // domnot overwrite loop in node
42077
42088
  // reset ic.residIgLoop for the current selection, which could be the second round of ref num assignment
42078
42089
  let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
42079
42090
  for(let resid in residHash) {
@@ -62536,8 +62547,8 @@ class Dssp {
62536
62547
 
62537
62548
  let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
62538
62549
 
62539
- // if(!ic.resid2domainid) ic.resid2domainid = {};
62540
- ic.resid2domainid = {};
62550
+ if(!ic.resid2domainid) ic.resid2domainid = {};
62551
+ //ic.resid2domainid = {};
62541
62552
  ic.domainid2pdb = {};
62542
62553
 
62543
62554
  let minResidues = 20;
@@ -62571,8 +62582,8 @@ class Dssp {
62571
62582
  let residueArray = ic.resid2specCls.atoms2residues(Object.keys(currAtoms));
62572
62583
  for(let n = 0, nl = residueArray.length; n < nl; ++n) {
62573
62584
  let resid = residueArray[n];
62574
- ic.resid2domainid[resid] = chainid + '-0';
62575
- }
62585
+ ic.resid2domainid[resid] = chainid + '-0' + '_' + Object.keys(currAtoms).length;
62586
+ }
62576
62587
  }
62577
62588
  else {
62578
62589
  for(let k = 0, kl = subdomains.length; k < kl; ++k) {
@@ -62583,15 +62594,23 @@ class Dssp {
62583
62594
  let startResi = segArray[m];
62584
62595
  let endResi = segArray[m+1];
62585
62596
  for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
62586
- //let residNCBI = chainid + '_' + n;
62587
- //let resid = ic.ncbi2resid[residNCBI];
62588
62597
  let resid = chainid + '_' + pos2resi[n];
62589
62598
  domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
62590
- ic.resid2domainid[resid] = chainid + '-' + k;
62599
+ //ic.resid2domainid[resid] = chainid + '-' + k;
62591
62600
  }
62592
62601
  }
62593
62602
 
62594
62603
  domainAtomsArray.push(domainAtoms);
62604
+
62605
+ for(let m = 0, ml = segArray.length; m < ml; m += 2) {
62606
+ let startResi = segArray[m];
62607
+ let endResi = segArray[m+1];
62608
+ for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
62609
+ let resid = chainid + '_' + pos2resi[n];
62610
+ //domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
62611
+ ic.resid2domainid[resid] = chainid + '-' + k + '_' + Object.keys(domainAtoms).length;
62612
+ }
62613
+ }
62595
62614
  }
62596
62615
  }
62597
62616