icn3d 3.31.6 → 3.31.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.js CHANGED
@@ -9154,7 +9154,7 @@ class ClickMenu {
9154
9154
  });
9155
9155
 
9156
9156
  me.myEventCls.onIds("#" + me.pre + "mn1_exportKabat", "click", async function(e) { let ic = me.icn3d; //e.preventDefault();
9157
- ic.refnumCls.exportRefnum('kabat');
9157
+ ic.refnumCls.exportRefnum('kabat');
9158
9158
  thisClass.setLogCmd("export refnum kabat", true);
9159
9159
  });
9160
9160
 
@@ -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
  }
@@ -53077,20 +53080,14 @@ class ChainalignParser {
53077
53080
 
53078
53081
  // add color only for the newly loaded structures
53079
53082
  ic.setColorCls.setColorByOptions(opts, hAtoms);
53080
-
53083
+
53084
+ await ic.ParserUtilsCls.renderStructure();
53085
+
53081
53086
  if(ic.bAnnoShown) {
53082
53087
  await ic.showAnnoCls.showAnnotations();
53083
53088
  ic.annotationCls.resetAnnoTabAll();
53084
53089
  }
53085
53090
 
53086
- // await ic.ParserUtilsCls.renderStructure();
53087
- // ic.drawCls.draw();
53088
-
53089
- // if(ic.bAnnoShown) {
53090
- // await ic.showAnnoCls.showAnnotations();
53091
- // ic.annotationCls.resetAnnoTabAll();
53092
- // }
53093
-
53094
53091
  if(me.cfg.rotate !== undefined) ic.resizeCanvasCls.rotStruc(me.cfg.rotate, true);
53095
53092
 
53096
53093
  if(bQuery && me.cfg.matchedchains) {
@@ -55254,10 +55251,12 @@ class BcifParser {
55254
55251
  let conf_type_idArray = struct_conf.getColumn("conf_type_id");
55255
55252
 
55256
55253
  let chain1Array = struct_conf.getColumn("beg_auth_asym_id");
55257
- 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");
55258
55256
 
55259
55257
  let chain2Array = struct_conf.getColumn("end_auth_asym_id");
55260
- 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");
55261
55260
 
55262
55261
  // Iterate through every row in the struct_conf category table, where each row delineates an interatomic connection
55263
55262
  let confSize = struct_conf.rowCount;
@@ -55302,10 +55301,12 @@ class BcifParser {
55302
55301
  let struct_sheet_range = block.getCategory("_struct_sheet_range");
55303
55302
 
55304
55303
  let chain1Array = struct_sheet_range.getColumn("beg_auth_asym_id");
55305
- 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");
55306
55306
 
55307
55307
  let chain2Array = struct_sheet_range.getColumn("end_auth_asym_id");
55308
- 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");
55309
55310
 
55310
55311
  // Iterate through every row in the struct_sheet_range category table, where each row delineates an interatomic connection
55311
55312
  let sheetSize = struct_sheet_range.rowCount;
@@ -58810,9 +58811,13 @@ class ParserUtils {
58810
58811
 
58811
58812
  for(let i = 0, il = ic.realignResid[chainid_t].length; i < il && i < ic.realignResid[chainid_q].length; ++i) {
58812
58813
  let resid_t = ic.realignResid[chainid_t][i].resid;
58814
+ if(!resid_t) continue;
58815
+
58813
58816
  let pos_t = resid_t.lastIndexOf('_');
58814
58817
  let resi_t = parseInt(resid_t.substr(pos_t + 1));
58815
58818
  let resid_q = ic.realignResid[chainid_q][i].resid;
58819
+ if(!resid_q) continue;
58820
+
58816
58821
  let pos_q = resid_q.lastIndexOf('_');
58817
58822
  let resi_q = parseInt(resid_q.substr(pos_q + 1));
58818
58823
 
@@ -59436,7 +59441,9 @@ class ParserUtils {
59436
59441
 
59437
59442
  if(data && data.pdbid) {
59438
59443
  let question = "This is a single-spanning (bitopic) transmembrane protein according to the Membranome database. Do you want to align the protein with the model from Membranome? If you click \"OK\", you can press the letter \"a\" to alternate the structures.";
59439
-
59444
+
59445
+ if (me.bNode) return;
59446
+
59440
59447
  if (me.cfg.afmem == 'off') {
59441
59448
  // do nothing
59442
59449
  /// if(ic.deferredOpm !== undefined) ic.deferredOpm.resolve();
@@ -62823,10 +62830,12 @@ class LoadCIF {
62823
62830
  let conf_type_idArray = struct_conf.getColumn("conf_type_id");
62824
62831
 
62825
62832
  let chain1Array = struct_conf.getColumn("beg_auth_asym_id");
62826
- 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");
62827
62835
 
62828
62836
  struct_conf.getColumn("end_auth_asym_id");
62829
- 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");
62830
62839
 
62831
62840
  // Iterate through every row in the struct_conf category table, where each row delineates an interatomic connection
62832
62841
  let confSize = struct_conf.rowCount;
@@ -62865,10 +62874,12 @@ class LoadCIF {
62865
62874
  let struct_sheet_range = block.getCategory("_struct_sheet_range");
62866
62875
 
62867
62876
  let chain1Array = struct_sheet_range.getColumn("beg_auth_asym_id");
62868
- 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");
62869
62879
 
62870
62880
  struct_sheet_range.getColumn("end_auth_asym_id");
62871
- 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");
62872
62883
 
62873
62884
  // Iterate through every row in the struct_sheet_range category table, where each row delineates an interatomic connection
62874
62885
  let sheetSize = struct_sheet_range.rowCount;
@@ -62876,7 +62887,7 @@ class LoadCIF {
62876
62887
  let startChain = chain1Array.getString(i);
62877
62888
  let startResi = parseInt(resi1Array.getString(i));
62878
62889
  let endResi = parseInt(resi2Array.getString(i));
62879
-
62890
+
62880
62891
  for(let j = startResi; j <= endResi; ++j) {
62881
62892
  let resid = structure + "_" + startChain + "_" + j;
62882
62893
  sheetArray.push(resid);
@@ -70453,13 +70464,13 @@ class Dssp {
70453
70464
  ic.ref2igtype['CD28_1yjdC_human_V'] = 'IgV';
70454
70465
  ic.ref2igtype['CD2_1hnfA_human_C2-n2'] = 'IgC2';
70455
70466
  ic.ref2igtype['CD2_1hnfA_human_V-n1'] = 'IgV';
70456
- ic.ref2igtype['CD3d_6jxrd_human_C1'] = 'IgI';
70457
- ic.ref2igtype['CD3e_6jxrf_human_C1'] = 'IgI';
70458
- ic.ref2igtype['CD3g_6jxrg_human_C2'] = 'IgI';
70467
+ ic.ref2igtype['CD3d_6jxrd_human_C1'] = 'IgC1';
70468
+ ic.ref2igtype['CD3e_6jxrf_human_C1'] = 'IgC1';
70469
+ ic.ref2igtype['CD3g_6jxrg_human_C2'] = 'IgC2';
70459
70470
  ic.ref2igtype['CD8a_1cd8A_human_V'] = 'IgV';
70460
70471
  ic.ref2igtype['CoAtomerGamma1_1r4xA_human'] = 'IgE';
70461
70472
  ic.ref2igtype['Contactin1_2ee2A_human_FN3-n9'] = 'IgFN3';
70462
- ic.ref2igtype['Contactin1_3s97C_human_Iset-n2'] = 'IgC2';
70473
+ ic.ref2igtype['Contactin1_3s97C_human_Iset-n2'] = 'IgI';
70463
70474
  ic.ref2igtype['CuZnSuperoxideDismutase_1hl5C_human'] = 'SOD';
70464
70475
  ic.ref2igtype['ECadherin_4zt1A_human_n2'] = 'Cadherin';
70465
70476
  ic.ref2igtype['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = 'IgE';
@@ -70467,7 +70478,7 @@ class Dssp {
70467
70478
  ic.ref2igtype['FAB-HEAVY_5esv_V-n1'] = 'IgV';
70468
70479
  ic.ref2igtype['FAB-LIGHT_5esv_C1-n2'] = 'IgC1';
70469
70480
  ic.ref2igtype['FAB-LIGHT_5esv_V-n1'] = 'IgV';
70470
- ic.ref2igtype['GHR_1axiB_human_C1-n1'] = 'IgFN3';
70481
+ ic.ref2igtype['GHR_1axiB_human_C1-n1'] = 'IgC1';
70471
70482
  ic.ref2igtype['ICOS_6x4gA_human_V'] = 'IgV';
70472
70483
  ic.ref2igtype['IL6Rb_1bquB_human_FN3-n2'] = 'IgFN3';
70473
70484
  ic.ref2igtype['IL6Rb_1bquB_human_FN3-n3'] = 'IgFN3';
@@ -70475,7 +70486,7 @@ class Dssp {
70475
70486
  ic.ref2igtype['InsulinR_8guyE_human_FN3-n2'] = 'IgFN3';
70476
70487
  ic.ref2igtype['IsdA_2iteA_bacteria'] = 'IgE';
70477
70488
  ic.ref2igtype['JAM1_1nbqA_human_Iset-n2'] = 'IgI';
70478
- ic.ref2igtype['LAG3_7tzgD_human_C1-n2'] = 'IgC2';
70489
+ ic.ref2igtype['LAG3_7tzgD_human_C1-n2'] = 'IgC1';
70479
70490
  ic.ref2igtype['LAG3_7tzgD_human_V-n1'] = 'IgV';
70480
70491
  ic.ref2igtype['LaminAC_1ifrA_human'] = 'Lamin';
70481
70492
  ic.ref2igtype['MHCIa_7phrH_human_C1'] = 'IgC1';
@@ -70489,7 +70500,7 @@ class Dssp {
70489
70500
  ic.ref2igtype['RBPJ_6py8C_human_Unk-n1'] = 'IgFN3-like';
70490
70501
  ic.ref2igtype['RBPJ_6py8C_human_Unk-n2'] = 'IgFN3-like';
70491
70502
  ic.ref2igtype['Sidekick2_1wf5A_human_FN3-n7'] = 'IgFN3';
70492
- ic.ref2igtype['Siglec3_5j0bB_human_C1-n2'] = 'IgC2';
70503
+ ic.ref2igtype['Siglec3_5j0bB_human_C1-n2'] = 'IgC1';
70493
70504
  ic.ref2igtype['TCRa_6jxrm_human_C1-n2'] = 'IgC1';
70494
70505
  ic.ref2igtype['TCRa_6jxrm_human_V-n1'] = 'IgV';
70495
70506
  ic.ref2igtype['TEAD1_3kysC_human'] = 'IgE';
@@ -70498,7 +70509,7 @@ class Dssp {
70498
70509
  ic.ref2igtype['Titin_4uowM_human_Iset-n152'] = 'IgI';
70499
70510
  ic.ref2igtype['VISTA_6oilA_human_V'] = 'IgV';
70500
70511
  ic.ref2igtype['VNAR_1t6vN_shark_V'] = 'IgV';
70501
- ic.ref2igtype['VTCN1_Q7Z7D3_human_C1-n2'] = 'IgV';
70512
+ ic.ref2igtype['VTCN1_Q7Z7D3_human_C1-n2'] = 'IgC1';
70502
70513
  }
70503
70514
 
70504
70515
  getPdbAjaxArray() { let ic = this.icn3d, me = ic.icn3dui;
@@ -70907,12 +70918,13 @@ class Dssp {
70907
70918
  // if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
70908
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 + "...");
70909
70920
  if(!me.bNode && !(bBSheet && bCSheet && bESheet && bFSheet)) console.log("Some of the Ig strands B, C, E, F are not beta sheets...");
70910
- // 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
+
70911
70922
  if(ic.domainid2refpdbname[domainid][0] == refpdbname) {
70912
70923
  delete ic.domainid2refpdbname[domainid];
70913
70924
  delete ic.domainid2score[domainid];
70914
70925
  }
70915
- continue; }
70926
+ continue;
70927
+ }
70916
70928
  // }
70917
70929
 
70918
70930
  }
@@ -71189,7 +71201,7 @@ class Dssp {
71189
71201
 
71190
71202
  if(seg.q_start.indexOf('8550') != -1) {
71191
71203
  // check C' and D strands
71192
- if(cntBtwCE == 1) {
71204
+ if(cntBtwCE == 1 && CAtom && EAtom && (CpAtom || DAtom)) {
71193
71205
  let distToC = 999, distToE = 999;
71194
71206
  for(let j = 0, jl = CAtomArray.length; j < jl; ++j) {
71195
71207
  let dist = (bCpstrand) ? CpAtom.coord.distanceTo(CAtomArray[j].coord) : DAtom.coord.distanceTo(CAtomArray[j].coord);
@@ -71477,7 +71489,7 @@ class Dssp {
71477
71489
  // 1. show IgStrand ref numbers
71478
71490
  if(type == 'igstrand' || type == 'IgStrand') {
71479
71491
  // iGStrand reference numbers were adjusted when showing in sequences
71480
- // if(me.bNode) {
71492
+ // if(me.bNode) {
71481
71493
  if(ic.bShowRefnum) {
71482
71494
  for(let chnid in ic.chains) {
71483
71495
  let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chnid]);
@@ -71528,7 +71540,8 @@ class Dssp {
71528
71540
  let bIgDomain = stru2bIgDomain.hasOwnProperty(structure) ? 1 : 0;
71529
71541
 
71530
71542
  refData += '{"' + structure + '": {"Ig domain" : ' + bIgDomain + ', "igs": [\n';
71531
- for(let m = 0, ml = ic.structures[structure].length; m < ml; ++m) {
71543
+
71544
+ for(let m = 0, ml = ic.structures[structure].length; ic.bShowRefnum && m < ml; ++m) {
71532
71545
  let chnid = ic.structures[structure][m];
71533
71546
  let igArray = ic.chain2igArray[chnid];
71534
71547
 
@@ -80312,7 +80325,7 @@ class iCn3DUI {
80312
80325
  //even when multiple iCn3D viewers are shown together.
80313
80326
  this.pre = this.cfg.divid + "_";
80314
80327
 
80315
- this.REVISION = '3.31.1';
80328
+ this.REVISION = '3.31.2';
80316
80329
 
80317
80330
  // In nodejs, iCn3D defines "window = {navigator: {}}"
80318
80331
  this.bNode = (Object.keys(window).length < 2) ? true : false;