icn3d 3.25.16 → 3.25.18

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
@@ -32255,7 +32255,8 @@ class Alternate {
32255
32255
  ic.drawCls.draw();
32256
32256
 
32257
32257
  ic.bShowHighlight = true;
32258
- ic.opts['rotationcenter'] = 'molecule center';
32258
+ //ic.opts['rotationcenter'] = 'molecule center';
32259
+ ic.opts['rotationcenter'] = 'highlight center';
32259
32260
  }
32260
32261
 
32261
32262
  alternateWrapper() { let ic = this.icn3d; ic.icn3dui;
@@ -42180,12 +42181,10 @@ class ShowSeq {
42180
42181
  prevStrand = currStrand;
42181
42182
  }
42182
42183
 
42183
- // 2. remove strands with less than 3 residues
42184
+ // 2. remove strands with less than 3 residues except G strand
42184
42185
  for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
42185
- if(strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
42186
+ if(strandArray[i].strand.substr(0, 1) != 'G' && strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
42186
42187
  if(i != il - 1) { // modify
42187
- // strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
42188
-
42189
42188
  strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
42190
42189
  }
42191
42190
 
@@ -42212,6 +42211,8 @@ class ShowSeq {
42212
42211
  refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
42213
42212
  currRefnum = parseInt(refnumStr);
42214
42213
  refnumLabelNoPostfix = currStrand + currRefnum;
42214
+
42215
+ currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
42215
42216
 
42216
42217
  let firstChar = refnumLabel.substr(0,1);
42217
42218
  if(!bStart && (firstChar == ' ' || firstChar == 'A' || firstChar == 'B')) { // start of a new IG domain
@@ -42228,7 +42229,26 @@ class ShowSeq {
42228
42229
  refnumLabel = undefined;
42229
42230
  }
42230
42231
  else {
42231
- if(parseInt(currResi) < parseInt(strandArray[strandCnt].startResi)) {
42232
+ let bBefore = false, bInRange= false, bAfter = false;
42233
+ // 100, 100A
42234
+ if(parseInt(currResi) == parseInt(strandArray[strandCnt].startResi) && currResi != strandArray[strandCnt].startResi) {
42235
+ bBefore = currResi < strandArray[strandCnt].startResi;
42236
+ }
42237
+ else {
42238
+ bBefore = parseInt(currResi) < parseInt(strandArray[strandCnt].startResi);
42239
+ }
42240
+
42241
+ // 100, 100A
42242
+ if(parseInt(currResi) == parseInt(strandArray[strandCnt].endResi) && currResi != strandArray[strandCnt].endResi) {
42243
+ bAfter = currResi > strandArray[strandCnt].endResi;
42244
+ }
42245
+ else {
42246
+ bAfter = parseInt(currResi) > parseInt(strandArray[strandCnt].endResi);
42247
+ }
42248
+
42249
+ bInRange = (!bBefore && !bAfter) ? true : false;
42250
+
42251
+ if(bBefore) {
42232
42252
  ic.residIgLoop[residueid] = 1;
42233
42253
 
42234
42254
  if(bBeforeAstrand) { // make it continuous to the 1st strand
@@ -42289,7 +42309,7 @@ class ShowSeq {
42289
42309
  }
42290
42310
  }
42291
42311
  }
42292
- else if(parseInt(currResi) >= parseInt(strandArray[strandCnt].startResi) && parseInt(currResi) <= parseInt(strandArray[strandCnt].endResi)) {
42312
+ else if(bInRange) {
42293
42313
  // not in loop any more if you assign ref numbers multiple times
42294
42314
  //delete ic.residIgLoop[residueid];
42295
42315
 
@@ -42317,7 +42337,7 @@ class ShowSeq {
42317
42337
  }
42318
42338
  }
42319
42339
  }
42320
- else if(parseInt(currResi) > parseInt(strandArray[strandCnt].endResi)) {
42340
+ else if(bAfter) {
42321
42341
  ic.residIgLoop[residueid] = 1;
42322
42342
 
42323
42343
  if(!bAfterGstrand) {
@@ -53923,7 +53943,10 @@ class SetSeqAlign {
53923
53943
  */
53924
53944
 
53925
53945
  let resid = chainid + '_' + resi;
53926
- return ic.residueId2Name[resid];
53946
+ let resn = ic.residueId2Name[resid];
53947
+ if(!resn) resn = '?';
53948
+
53949
+ return resn;
53927
53950
  }
53928
53951
 
53929
53952
  getResiAferAlign(chainid, bRealign, pos) { let ic = this.icn3d, me = ic.icn3dui;