icn3d 3.25.6 → 3.25.8

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
@@ -39527,12 +39527,12 @@ class Domain3d {
39527
39527
 
39528
39528
  if (nsse <= 3)
39529
39529
  // too small, can't split or trim
39530
- return {subdomains: subdomains, substruct: substruct};
39530
+ return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi};
39531
39531
 
39532
39532
  if (nsse > this.MAX_SSE) {
39533
39533
  // we have a problem...
39534
39534
 
39535
- return {subdomains: subdomains, substruct: substruct};
39535
+ return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi};
39536
39536
  }
39537
39537
 
39538
39538
  let seqLen = residueArray.length; // + resiOffset;
@@ -39804,7 +39804,7 @@ class Domain3d {
39804
39804
  let k = prts[i] - 1;
39805
39805
 
39806
39806
  if ((k < 0) || (k >= substruct.length)) {
39807
- return {subdomains: subdomains, substruct: substruct};
39807
+ return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi};
39808
39808
  }
39809
39809
 
39810
39810
  //SSE_Rec sserec = substruct[k];
@@ -39921,7 +39921,7 @@ class Domain3d {
39921
39921
  }
39922
39922
  }
39923
39923
 
39924
- return {subdomains: subdomains, substruct: substruct, pos2resi:pos2resi };
39924
+ return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi };
39925
39925
  } // end c2b_NewSplitChain
39926
39926
 
39927
39927
  getDomainJsonForAlign(atoms) { let ic = this.icn3d, me = ic.icn3dui;
@@ -42824,9 +42824,9 @@ class ShowSeq {
42824
42824
  let index = 1, bStart = false;
42825
42825
 
42826
42826
  // 1. get the range of each strand excluding loops
42827
- let strandArray = [], strandHash = {}, strandCnt = 0, resCnt = 0, resCntBfAnchor = 0;
42827
+ let strandArray = [], strandHash = {}, strandCnt = 0, resCnt = 0, resCntBfAnchor = 0, resCntAtAnchor = 0;
42828
42828
  if(!bCustom && !kabat_or_imgt) {
42829
- for(let i = 0, il = giSeq.length; i < il; ++i, ++resCnt, ++resCntBfAnchor) {
42829
+ for(let i = 0, il = giSeq.length; i < il; ++i, ++resCnt, ++resCntBfAnchor, ++resCntAtAnchor) {
42830
42830
  let currResi = ic.ParserUtilsCls.getResi(chnid, i);
42831
42831
  let residueid = chnid + '_' + currResi;
42832
42832
  refnumLabel = ic.resid2refnum[residueid];
@@ -42877,6 +42877,8 @@ class ShowSeq {
42877
42877
  if(lastTwo == 50) {
42878
42878
  strandArray[strandCnt].anchorRefnum = refnum;
42879
42879
  strandArray[strandCnt].resCntBfAnchor = resCntBfAnchor;
42880
+
42881
+ resCntAtAnchor = 0;
42880
42882
  }
42881
42883
 
42882
42884
  strandArray[strandCnt].strandPostfix = strandPostfix; // a in A1250a
@@ -42891,12 +42893,22 @@ class ShowSeq {
42891
42893
  }
42892
42894
  else {
42893
42895
  if(strandHash[currStrand + postfix]) {
42894
- strandArray[strandCnt - 1].endResi = currResi;
42895
- strandArray[strandCnt - 1].endRefnum = refnum; // 1250a
42896
-
42897
42896
  if(lastTwo == 50) {
42898
42897
  strandArray[strandCnt - 1].anchorRefnum = refnum;
42899
42898
  strandArray[strandCnt - 1].resCntBfAnchor = resCntBfAnchor;
42899
+
42900
+ // update
42901
+ strandArray[strandCnt - 1].startRefnum = strandArray[strandCnt - 1].anchorRefnum - strandArray[strandCnt - 1].resCntBfAnchor;
42902
+
42903
+ resCntAtAnchor = 0;
42904
+ }
42905
+
42906
+ strandArray[strandCnt - 1].endResi = currResi;
42907
+ strandArray[strandCnt - 1].endRefnum = refnum; // 1250a
42908
+ strandArray[strandCnt - 1].resCntAtAnchor = resCntAtAnchor;
42909
+
42910
+ if(strandArray[strandCnt - 1].anchorRefnum) {
42911
+ strandArray[strandCnt - 1].endRefnum = strandArray[strandCnt - 1].anchorRefnum + strandArray[strandCnt - 1].resCntAtAnchor;
42900
42912
  }
42901
42913
 
42902
42914
  resCnt = 0;
@@ -42919,12 +42931,12 @@ class ShowSeq {
42919
42931
  strandArray.splice(i, 1);
42920
42932
  }
42921
42933
  }
42922
-
42934
+
42923
42935
  // 3. assign refnumLabel for each resid
42924
42936
  strandCnt = 0;
42925
42937
  let loopCnt = 0;
42926
42938
 
42927
- let bNterminal = true, refnumLabelNoPostfix, prevStrandCnt = 0, currRefnum;
42939
+ let bNterminal = true, bCterminal = true, refnumLabelNoPostfix, prevStrandCnt = 0, currRefnum;
42928
42940
  bStart = false;
42929
42941
  let refnumInStrand = 0;
42930
42942
  if(strandArray.length > 0) {
@@ -42999,6 +43011,7 @@ class ShowSeq {
42999
43011
  }
43000
43012
  else if(parseInt(currResi) >= parseInt(strandArray[strandCnt].startResi) && parseInt(currResi) <= parseInt(strandArray[strandCnt].endResi)) {
43001
43013
  bNterminal = false;
43014
+ //bCterminal = true; // The next will be C-terminal
43002
43015
 
43003
43016
  if(strandArray[strandCnt].anchorRefnum) { // use anchor to name refnum
43004
43017
  if(currResi == strandArray[strandCnt].startResi) {
@@ -43025,14 +43038,28 @@ class ShowSeq {
43025
43038
  else if(parseInt(currResi) > parseInt(strandArray[strandCnt].endResi)) {
43026
43039
  ic.residIgLoop[residueid] = 1;
43027
43040
 
43028
- // C-terminal
43029
- if(!ic.resid2refnum[residueid]) {
43030
- break;
43041
+ if(!bCterminal) {
43042
+ refnumLabelNoPostfix = undefined;
43043
+ refnumLabel = undefined;
43031
43044
  }
43032
43045
  else {
43033
- currRefnum = strandArray[strandCnt].endRefnum + loopCnt;
43034
- refnumLabelNoPostfix = strandArray[strandCnt].strand + currRefnum;
43035
- refnumLabel = refnumLabelNoPostfix + strandArray[strandCnt].strandPostfix;
43046
+ // C-terminal
43047
+ if(!ic.resid2refnum[residueid]) {
43048
+ //break;
43049
+
43050
+ bCterminal = false;
43051
+ //bNterminal = true; // The next will be N-terminal
43052
+
43053
+ refnumLabelNoPostfix = undefined;
43054
+ refnumLabel = undefined;
43055
+ }
43056
+ else {
43057
+ bCterminal = true;
43058
+
43059
+ currRefnum = strandArray[strandCnt].endRefnum + loopCnt;
43060
+ refnumLabelNoPostfix = strandArray[strandCnt].strand + currRefnum;
43061
+ refnumLabel = refnumLabelNoPostfix + strandArray[strandCnt].strandPostfix;
43062
+ }
43036
43063
  }
43037
43064
  }
43038
43065
  }
@@ -63221,7 +63248,7 @@ if(!me.bNode) {
63221
63248
  prevStrand = (refnumLabel) ? refnumLabel.replace(new RegExp(refnum,'g'), '') : undefined;
63222
63249
 
63223
63250
  ic.resid2refnum[resid] = refnumLabel;
63224
- console.log(resid + " " + refnumLabel);
63251
+
63225
63252
  // final reference numbers will be assign in ic.showSeqCls.showRefNum()
63226
63253
 
63227
63254
  // if(!ic.refnum2residArray.hasOwnProperty(refnum)) {
@@ -71331,7 +71358,7 @@ class iCn3DUI {
71331
71358
  //even when multiple iCn3D viewers are shown together.
71332
71359
  this.pre = this.cfg.divid + "_";
71333
71360
 
71334
- this.REVISION = '3.25.0';
71361
+ this.REVISION = '3.25.1';
71335
71362
 
71336
71363
  // In nodejs, iCn3D defines "window = {navigator: {}}"
71337
71364
  this.bNode = (Object.keys(window).length < 2) ? true : false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.25.6",
3
+ "version": "3.25.8",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {