icn3d 3.29.8 → 3.29.9

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
@@ -38177,6 +38177,8 @@ class AnnoIg {
38177
38177
 
38178
38178
  igElem.endPos = prevPos;
38179
38179
  ic.chain2igArray[chnid].push(igElem);
38180
+
38181
+ if(me.bNode) return {html: '', html2: '', html3: ''};
38180
38182
  let titleSpace = 120;
38181
38183
 
38182
38184
  let linkStr = 'icn3d-link icn3d-blue';
@@ -38233,10 +38235,13 @@ class AnnoIg {
38233
38235
  html += '</div>';
38234
38236
 
38235
38237
  let igArray = ic.chain2igArray[chnid];
38238
+ if(igArray.length == 0) return {html: '', html2: '', html3: ''};
38236
38239
  let rangeArray = [], titleArray = [], fullTitleArray = [], domainArray = [];
38237
38240
  for(let i = 0, il = igArray.length; i < il; ++i) {
38238
38241
  let domainid = igArray[i].domainid;
38239
38242
  let info = ic.domainid2info[domainid];
38243
+ if(!info) continue;
38244
+
38240
38245
  let tmscore = info.score;
38241
38246
  let igType = ic.ref2igtype[info.refpdbname];
38242
38247
  titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
@@ -38247,6 +38252,7 @@ class AnnoIg {
38247
38252
  range.locs = [{"from":igArray[i].startPos, "to":igArray[i].endPos}];
38248
38253
  rangeArray.push(range);
38249
38254
  }
38255
+ if(titleArray.length == 0) return {html: '', html2: '', html3: ''};
38250
38256
 
38251
38257
  // add tracks for the summary view
38252
38258
  for(let i = 0, il = fromArray.length; i < il; ++i) {
@@ -66924,7 +66930,7 @@ class Dssp {
66924
66930
  if(type == 'igstrand' || type == 'IgStrand') {
66925
66931
  // iGStrand reference numbers were adjusted when showing in sequences
66926
66932
  if(me.bNode) {
66927
- for(let chnid in ic.chains) {
66933
+ for(let chnid in ic.chains) {
66928
66934
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chnid]);
66929
66935
  if(ic.proteins.hasOwnProperty(atom.serial)) {
66930
66936
  let giSeq = [];
@@ -66988,21 +66994,22 @@ class Dssp {
66988
66994
  refData += '}\n';
66989
66995
  }
66990
66996
  */
66997
+
66991
66998
  if(bIgDomain) {
66992
66999
  refData += '"igs": [\n';
66993
-
66994
67000
  for(let chnid in ic.chains) {
66995
67001
  let igArray = ic.chain2igArray[chnid];
66996
67002
 
66997
- if(igArray.length > 0) {
67003
+ if(igArray && igArray.length > 0) {
66998
67004
  refData += '{"' + chnid + '": {\n';
66999
67005
 
67000
67006
  for(let i = 0, il = igArray.length; i < il; ++i) {
67001
67007
  let startPos = igArray[i].startPos;
67002
67008
  let endPos = igArray[i].endPos;
67003
67009
  let domainid = igArray[i].domainid;
67004
-
67005
67010
  let info = ic.domainid2info[domainid];
67011
+ if(!info) continue;
67012
+
67006
67013
  refData += '"' + domainid + '": {\n';
67007
67014
 
67008
67015
  refData += '"refpdbname":"' + info.refpdbname + '", "score":' + info.score + ', "seqid":' + info.seqid + ', "nresAlign":' + info.nresAlign + ', "data": [';