icn3d 3.29.16 → 3.29.17

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
@@ -36881,8 +36881,9 @@ class AnnoCddSite {
36881
36881
  if(ic.seqStartLen && ic.seqStartLen[chnid]) html2 += ic.showSeqCls.insertMulGapOverview(chnid, ic.seqStartLen[chnid]);
36882
36882
 
36883
36883
  if(me.cfg.blast_rep_id != chnid) { // regular
36884
+ let color;
36884
36885
  for(let i = 0, il = fromArray.length; i < il; ++i) {
36885
- let color = this.getColorFromPos(chnid, fromArray[i], titleArray);
36886
+ if(i == 0) color = this.getColorFromPos(chnid, fromArray[i], titleArray);
36886
36887
 
36887
36888
  let emptyWidth;
36888
36889
  // if(titleArray) {
@@ -37919,19 +37920,24 @@ class AnnoIg {
37919
37920
  html2 += htmlTitle;
37920
37921
  html2 += htmlCnt + '<span class="icn3d-seqLine">';
37921
37922
 
37923
+ let prevDomainindex, color;
37922
37924
  for(let i = 0, il = fromArray.length; i < il; ++i) {
37923
37925
  let resi = ic.ParserUtilsCls.getResi(chnid, fromArray[i]);
37924
37926
  let resid = chnid + "_" + resi;
37925
- let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
37926
- let colorStr =(!atom || atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
37927
- let color =(atom && atom.color !== undefined) ? colorStr : "CCCCCC";
37928
37927
 
37929
37928
  let domainindex = posindex2domainindex[fromArray[i]];
37929
+ if(domainindex != prevDomainindex) {
37930
+ let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
37931
+ let colorStr =(!atom || atom.color === undefined || atom.color.getHexString() === 'FFFFFF') ? 'DDDDDD' : atom.color.getHexString();
37932
+ color =(atom && atom.color !== undefined) ? colorStr : "CCCCCC";
37933
+ }
37930
37934
 
37931
37935
  let emptyWidth =(i == 0) ? Math.round(ic.seqAnnWidth *(fromArray[i]) / ic.maxAnnoLength) :
37932
37936
  Math.round(ic.seqAnnWidth *(fromArray[i] - toArray[i-1] - 1) / ic.maxAnnoLength);
37933
37937
  html2 += '<div style="display:inline-block; width:' + emptyWidth + 'px;">&nbsp;</div>';
37934
37938
  html2 += '<div style="display:inline-block; color:white!important; font-weight:bold; background-color:#' + color + '; width:' + Math.round(ic.seqAnnWidth *(toArray[i] - fromArray[i] + 1) / ic.maxAnnoLength) + 'px;" class="icn3d-seqTitle ' + linkStr + '" ig="0" from="' + fromArray + '" to="' + toArray + '" shorttitle="' + domainArray[domainindex] + '" index="0" setname="' + chnid + '_igs" id="' + chnid + '_igs" anno="sequence" chain="' + chnid + '" title="' + domainArray[domainindex] + '">' + domainArray[domainindex] + ' </div>';
37939
+
37940
+ prevDomainindex = domainindex;
37935
37941
  }
37936
37942
 
37937
37943
  html2 += htmlCnt;
@@ -66024,9 +66030,9 @@ class Dssp {
66024
66030
 
66025
66031
  if(bRerunDomain) {
66026
66032
  let atomsAssigned = {};
66027
- //ic.resid2refnum_ori should be used
66028
- for(let resid in ic.resid2refnum_ori) {
66029
- atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
66033
+ // for(let resid in ic.resid2refnum_ori) {
66034
+ for(let resid in ic.resid2domainid) {
66035
+ if(ic.resid2domainid[resid]) atomsAssigned = me.hashUtilsCls.unionHash(atomsAssigned, ic.residues[resid]);
66030
66036
  }
66031
66037
 
66032
66038
  currAtoms = me.hashUtilsCls.exclHash(currAtoms, atomsAssigned);
@@ -66283,11 +66289,10 @@ class Dssp {
66283
66289
  }
66284
66290
 
66285
66291
  //!!!
66286
- /*
66287
- // combine the top three clusters for the 2nd round alignment
66292
+
66293
+ // combine the top four clusters for the 2nd round alignment
66288
66294
  if(bRound1) {
66289
66295
  for(let domainid in domainid2refpdbnamelist) {
66290
- if(!me.bNode) console.log("###score " + ic.domainid2score[domainid].split('_')[0] + " ic.domainid2refpdbname[domainid][0] " + ic.domainid2refpdbname[domainid][0])
66291
66296
  if(!me.bNode && ic.domainid2refpdbname[domainid][0] == 'all_templates') {
66292
66297
  let refpdbname2score = domainid2refpdbnamelist[domainid];
66293
66298
  let refpdbnameList = Object.keys(refpdbname2score);
@@ -66295,12 +66300,11 @@ class Dssp {
66295
66300
  return refpdbname2score[b] - refpdbname2score[a]
66296
66301
  });
66297
66302
  // top 3 templates
66298
- ic.domainid2refpdbname[domainid] = refpdbnameList.slice(0,3);
66303
+ ic.domainid2refpdbname[domainid] = refpdbnameList.slice(0,4);
66299
66304
  }
66300
- if(!me.bNode) console.log("###bb ic.domainid2refpdbname[domainid] " + ic.domainid2refpdbname[domainid])
66301
66305
  }
66302
66306
  }
66303
- */
66307
+
66304
66308
  return domainid2segs; // only used in round 2
66305
66309
  }
66306
66310
 
@@ -67167,6 +67171,7 @@ class Dssp {
67167
67171
  let currResid = chnid + '_' + currResi;
67168
67172
  delete ic.residIgLoop[currResid];
67169
67173
  ic.resid2domainid[currResid] = domainid;
67174
+ ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
67170
67175
  }
67171
67176
 
67172
67177
  break;
@@ -67200,6 +67205,7 @@ class Dssp {
67200
67205
  let currResid = chnid + '_' + currResi;
67201
67206
  delete ic.residIgLoop[currResid];
67202
67207
  ic.resid2domainid[currResid] = domainid;
67208
+ ic.resid2refnum_ori[currResid] = 1; // a hash to check which residues were assigned
67203
67209
  }
67204
67210
 
67205
67211
  break;