icn3d 3.31.7 → 3.31.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
@@ -40933,6 +40933,7 @@ class AnnoIg {
40933
40933
  ic.chain2igArray[chnid] = [];
40934
40934
  this.setChain2igArray(chnid, giSeq, bCustom);
40935
40935
 
40936
+
40936
40937
  // remove Igs without BCEF strands one more time
40937
40938
  let igArray = ic.chain2igArray[chnid];
40938
40939
 
@@ -41005,6 +41006,7 @@ class AnnoIg {
41005
41006
  }
41006
41007
  }
41007
41008
 
41009
+
41008
41010
  // reset ic.chain2igArray
41009
41011
  ic.chain2igArray[chnid] = [];
41010
41012
  this.setChain2igArray(chnid, giSeq, bCustom);
@@ -44422,7 +44424,8 @@ class AddTrack {
44422
44424
  }
44423
44425
 
44424
44426
  getExonHtml(exonIndex, colorGradient, from, to, genomeRange, chainid, simpTitle) { let ic = this.icn3d; ic.icn3dui;
44425
- return '<div style="display:inline-block; color:white!important; width:' + Math.round(ic.seqAnnWidth *(to - from + 1) /(ic.maxAnnoLength + ic.nTotalGap)) + 'px;" class="icn3d-seqTitle icn3d-link icn3d-blue" domain="' + (exonIndex + 1) + '" from="' + from + '" to="' + to + '" setname="' + simpTitle + ', Exon ' + (exonIndex + 1) + '" title="Exon ' + (exonIndex + 1) + ': ' + genomeRange + ' genomic interval" anno="sequence" chain="' + chainid + '"><div style="height: 12px; border: 1px solid #000; background: linear-gradient(to right, ' + colorGradient + ');"></div></div>';
44427
+ // return '<div style="display:inline-block; color:white!important; width:' + Math.round(ic.seqAnnWidth *(to - from + 1) /(ic.maxAnnoLength + ic.nTotalGap)) + 'px;" class="icn3d-seqTitle icn3d-link icn3d-blue" domain="' + (exonIndex + 1) + '" from="' + from + '" to="' + to + '" setname="' + simpTitle + ', Exon ' + (exonIndex + 1) + '" title="Exon ' + (exonIndex + 1) + ': ' + genomeRange + ' genomic interval" anno="sequence" chain="' + chainid + '"><div style="height: 12px; border: 1px solid #000; background: linear-gradient(to right, ' + colorGradient + ');"></div></div>';
44428
+ return '<div style="display:inline-block; color:white!important; width:' + Math.round(ic.seqAnnWidth *(to - from + 1) /(ic.maxAnnoLength + ic.nTotalGap)) + 'px;" class="icn3d-seqTitle icn3d-link icn3d-blue" domain="' + (exonIndex + 1) + '" from="' + from + '" to="' + to + '" setname="' + simpTitle + ', ' + (exonIndex + 1) + '" title="Exon: ' + genomeRange + ' genomic interval" anno="sequence" chain="' + chainid + '"><div style="height: 12px; border: 1px solid #000; background: linear-gradient(to right, ' + colorGradient + ');"></div></div>';
44426
44429
  }
44427
44430
 
44428
44431
  getExonColor(start, end, pos) { let ic = this.icn3d; ic.icn3dui;
@@ -51629,7 +51632,7 @@ class ContactMap {
51629
51632
  let color2 = rHex + gHex + bHex;
51630
51633
 
51631
51634
  if(bLink) linkStr += ', ';
51632
- linkStr += '{"source": "' + idStr + postA + '", "target": "' + idStr2 + postB + '", "v": 11, "c": "' + color2 + '"}\n';
51635
+ linkStr += '{"source": "' + idStr + postA + '", "target": "' + idStr2 + postB + '", "v": 11, "c": "' + color2 + '", "pae": ' + parseInt(distMatrix[i][j]) + '}\n';
51633
51636
  bLink = true;
51634
51637
  }
51635
51638
  }
@@ -55248,10 +55251,12 @@ class BcifParser {
55248
55251
  let conf_type_idArray = struct_conf.getColumn("conf_type_id");
55249
55252
 
55250
55253
  let chain1Array = struct_conf.getColumn("beg_auth_asym_id");
55251
- let resi1Array = struct_conf.getColumn("beg_label_seq_id");
55254
+ // let resi1Array = struct_conf.getColumn("beg_label_seq_id");
55255
+ let resi1Array = struct_conf.getColumn("beg_auth_seq_id");
55252
55256
 
55253
55257
  let chain2Array = struct_conf.getColumn("end_auth_asym_id");
55254
- let resi2Array = struct_conf.getColumn("end_label_seq_id");
55258
+ // let resi2Array = struct_conf.getColumn("end_label_seq_id");
55259
+ let resi2Array = struct_conf.getColumn("end_auth_seq_id");
55255
55260
 
55256
55261
  // Iterate through every row in the struct_conf category table, where each row delineates an interatomic connection
55257
55262
  let confSize = struct_conf.rowCount;
@@ -55296,10 +55301,12 @@ class BcifParser {
55296
55301
  let struct_sheet_range = block.getCategory("_struct_sheet_range");
55297
55302
 
55298
55303
  let chain1Array = struct_sheet_range.getColumn("beg_auth_asym_id");
55299
- let resi1Array = struct_sheet_range.getColumn("beg_label_seq_id");
55304
+ // let resi1Array = struct_sheet_range.getColumn("beg_label_seq_id");
55305
+ let resi1Array = struct_sheet_range.getColumn("beg_auth_seq_id");
55300
55306
 
55301
55307
  let chain2Array = struct_sheet_range.getColumn("end_auth_asym_id");
55302
- let resi2Array = struct_sheet_range.getColumn("end_label_seq_id");
55308
+ // let resi2Array = struct_sheet_range.getColumn("end_label_seq_id");
55309
+ let resi2Array = struct_sheet_range.getColumn("end_auth_seq_id");
55303
55310
 
55304
55311
  // Iterate through every row in the struct_sheet_range category table, where each row delineates an interatomic connection
55305
55312
  let sheetSize = struct_sheet_range.rowCount;
@@ -58804,9 +58811,13 @@ class ParserUtils {
58804
58811
 
58805
58812
  for(let i = 0, il = ic.realignResid[chainid_t].length; i < il && i < ic.realignResid[chainid_q].length; ++i) {
58806
58813
  let resid_t = ic.realignResid[chainid_t][i].resid;
58814
+ if(!resid_t) continue;
58815
+
58807
58816
  let pos_t = resid_t.lastIndexOf('_');
58808
58817
  let resi_t = parseInt(resid_t.substr(pos_t + 1));
58809
58818
  let resid_q = ic.realignResid[chainid_q][i].resid;
58819
+ if(!resid_q) continue;
58820
+
58810
58821
  let pos_q = resid_q.lastIndexOf('_');
58811
58822
  let resi_q = parseInt(resid_q.substr(pos_q + 1));
58812
58823
 
@@ -62819,10 +62830,12 @@ class LoadCIF {
62819
62830
  let conf_type_idArray = struct_conf.getColumn("conf_type_id");
62820
62831
 
62821
62832
  let chain1Array = struct_conf.getColumn("beg_auth_asym_id");
62822
- let resi1Array = struct_conf.getColumn("beg_label_seq_id");
62833
+ // let resi1Array = struct_conf.getColumn("beg_label_seq_id");
62834
+ let resi1Array = struct_conf.getColumn("beg_auth_seq_id");
62823
62835
 
62824
62836
  struct_conf.getColumn("end_auth_asym_id");
62825
- let resi2Array = struct_conf.getColumn("end_label_seq_id");
62837
+ // let resi2Array = struct_conf.getColumn("end_label_seq_id");
62838
+ let resi2Array = struct_conf.getColumn("end_auth_seq_id");
62826
62839
 
62827
62840
  // Iterate through every row in the struct_conf category table, where each row delineates an interatomic connection
62828
62841
  let confSize = struct_conf.rowCount;
@@ -62861,10 +62874,12 @@ class LoadCIF {
62861
62874
  let struct_sheet_range = block.getCategory("_struct_sheet_range");
62862
62875
 
62863
62876
  let chain1Array = struct_sheet_range.getColumn("beg_auth_asym_id");
62864
- let resi1Array = struct_sheet_range.getColumn("beg_label_seq_id");
62877
+ // let resi1Array = struct_sheet_range.getColumn("beg_label_seq_id");
62878
+ let resi1Array = struct_sheet_range.getColumn("beg_auth_seq_id");
62865
62879
 
62866
62880
  struct_sheet_range.getColumn("end_auth_asym_id");
62867
- let resi2Array = struct_sheet_range.getColumn("end_label_seq_id");
62881
+ // let resi2Array = struct_sheet_range.getColumn("end_label_seq_id");
62882
+ let resi2Array = struct_sheet_range.getColumn("end_auth_seq_id");
62868
62883
 
62869
62884
  // Iterate through every row in the struct_sheet_range category table, where each row delineates an interatomic connection
62870
62885
  let sheetSize = struct_sheet_range.rowCount;
@@ -62872,7 +62887,7 @@ class LoadCIF {
62872
62887
  let startChain = chain1Array.getString(i);
62873
62888
  let startResi = parseInt(resi1Array.getString(i));
62874
62889
  let endResi = parseInt(resi2Array.getString(i));
62875
-
62890
+
62876
62891
  for(let j = startResi; j <= endResi; ++j) {
62877
62892
  let resid = structure + "_" + startChain + "_" + j;
62878
62893
  sheetArray.push(resid);
@@ -70476,7 +70491,7 @@ class Dssp {
70476
70491
  ic.ref2igtype['LaminAC_1ifrA_human'] = 'Lamin';
70477
70492
  ic.ref2igtype['MHCIa_7phrH_human_C1'] = 'IgC1';
70478
70493
  ic.ref2igtype['MPT63_1lmiA_bacteria'] = 'IgE';
70479
- ic.ref2igtype['NaCaExchanger_2fwuA_dog_n2'] = 'IgE';
70494
+ ic.ref2igtype['NaCaExchanger_2fwuA_dog_n2'] = 'IgFN3-like';
70480
70495
  ic.ref2igtype['NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = 'IgE';
70481
70496
  ic.ref2igtype['ORF7a_1xakA_virus'] = 'ORF';
70482
70497
  ic.ref2igtype['PD1_4zqkB_human_V'] = 'IgV';
@@ -70903,12 +70918,13 @@ class Dssp {
70903
70918
  // if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
70904
70919
  if(!me.bNode && !(bBstrand && bCstrand && bEstrand && bFstrand)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
70905
70920
  if(!me.bNode && !(bBSheet && bCSheet && bESheet && bFSheet)) console.log("Some of the Ig strands B, C, E, F are not beta sheets...");
70906
- // if(!me.bNode && (BCnt < 3 || CCnt < 3 || ECnt < 3 || FCnt < 3)) console.log("Some of the Ig strands B, C, E, F are missing in the domain " + domainid + "...");
70921
+
70907
70922
  if(ic.domainid2refpdbname[domainid][0] == refpdbname) {
70908
70923
  delete ic.domainid2refpdbname[domainid];
70909
70924
  delete ic.domainid2score[domainid];
70910
70925
  }
70911
- continue; }
70926
+ continue;
70927
+ }
70912
70928
  // }
70913
70929
 
70914
70930
  }
@@ -71202,14 +71218,16 @@ class Dssp {
71202
71218
  let resiDistToC = (bCpstrand) ? parseInt(CpAtom.resi) - parseInt(CAtom.resi) : parseInt(DAtom.resi) - parseInt(CAtom.resi);
71203
71219
  let resiDistToE = (bCpstrand) ? parseInt(EAtom.resi) - parseInt(CpAtom.resi) : parseInt(EAtom.resi) - parseInt(DAtom.resi);
71204
71220
 
71221
+ let adjust = 1;
71222
+
71205
71223
  if(bCpstrand) {
71206
- if(distToC > distToE || (distToC == distToE && resiDistToC > resiDistToE)) { // rename C' to D
71224
+ if(distToC > distToE + adjust || (distToC == distToE + adjust && resiDistToC > resiDistToE + adjust)) { // rename C' to D
71207
71225
  CpToDResi.push(CpAtom.resi);
71208
71226
  if(!me.bNode) console.log("Rename strand C' to D: distToC " + distToC + " distToE " + distToE + " resiDistToC " + resiDistToC + " resiDistToE " + resiDistToE);
71209
71227
  }
71210
71228
  }
71211
71229
  else if(bDstrand) {
71212
- if(distToC < distToE || (distToC == distToE && resiDistToC < resiDistToE)) { // rename D to C'
71230
+ if(distToC + adjust < distToE || (distToC + adjust == distToE && resiDistToC + adjust < resiDistToE)) { // rename D to C'
71213
71231
  DToCpResi.push(DAtom.resi);
71214
71232
  if(!me.bNode) console.log("Rename strand D to C': distToC " + distToC + " distToE " + distToE + " resiDistToC " + resiDistToC + " resiDistToE " + resiDistToE);
71215
71233
  }
@@ -71229,7 +71247,8 @@ class Dssp {
71229
71247
 
71230
71248
  seg.q_start;
71231
71249
  let qStartInt = parseInt(seg.q_start);
71232
- if(isNaN(seg.q_start)) seg.q_start.substr(seg.q_start.length - 1, 1);
71250
+ let postfix = '';
71251
+ if(isNaN(seg.q_start)) postfix = seg.q_start.substr(seg.q_start.length - 1, 1);
71233
71252
 
71234
71253
  // one item in "seq"
71235
71254
  // q_start and q_end are numbers, but saved in string
@@ -71244,7 +71263,7 @@ class Dssp {
71244
71263
  //let refnum = qStart;
71245
71264
  let refnum = qStartInt;
71246
71265
 
71247
- let refnumLabel = this.getLabelFromRefnum(refnum);
71266
+ let refnumLabel = this.getLabelFromRefnum(refnum, postfix);
71248
71267
  currStrand = (refnumLabel) ? refnumLabel.replace(new RegExp(refnum,'g'), '') : undefined;
71249
71268
 
71250
71269
  let currStrandFinal = currStrand;
@@ -71266,7 +71285,7 @@ class Dssp {
71266
71285
  }
71267
71286
 
71268
71287
  if(currStrand != currStrandFinal) {
71269
- refnumLabel = this.getLabelFromRefnum(refnum, currStrandFinal);
71288
+ refnumLabel = this.getLabelFromRefnum(refnum, postfix, currStrandFinal);
71270
71289
  }
71271
71290
 
71272
71291
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
@@ -71302,7 +71321,7 @@ class Dssp {
71302
71321
  }
71303
71322
  }
71304
71323
 
71305
- getStrandFromRefnum(oriRefnum, prevStrand) { let ic = this.icn3d; ic.icn3dui;
71324
+ getStrandFromRefnum(oriRefnum, finalStrand) { let ic = this.icn3d; ic.icn3dui;
71306
71325
  let refnum = parseInt(oriRefnum);
71307
71326
 
71308
71327
  //N-terminus = 0999-0001
@@ -71381,16 +71400,25 @@ class Dssp {
71381
71400
  else if(refnum > 9900) strand = undefined;
71382
71401
  else strand = " ";
71383
71402
 
71384
- if(prevStrand) strand = prevStrand;
71403
+ if(finalStrand) strand = finalStrand;
71385
71404
 
71386
71405
  return strand
71387
71406
  }
71388
71407
 
71389
- getLabelFromRefnum(oriRefnum, prevStrand) { let ic = this.icn3d; ic.icn3dui;
71390
- let strand = this.getStrandFromRefnum(oriRefnum, prevStrand);
71408
+ getLabelFromRefnum(oriRefnum, postfix, finalStrand) { let ic = this.icn3d; ic.icn3dui;
71409
+ let strand = this.getStrandFromRefnum(oriRefnum, finalStrand);
71410
+
71411
+ // rename C' to D or D to C'
71412
+ let refnum = oriRefnum.toString();
71413
+ if(finalStrand == "C'" && refnum.substr(0, 1) == '6') { // previous D
71414
+ refnum = '4' + refnum.substr(1);
71415
+ }
71416
+ else if(finalStrand == "D" && refnum.substr(0, 1) == '4') { // previous C'
71417
+ refnum = '6' + refnum.substr(1);
71418
+ }
71391
71419
 
71392
71420
  if(strand) {
71393
- return strand + oriRefnum;
71421
+ return strand + refnum + postfix;
71394
71422
  }
71395
71423
  else {
71396
71424
  return undefined;
@@ -80309,7 +80337,7 @@ class iCn3DUI {
80309
80337
  //even when multiple iCn3D viewers are shown together.
80310
80338
  this.pre = this.cfg.divid + "_";
80311
80339
 
80312
- this.REVISION = '3.31.1';
80340
+ this.REVISION = '3.31.2';
80313
80341
 
80314
80342
  // In nodejs, iCn3D defines "window = {navigator: {}}"
80315
80343
  this.bNode = (Object.keys(window).length < 2) ? true : false;