icn3d 3.25.17 → 3.25.19

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.module.js CHANGED
@@ -42867,17 +42867,7 @@ class ShowSeq {
42867
42867
  html3 += '</div></div>';
42868
42868
  }
42869
42869
  else if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid)) {
42870
- let result = this.showRefNum(giSeq, chnid);
42871
- html += result.html;
42872
- html3 += result.html3;
42873
-
42874
- let kabat_or_imgt = 1;
42875
- result = this.showRefNum(giSeq, chnid, kabat_or_imgt);
42876
- html += result.html;
42877
- html3 += result.html3;
42878
-
42879
- kabat_or_imgt = 2;
42880
- result = this.showRefNum(giSeq, chnid, kabat_or_imgt);
42870
+ let result = this.showAllRefNum(giSeq, chnid);
42881
42871
  html += result.html;
42882
42872
  html3 += result.html3;
42883
42873
  }
@@ -42905,6 +42895,26 @@ class ShowSeq {
42905
42895
  $("#" + ic.pre + 'tt_giseq_' + chnid).html(html3); // fixed title for scrolling
42906
42896
  }
42907
42897
 
42898
+ showAllRefNum(giSeq, chnid) { let ic = this.icn3d; ic.icn3dui;
42899
+ let html = '', html3 = '';
42900
+
42901
+ let result = this.showRefNum(giSeq, chnid);
42902
+ html += result.html;
42903
+ html3 += result.html3;
42904
+
42905
+ let kabat_or_imgt = 1;
42906
+ result = this.showRefNum(giSeq, chnid, kabat_or_imgt);
42907
+ html += result.html;
42908
+ html3 += result.html3;
42909
+
42910
+ kabat_or_imgt = 2;
42911
+ result = this.showRefNum(giSeq, chnid, kabat_or_imgt);
42912
+ html += result.html;
42913
+ html3 += result.html3;
42914
+
42915
+ return {'html': html, 'html3': html3};
42916
+ }
42917
+
42908
42918
  showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d; ic.icn3dui;
42909
42919
  let html = '', html3 = '';
42910
42920
 
@@ -42937,11 +42947,12 @@ class ShowSeq {
42937
42947
 
42938
42948
  //check if Kabat refnum available
42939
42949
  let bKabatFound = false;
42950
+
42940
42951
  for(let i = 0, il = giSeq.length; i < il; ++i) {
42941
42952
  let currResi = ic.ParserUtilsCls.getResi(chnid, i);
42942
42953
  let residueid = chnid + '_' + currResi;
42943
42954
  let domainid = (bCustom) ? 0 : ic.resid2domainid[residueid];
42944
-
42955
+
42945
42956
  if(ic.domainid2ig2kabat[domainid] && Object.keys(ic.domainid2ig2kabat[domainid]).length > 0) {
42946
42957
  bKabatFound = true;
42947
42958
  break;
@@ -43082,12 +43093,10 @@ class ShowSeq {
43082
43093
  prevStrand = currStrand;
43083
43094
  }
43084
43095
 
43085
- // 2. remove strands with less than 3 residues
43096
+ // 2. remove strands with less than 3 residues except G strand
43086
43097
  for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
43087
- if(strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
43098
+ if(strandArray[i].strand.substr(0, 1) != 'G' && strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
43088
43099
  if(i != il - 1) { // modify
43089
- // strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
43090
-
43091
43100
  strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
43092
43101
  }
43093
43102
 
@@ -63439,8 +63448,8 @@ class Dssp {
63439
63448
 
63440
63449
  let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
63441
63450
 
63442
- // if(!ic.resid2domainid) ic.resid2domainid = {};
63443
- ic.resid2domainid = {};
63451
+ if(!ic.resid2domainid) ic.resid2domainid = {};
63452
+ //ic.resid2domainid = {};
63444
63453
  ic.domainid2pdb = {};
63445
63454
 
63446
63455
  let minResidues = 20;
@@ -63474,8 +63483,8 @@ class Dssp {
63474
63483
  let residueArray = ic.resid2specCls.atoms2residues(Object.keys(currAtoms));
63475
63484
  for(let n = 0, nl = residueArray.length; n < nl; ++n) {
63476
63485
  let resid = residueArray[n];
63477
- ic.resid2domainid[resid] = chainid + '-0';
63478
- }
63486
+ ic.resid2domainid[resid] = chainid + '-0' + '_' + Object.keys(currAtoms).length;
63487
+ }
63479
63488
  }
63480
63489
  else {
63481
63490
  for(let k = 0, kl = subdomains.length; k < kl; ++k) {
@@ -63486,15 +63495,23 @@ class Dssp {
63486
63495
  let startResi = segArray[m];
63487
63496
  let endResi = segArray[m+1];
63488
63497
  for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
63489
- //let residNCBI = chainid + '_' + n;
63490
- //let resid = ic.ncbi2resid[residNCBI];
63491
63498
  let resid = chainid + '_' + pos2resi[n];
63492
63499
  domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
63493
- ic.resid2domainid[resid] = chainid + '-' + k;
63500
+ //ic.resid2domainid[resid] = chainid + '-' + k;
63494
63501
  }
63495
63502
  }
63496
63503
 
63497
63504
  domainAtomsArray.push(domainAtoms);
63505
+
63506
+ for(let m = 0, ml = segArray.length; m < ml; m += 2) {
63507
+ let startResi = segArray[m];
63508
+ let endResi = segArray[m+1];
63509
+ for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
63510
+ let resid = chainid + '_' + pos2resi[n];
63511
+ //domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
63512
+ ic.resid2domainid[resid] = chainid + '-' + k + '_' + Object.keys(domainAtoms).length;
63513
+ }
63514
+ }
63498
63515
  }
63499
63516
  }
63500
63517
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.25.17",
3
+ "version": "3.25.19",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {