icn3d 3.26.1 → 3.26.3

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.module.js CHANGED
@@ -35659,7 +35659,6 @@ class SetColor {
35659
35659
  let refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
35660
35660
  let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
35661
35661
  color = ic.showSeqCls.getRefnumColor(currStrand);
35662
-
35663
35662
  if(ic.residIgLoop.hasOwnProperty(resid)) {
35664
35663
  color = me.parasCls.thr(me.htmlCls.GREYB);
35665
35664
  }
@@ -41929,16 +41928,6 @@ class ShowAnno {
41929
41928
  } // align seq to structure
41930
41929
  }
41931
41930
  //ic.bAnnoShown = true;
41932
-
41933
- if(ic.bShowRefnum) {
41934
- ic.opts.color = 'ig strand';
41935
- //ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
41936
- ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
41937
-
41938
- ic.selectionCls.selectAll_base();
41939
- ic.hlUpdateCls.updateHlAll();
41940
- //ic.drawCls.draw();
41941
- }
41942
41931
  }
41943
41932
 
41944
41933
  async showAnnoSeqData(nucleotide_chainid, chemical_chainid, chemical_set) { let ic = this.icn3d, me = ic.icn3dui;
@@ -42951,18 +42940,25 @@ class ShowSeq {
42951
42940
  html += result.html;
42952
42941
  html3 += result.html3;
42953
42942
 
42943
+ if(ic.bShowRefnum) {
42944
+ ic.opts.color = 'ig strand';
42945
+ //ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
42946
+ ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
42947
+
42948
+ ic.selectionCls.selectAll_base();
42949
+ ic.hlUpdateCls.updateHlAll();
42950
+ //ic.drawCls.draw();
42951
+ }
42952
+
42954
42953
  return {'html': html, 'html3': html3};
42955
42954
  }
42956
42955
 
42957
42956
  showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d, me = ic.icn3dui;
42958
42957
  let html = '', html3 = '';
42959
42958
 
42960
- let chainList = '';
42961
42959
  if(!ic.chainid2refpdbname[chnid]) return {html: html, html3: html3};
42962
42960
 
42963
- for(let i = 0, il = ic.chainid2refpdbname[chnid].length; i < il; ++i) {
42964
- chainList += ic.chainid2refpdbname[chnid][i] + " ";
42965
- }
42961
+ let chainList = ic.refnumCls.getTemplateList(chnid);
42966
42962
 
42967
42963
  let refStruTitle = (chainList) ? "based on " + chainList : "";
42968
42964
 
@@ -43001,7 +42997,7 @@ class ShowSeq {
43001
42997
  return {html: '', html3: ''};
43002
42998
  }
43003
42999
 
43004
- //check if Kabat refnum available
43000
+ //check if IMGT refnum available
43005
43001
  let bImgtFound = false;
43006
43002
  for(let i = 0, il = giSeq.length; i < il; ++i) {
43007
43003
  let currResi = ic.ParserUtilsCls.getResi(chnid, i);
@@ -43408,7 +43404,7 @@ class ShowSeq {
43408
43404
  }
43409
43405
  }
43410
43406
  }
43411
- else {
43407
+ else {
43412
43408
  if(currStrand != ' ') {
43413
43409
  bLoop = ic.residIgLoop[residueid];
43414
43410
  html += this.getRefnumHtml(residueid, refnumStr, refnumStr_ori, refnumLabel, currStrand, bLoop, bHidelabel);
@@ -43686,6 +43682,8 @@ class HlSeq {
43686
43682
  //});
43687
43683
 
43688
43684
  // remove possible text selection
43685
+ // the following code caused the scroll of seqeunce window to the top, remove it for now
43686
+ /*
43689
43687
  if(window.getSelection) {
43690
43688
  if(window.getSelection().empty) { // Chrome
43691
43689
  window.getSelection().empty();
@@ -43695,6 +43693,7 @@ class HlSeq {
43695
43693
  } else if(document.selection) { // IE?
43696
43694
  document.selection.empty();
43697
43695
  }
43696
+ */
43698
43697
  });
43699
43698
  }
43700
43699
 
@@ -45202,61 +45201,6 @@ class LineGraph {
45202
45201
  async showIgRefNum() { let ic = this.icn3d, me = ic.icn3dui;
45203
45202
  let thisClass = this;
45204
45203
 
45205
- // if(ic.pdbDataArray) {
45206
- // await thisClass.parseRefPdbData(ic.pdbDataArray);
45207
- // }
45208
- // else {
45209
- //ic.refpdbArray = ['ASF1A_2iijA_human', 'B2Microglobulin_7phrL_human_C1', 'BArrestin1_4jqiA_rat_n1', 'BTLA_2aw2A_human_Iset', 'C3_2qkiD_human_n1', 'CD19_6al5A_human_C2orV-n1', 'CD2_1hnfA_human_C2-n2', 'CD2_1hnfA_human_V-n1', 'CD8a_1cd8A_human_V', 'CoAtomerGamma1_1r4xA_human', 'Contactin1_2ee2A_human_FN3-n9', 'Contactin1_3s97C_human_C2-n2', 'CuZnSuperoxideDismutase_1hl5C_human', 'ECadherin_4zt1A_human_n2', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', 'FAB-HEAVY_5esv_C1-n2', 'FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_C1-n2', 'FAB-LIGHT_5esv_V-n1', 'GHR_1axiB_human_FN3-n1', 'ICOS_6x4gA_human_V', 'IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3', 'InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2', 'IsdA_2iteA_bacteria', 'JAM1_1nbqA_human_VorIset-n2', 'LAG3_7tzgD_human_C2-n2', 'LAG3_7tzgD_human_V-n1', 'LaminAC_1ifrA_human', 'MHCIa_7phrH_human_C1', 'MPT63_1lmiA_bacteria', 'NaCaExchanger_2fwuA_dog_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'ORF7a_1xakA_virus', 'PD1_4zqkB_human_V', 'PDL1_4z18B_human_V-n1', 'Palladin_2dm3A_human_Iset-n1', 'RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2', 'Sidekick2_1wf5A_human_FN3-n7', 'Siglec3_5j0bB_human_C2-n2', 'TCRa_6jxrm_human_C1-n2', 'TCRa_6jxrm_human_V-n1', 'TEAD1_3kysC_human', 'TP34_2o6cA_bacteria', 'TP47_1o75A_bacteria', 'Titin_4uowM_human_Unk-n152', 'VISTA_6oilA_human_V', 'VNAR_1t6vN_shark_V', 'VTCN1_Q7Z7D3_human_V-n2'];
45210
-
45211
- //ic.refpdbArray = ['1ASF1A_2iijA_human', '1B2Microglobulin_7phrL_human_C1', '1BArrestin1_4jqiA_rat_n1', '1BTLA_2aw2A_human_Iset', '1C3_2qkiD_human_n1', '1CD19_6al5A_human_C2orV-n1', '1CD2_1hnfA_human_C2-n2', '1CD2_1hnfA_human_V-n1', '1CD8a_1cd8A_human_V', '1CoAtomerGamma1_1r4xA_human', '1Contactin1_2ee2A_human_FN3-n9', '1Contactin1_3s97C_human_C2-n2', '1CuZnSuperoxideDismutase_1hl5C_human', '1ECadherin_4zt1A_human_n2', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1FAB-HEAVY_5esv_C1-n2', '1FAB-HEAVY_5esv_V-n1', '1FAB-LIGHT_5esv_C1-n2', '1FAB-LIGHT_5esv_V-n1', '1GHR_1axiB_human_FN3-n1', '1ICOS_6x4gA_human_V', '1IL6Rb_1bquB_human_FN3-n2', '1IL6Rb_1bquB_human_FN3-n3', '1InsulinR_8guyE_human_FN3-n1', '1InsulinR_8guyE_human_FN3-n2', '1IsdA_2iteA_bacteria', '1JAM1_1nbqA_human_VorIset-n2', '1LAG3_7tzgD_human_C2-n2', '1LAG3_7tzgD_human_V-n1', '1LaminAC_1ifrA_human', '1MHCIa_7phrH_human_C1', '1MPT63_1lmiA_bacteria', '1NaCaExchanger_2fwuA_dog_n2', '1NaKATPaseTransporterBeta_2zxeB_spurdogshark', '1ORF7a_1xakA_virus', '1PD1_4zqkB_human_V', '1PDL1_4z18B_human_V-n1', '1Palladin_2dm3A_human_Iset-n1', '1RBPJ_6py8C_human_Unk-n1', '1RBPJ_6py8C_human_Unk-n2', '1Sidekick2_1wf5A_human_FN3-n7', '1Siglec3_5j0bB_human_C2-n2', '1TCRa_6jxrm_human_C1-n2', '1TCRa_6jxrm_human_V-n1', '1TEAD1_3kysC_human', '1TP34_2o6cA_bacteria', '1TP47_1o75A_bacteria', '1Titin_4uowM_human_Unk-n152', '1VISTA_6oilA_human_V', '1VNAR_1t6vN_shark_V', '1VTCN1_Q7Z7D3_human_V-n2'];
45212
-
45213
- /*
45214
- // round 1
45215
- ic.refpdbArray = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'GHR_1axiB_human_FN3-n1', 'FAB-HEAVY_5esv_C1-n2', 'IL6Rb_1bquB_human_FN3-n2', 'LAG3_7tzgD_human_C2-n2', 'VNAR_1t6vN_shark_V', 'VISTA_6oilA_human_V', 'CD19_6al5A_human_C2orV-n1', 'TP47_1o75A_bacteria', 'TP34_2o6cA_bacteria'];
45216
- // round 2
45217
- ic.refpdbHash = {};
45218
-
45219
- ic.refpdbHash['NaKATPaseTransporterBeta_2zxeB_spurdogshark'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'ORF7a_1xakA_virus', 'NaCaExchanger_2fwuA_dog_n2', 'BArrestin1_4jqiA_rat_n1', 'ECadherin_4zt1A_human_n2', 'C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1'];
45220
- ic.refpdbHash['GHR_1axiB_human_FN3-n1'] = ['GHR_1axiB_human_FN3-n1', 'Siglec3_5j0bB_human_C2-n2', 'ICOS_6x4gA_human_V', 'CD2_1hnfA_human_C2-n2', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
45221
- ic.refpdbHash['FAB-HEAVY_5esv_C1-n2'] = ['FAB-HEAVY_5esv_C1-n2', 'B2Microglobulin_7phrL_human_C1', 'VTCN1_Q7Z7D3_human_V-n2', 'FAB-LIGHT_5esv_C1-n2', 'MHCIa_7phrH_human_C1'];
45222
- ic.refpdbHash['IL6Rb_1bquB_human_FN3-n2'] = ['IL6Rb_1bquB_human_FN3-n2', 'Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n3', 'InsulinR_8guyE_human_FN3-n1', 'Sidekick2_1wf5A_human_FN3-n7', 'InsulinR_8guyE_human_FN3-n2'];
45223
- ic.refpdbHash['LAG3_7tzgD_human_C2-n2'] = ['LAG3_7tzgD_human_C2-n2', 'JAM1_1nbqA_human_VorIset-n2', 'Contactin1_3s97C_human_C2-n2', 'Palladin_2dm3A_human_Iset-n1', 'BTLA_2aw2A_human_Iset', 'Titin_4uowM_human_Unk-n152'];
45224
- ic.refpdbHash['VNAR_1t6vN_shark_V'] = ['VNAR_1t6vN_shark_V', 'PD1_4zqkB_human_V', 'CD8a_1cd8A_human_V', 'TCRa_6jxrm_human_V-n1', 'FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1'];
45225
- ic.refpdbHash['VISTA_6oilA_human_V'] = ['VISTA_6oilA_human_V', 'LAG3_7tzgD_human_V-n1', 'PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1'];
45226
- ic.refpdbHash['CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
45227
- ic.refpdbHash['TP47_1o75A_bacteria'] = ['TP47_1o75A_bacteria', 'TEAD1_3kysC_human', 'RBPJ_6py8C_human_Unk-n2', 'CuZnSuperoxideDismutase_1hl5C_human', 'ASF1A_2iijA_human'];
45228
- ic.refpdbHash['TP34_2o6cA_bacteria'] = ['TP34_2o6cA_bacteria', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria', 'LaminAC_1ifrA_human', 'CoAtomerGamma1_1r4xA_human', 'MPT63_1lmiA_bacteria'];
45229
- */
45230
- /*
45231
- // round 1
45232
- ic.refpdbArray = ['NaCaExchanger_2fwuA_dog_n2', 'C3_2qkiD_human_n1', 'Siglec3_5j0bB_human_C2-n2', 'ICOS_6x4gA_human_V', 'B2Microglobulin_7phrL_human_C1', 'VTCN1_Q7Z7D3_human_V-n2', 'Contactin1_2ee2A_human_FN3-n9', 'InsulinR_8guyE_human_FN3-n1', 'JAM1_1nbqA_human_VorIset-n2', 'LAG3_7tzgD_human_C2-n2', 'Palladin_2dm3A_human_Iset-n1', 'PD1_4zqkB_human_V', 'CD8a_1cd8A_human_V', 'VISTA_6oilA_human_V', 'LAG3_7tzgD_human_V-n1', 'TP47_1o75A_bacteria', 'TP34_2o6cA_bacteria', 'TEAD1_3kysC_human', 'RBPJ_6py8C_human_Unk-n2', 'TCRa_6jxrm_human_C1-n2', 'IsdA_2iteA_bacteria', 'LaminAC_1ifrA_human', 'CD19_6al5A_human_C2orV-n1'];
45233
-
45234
- // round 2
45235
- ic.refpdbHash = {};
45236
- ic.refpdbHash['NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
45237
- ic.refpdbHash['C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1', 'BArrestin1_4jqiA_rat_n1'];
45238
- ic.refpdbHash['Siglec3_5j0bB_human_C2-n2'] = ['Siglec3_5j0bB_human_C2-n2', 'CD2_1hnfA_human_C2-n2', 'GHR_1axiB_human_FN3-n1'];
45239
- ic.refpdbHash['ICOS_6x4gA_human_V'] = ['ICOS_6x4gA_human_V', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
45240
- ic.refpdbHash['B2Microglobulin_7phrL_human_C1'] = ['B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1'];
45241
- ic.refpdbHash['VTCN1_Q7Z7D3_human_V-n2'] = ['VTCN1_Q7Z7D3_human_V-n2', 'FAB-LIGHT_5esv_C1-n2'];
45242
- ic.refpdbHash['Contactin1_2ee2A_human_FN3-n9'] = ['Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7'];
45243
- ic.refpdbHash['InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n2'];
45244
- ic.refpdbHash['JAM1_1nbqA_human_VorIset-n2'] = ['JAM1_1nbqA_human_VorIset-n2', 'Contactin1_3s97C_human_C2-n2'];
45245
- ic.refpdbHash['LAG3_7tzgD_human_C2-n2'] = ['LAG3_7tzgD_human_C2-n2', 'BTLA_2aw2A_human_Iset'];
45246
- ic.refpdbHash['Palladin_2dm3A_human_Iset-n1'] = ['Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152'];
45247
- ic.refpdbHash['PD1_4zqkB_human_V'] = ['PD1_4zqkB_human_V', 'TCRa_6jxrm_human_V-n1', 'FAB-LIGHT_5esv_V-n1'];
45248
- ic.refpdbHash['CD8a_1cd8A_human_V'] = ['CD8a_1cd8A_human_V', 'FAB-HEAVY_5esv_V-n1', 'VNAR_1t6vN_shark_V'];
45249
- ic.refpdbHash['VISTA_6oilA_human_V'] = ['VISTA_6oilA_human_V', 'PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1'];
45250
- ic.refpdbHash['LAG3_7tzgD_human_V-n1'] = ['LAG3_7tzgD_human_V-n1'];
45251
- ic.refpdbHash['TP47_1o75A_bacteria'] = ['TP47_1o75A_bacteria'];
45252
- ic.refpdbHash['TP34_2o6cA_bacteria'] = ['TP34_2o6cA_bacteria'];
45253
- ic.refpdbHash['TEAD1_3kysC_human'] = ['TEAD1_3kysC_human', 'CuZnSuperoxideDismutase_1hl5C_human'];
45254
- ic.refpdbHash['RBPJ_6py8C_human_Unk-n2'] = ['RBPJ_6py8C_human_Unk-n2', 'ASF1A_2iijA_human'];
45255
- ic.refpdbHash['TCRa_6jxrm_human_C1-n2'] = ['TCRa_6jxrm_human_C1-n2'];
45256
- ic.refpdbHash['IsdA_2iteA_bacteria'] = ['IsdA_2iteA_bacteria', 'CoAtomerGamma1_1r4xA_human'];
45257
- ic.refpdbHash['LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'MPT63_1lmiA_bacteria'];
45258
- ic.refpdbHash['CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
45259
- */
45260
45204
  // round 1, 16 templates
45261
45205
  ic.refpdbArray = ['1InsulinR_8guyE_human_FN3-n1', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1CoAtomerGamma1_1r4xA_human', '1C3_2qkiD_human_n1', '1CuZnSuperoxideDismutase_1hl5C_human', '1ASF1A_2iijA_human', '1FAB-LIGHT_5esv_C1-n2', '1CD2_1hnfA_human_C2-n2', '1NaCaExchanger_2fwuA_dog_n2', '1FAB-HEAVY_5esv_V-n1', '1PDL1_4z18B_human_V-n1', '1BTLA_2aw2A_human_Iset', '1LaminAC_1ifrA_human', '1IsdA_2iteA_bacteria', '1TCRa_6jxrm_human_C1-n2', '1CD19_6al5A_human_C2orV-n1'];
45262
45206
 
@@ -45324,11 +45268,6 @@ class LineGraph {
45324
45268
  ic.refpdbHash['6A15'] = ['CD19_6al5A_human_C2orV-n1'];
45325
45269
  ic.refpdbHash['2QKI'] = ['C3_2qkiD_human_n1'];
45326
45270
 
45327
- // if(ic.pdbDataArray) {
45328
- // await thisClass.parseRefPdbData(ic.pdbDataArray);
45329
- // }
45330
- // else {
45331
-
45332
45271
  let pdbAjaxArray = [];
45333
45272
  for(let k = 0, kl = ic.refpdbArray.length; k < kl; ++k) {
45334
45273
  //let urlpdb = me.htmlCls.baseUrl + "icn3d/refpdb/" + ic.refpdbArray[k] + ".pdb";
@@ -45434,7 +45373,11 @@ class LineGraph {
45434
45373
  for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
45435
45374
  let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
45436
45375
  // ig strand for any subset will have the same k, use the number of residue to separate them
45437
- let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
45376
+ let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtomsArray[k]);
45377
+ let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtomsArray[k]);
45378
+ let resiSum = parseInt(atomFirst.resi) + parseInt(atomLast.resi);
45379
+ //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
45380
+ let domainid = chainid + '-' + k + '_' + resiSum;
45438
45381
  ic.domainid2pdb[domainid] = pdb_target;
45439
45382
 
45440
45383
  for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
@@ -45456,8 +45399,27 @@ class LineGraph {
45456
45399
 
45457
45400
  try {
45458
45401
  let dataArray2 = [];
45459
- let allPromise = Promise.allSettled(ajaxArray);
45460
- dataArray2 = await allPromise;
45402
+
45403
+ // let allPromise = Promise.allSettled(ajaxArray);
45404
+ // dataArray2 = await allPromise;
45405
+
45406
+ //split arrays into chunks of 100 jobs
45407
+ let n = (me.bNode) ? 48 : 96;
45408
+ for(let i = 0, il = (ajaxArray.length - 1) / n + 1; i < il; ++i) {
45409
+ let currAjaxArray = [];
45410
+ if(i == il - 1) { // last one
45411
+ currAjaxArray = ajaxArray.slice(i * n, ajaxArray.length);
45412
+ }
45413
+ else {
45414
+ currAjaxArray = ajaxArray.slice(i * n, (i + 1) * n);
45415
+ }
45416
+
45417
+ let currPromise = Promise.allSettled(currAjaxArray);
45418
+ let currDataArray = await currPromise;
45419
+
45420
+ dataArray2 = dataArray2.concat(currDataArray);
45421
+ }
45422
+
45461
45423
 
45462
45424
  let bRound1 = true;
45463
45425
  await thisClass.parseAlignData(dataArray2, domainidpairArray, bRound1);
@@ -45465,12 +45427,42 @@ class LineGraph {
45465
45427
  /// if(ic.deferredRefnum !== undefined) ic.deferredRefnum.resolve();
45466
45428
  }
45467
45429
  catch(err) {
45468
- if(!me.bNode) console.log("Error in aligning with TM-align...");
45430
+ let mess = "Some of " + ajaxArray.length + " TM-align alignments failed. Please select a chain or a subset to assing reference numbers to avoid overloading the server...";
45431
+ if(!me.bNode) {
45432
+ alert(mess);
45433
+ }
45434
+ else {
45435
+ console.log(mess);
45436
+ }
45469
45437
  //console.log("Error in aligning with TM-align...");
45470
45438
  return;
45471
45439
  }
45472
45440
  }
45473
45441
 
45442
+ getTemplateList(chainid) { let ic = this.icn3d; ic.icn3dui;
45443
+ let domainid2refpdbname = {};
45444
+
45445
+ for(let i = 0, il = ic.chainid2refpdbname[chainid].length; i < il; ++i) {
45446
+ let refpdbname_domainid = ic.chainid2refpdbname[chainid][i].split('|');
45447
+ domainid2refpdbname[refpdbname_domainid[1]] = refpdbname_domainid[0];
45448
+ }
45449
+
45450
+ let domainidArray = Object.keys(domainid2refpdbname);
45451
+ domainidArray.sort(function(id1, id2) {
45452
+ let resi1 = parseInt(id1.substr(id1.lastIndexOf('_') + 1));
45453
+ let resi2 = parseInt(id2.substr(id2.lastIndexOf('_') + 1));
45454
+ return resi1 - resi2;
45455
+ });
45456
+
45457
+ let chainList = '';
45458
+ for(let i = 0, il = domainidArray.length; i < il; ++i) {
45459
+ chainList += domainid2refpdbname[domainidArray[i]];
45460
+ if(i < il - 1) chainList += ", ";
45461
+ }
45462
+
45463
+ return chainList;
45464
+ }
45465
+
45474
45466
  async parseAlignData(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
45475
45467
  let thisClass = this;
45476
45468
 
@@ -45536,7 +45528,10 @@ class LineGraph {
45536
45528
  }
45537
45529
 
45538
45530
  //if(!(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand)) continue;
45539
- if(!(bBstrand && bCstrand && bEstrand && bFstrand)) continue;
45531
+ if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
45532
+ if(!me.bNode) console.log("some of the Ig strands B, C, E, F are missing...");
45533
+ continue;
45534
+ }
45540
45535
 
45541
45536
  if(!domainid2score.hasOwnProperty(domainid) || queryData[0].score > domainid2score[domainid]) {
45542
45537
  domainid2score[domainid] = queryData[0].score;
@@ -45610,10 +45605,15 @@ class LineGraph {
45610
45605
  }
45611
45606
 
45612
45607
  // combine domainid into chainid
45608
+ let processedChainid = {};
45613
45609
  for(let domainid in ic.domainid2refpdbname) {
45614
45610
  let chainid = domainid.split('-')[0];
45611
+
45612
+ if(!processedChainid.hasOwnProperty(chainid)) ic.chainid2refpdbname[chainid] = [];
45613
+ processedChainid[chainid] = 1;
45614
+
45615
45615
  if(!ic.chainid2refpdbname.hasOwnProperty(chainid)) ic.chainid2refpdbname[chainid] = [];
45616
- ic.chainid2refpdbname[chainid].push(ic.domainid2refpdbname[domainid]);
45616
+ ic.chainid2refpdbname[chainid].push(ic.domainid2refpdbname[domainid] + '|' + domainid);
45617
45617
  }
45618
45618
 
45619
45619
  // combine domainid into chainid
@@ -45630,15 +45630,15 @@ class LineGraph {
45630
45630
  for(let chainid in chainid2segs) {
45631
45631
  let segArray = chainid2segs[chainid];
45632
45632
 
45633
- let chainList = '';
45634
- for(let i = 0, il = ic.chainid2refpdbname[chainid].length; i < il; ++i) {
45635
- chainList += ic.chainid2refpdbname[chainid][i] + " ";
45636
- }
45633
+ let refpdbnameArray = ic.chainid2refpdbname[chainid];
45634
+
45635
+ let chainList = this.getTemplateList(chainid);
45636
+
45637
45637
  //if(!me.bNode) console.log("The reference PDB(s) for chain " + chainid + " are " + chainList);
45638
45638
  console.log("The reference PDB(s) for chain " + chainid + " are " + chainList);
45639
45639
 
45640
45640
  let prevStrand;
45641
- let bCd19 = ic.chainid2refpdbname[chainid].length == 1 && ic.chainid2refpdbname[chainid][0] == 'CD19_6al5A_human_C2orV-n1';
45641
+ let bCd19 = refpdbnameArray.length == 1 && refpdbnameArray[0] == 'CD19_6al5A_human_C2orV-n1';
45642
45642
  for(let i = 0, il = segArray.length; i < il; ++i) {
45643
45643
  let seg = segArray[i];
45644
45644
  let qStart = seg.q_start;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.26.1",
3
+ "version": "3.26.3",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {