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.js CHANGED
@@ -34758,7 +34758,6 @@ class SetColor {
34758
34758
  let refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
34759
34759
  let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
34760
34760
  color = ic.showSeqCls.getRefnumColor(currStrand);
34761
-
34762
34761
  if(ic.residIgLoop.hasOwnProperty(resid)) {
34763
34762
  color = me.parasCls.thr(me.htmlCls.GREYB);
34764
34763
  }
@@ -41028,16 +41027,6 @@ class ShowAnno {
41028
41027
  } // align seq to structure
41029
41028
  }
41030
41029
  //ic.bAnnoShown = true;
41031
-
41032
- if(ic.bShowRefnum) {
41033
- ic.opts.color = 'ig strand';
41034
- //ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
41035
- ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
41036
-
41037
- ic.selectionCls.selectAll_base();
41038
- ic.hlUpdateCls.updateHlAll();
41039
- //ic.drawCls.draw();
41040
- }
41041
41030
  }
41042
41031
 
41043
41032
  async showAnnoSeqData(nucleotide_chainid, chemical_chainid, chemical_set) { let ic = this.icn3d, me = ic.icn3dui;
@@ -42050,18 +42039,25 @@ class ShowSeq {
42050
42039
  html += result.html;
42051
42040
  html3 += result.html3;
42052
42041
 
42042
+ if(ic.bShowRefnum) {
42043
+ ic.opts.color = 'ig strand';
42044
+ //ic.setColorCls.setColorByOptions(ic.opts, ic.atoms);
42045
+ ic.setColorCls.setColorByOptions(ic.opts, ic.dAtoms);
42046
+
42047
+ ic.selectionCls.selectAll_base();
42048
+ ic.hlUpdateCls.updateHlAll();
42049
+ //ic.drawCls.draw();
42050
+ }
42051
+
42053
42052
  return {'html': html, 'html3': html3};
42054
42053
  }
42055
42054
 
42056
42055
  showRefNum(giSeq, chnid, kabat_or_imgt, bCustom) { let ic = this.icn3d, me = ic.icn3dui;
42057
42056
  let html = '', html3 = '';
42058
42057
 
42059
- let chainList = '';
42060
42058
  if(!ic.chainid2refpdbname[chnid]) return {html: html, html3: html3};
42061
42059
 
42062
- for(let i = 0, il = ic.chainid2refpdbname[chnid].length; i < il; ++i) {
42063
- chainList += ic.chainid2refpdbname[chnid][i] + " ";
42064
- }
42060
+ let chainList = ic.refnumCls.getTemplateList(chnid);
42065
42061
 
42066
42062
  let refStruTitle = (chainList) ? "based on " + chainList : "";
42067
42063
 
@@ -42100,7 +42096,7 @@ class ShowSeq {
42100
42096
  return {html: '', html3: ''};
42101
42097
  }
42102
42098
 
42103
- //check if Kabat refnum available
42099
+ //check if IMGT refnum available
42104
42100
  let bImgtFound = false;
42105
42101
  for(let i = 0, il = giSeq.length; i < il; ++i) {
42106
42102
  let currResi = ic.ParserUtilsCls.getResi(chnid, i);
@@ -42507,7 +42503,7 @@ class ShowSeq {
42507
42503
  }
42508
42504
  }
42509
42505
  }
42510
- else {
42506
+ else {
42511
42507
  if(currStrand != ' ') {
42512
42508
  bLoop = ic.residIgLoop[residueid];
42513
42509
  html += this.getRefnumHtml(residueid, refnumStr, refnumStr_ori, refnumLabel, currStrand, bLoop, bHidelabel);
@@ -42785,6 +42781,8 @@ class HlSeq {
42785
42781
  //});
42786
42782
 
42787
42783
  // remove possible text selection
42784
+ // the following code caused the scroll of seqeunce window to the top, remove it for now
42785
+ /*
42788
42786
  if(window.getSelection) {
42789
42787
  if(window.getSelection().empty) { // Chrome
42790
42788
  window.getSelection().empty();
@@ -42794,6 +42792,7 @@ class HlSeq {
42794
42792
  } else if(document.selection) { // IE?
42795
42793
  document.selection.empty();
42796
42794
  }
42795
+ */
42797
42796
  });
42798
42797
  }
42799
42798
 
@@ -44301,61 +44300,6 @@ class LineGraph {
44301
44300
  async showIgRefNum() { let ic = this.icn3d, me = ic.icn3dui;
44302
44301
  let thisClass = this;
44303
44302
 
44304
- // if(ic.pdbDataArray) {
44305
- // await thisClass.parseRefPdbData(ic.pdbDataArray);
44306
- // }
44307
- // else {
44308
- //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'];
44309
-
44310
- //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'];
44311
-
44312
- /*
44313
- // round 1
44314
- 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'];
44315
- // round 2
44316
- ic.refpdbHash = {};
44317
-
44318
- 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'];
44319
- 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'];
44320
- 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'];
44321
- 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'];
44322
- 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'];
44323
- 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'];
44324
- 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'];
44325
- ic.refpdbHash['CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
44326
- ic.refpdbHash['TP47_1o75A_bacteria'] = ['TP47_1o75A_bacteria', 'TEAD1_3kysC_human', 'RBPJ_6py8C_human_Unk-n2', 'CuZnSuperoxideDismutase_1hl5C_human', 'ASF1A_2iijA_human'];
44327
- 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'];
44328
- */
44329
- /*
44330
- // round 1
44331
- 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'];
44332
-
44333
- // round 2
44334
- ic.refpdbHash = {};
44335
- ic.refpdbHash['NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
44336
- ic.refpdbHash['C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1', 'BArrestin1_4jqiA_rat_n1'];
44337
- ic.refpdbHash['Siglec3_5j0bB_human_C2-n2'] = ['Siglec3_5j0bB_human_C2-n2', 'CD2_1hnfA_human_C2-n2', 'GHR_1axiB_human_FN3-n1'];
44338
- ic.refpdbHash['ICOS_6x4gA_human_V'] = ['ICOS_6x4gA_human_V', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
44339
- ic.refpdbHash['B2Microglobulin_7phrL_human_C1'] = ['B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1'];
44340
- ic.refpdbHash['VTCN1_Q7Z7D3_human_V-n2'] = ['VTCN1_Q7Z7D3_human_V-n2', 'FAB-LIGHT_5esv_C1-n2'];
44341
- ic.refpdbHash['Contactin1_2ee2A_human_FN3-n9'] = ['Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7'];
44342
- ic.refpdbHash['InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n2'];
44343
- ic.refpdbHash['JAM1_1nbqA_human_VorIset-n2'] = ['JAM1_1nbqA_human_VorIset-n2', 'Contactin1_3s97C_human_C2-n2'];
44344
- ic.refpdbHash['LAG3_7tzgD_human_C2-n2'] = ['LAG3_7tzgD_human_C2-n2', 'BTLA_2aw2A_human_Iset'];
44345
- ic.refpdbHash['Palladin_2dm3A_human_Iset-n1'] = ['Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152'];
44346
- ic.refpdbHash['PD1_4zqkB_human_V'] = ['PD1_4zqkB_human_V', 'TCRa_6jxrm_human_V-n1', 'FAB-LIGHT_5esv_V-n1'];
44347
- ic.refpdbHash['CD8a_1cd8A_human_V'] = ['CD8a_1cd8A_human_V', 'FAB-HEAVY_5esv_V-n1', 'VNAR_1t6vN_shark_V'];
44348
- ic.refpdbHash['VISTA_6oilA_human_V'] = ['VISTA_6oilA_human_V', 'PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1'];
44349
- ic.refpdbHash['LAG3_7tzgD_human_V-n1'] = ['LAG3_7tzgD_human_V-n1'];
44350
- ic.refpdbHash['TP47_1o75A_bacteria'] = ['TP47_1o75A_bacteria'];
44351
- ic.refpdbHash['TP34_2o6cA_bacteria'] = ['TP34_2o6cA_bacteria'];
44352
- ic.refpdbHash['TEAD1_3kysC_human'] = ['TEAD1_3kysC_human', 'CuZnSuperoxideDismutase_1hl5C_human'];
44353
- ic.refpdbHash['RBPJ_6py8C_human_Unk-n2'] = ['RBPJ_6py8C_human_Unk-n2', 'ASF1A_2iijA_human'];
44354
- ic.refpdbHash['TCRa_6jxrm_human_C1-n2'] = ['TCRa_6jxrm_human_C1-n2'];
44355
- ic.refpdbHash['IsdA_2iteA_bacteria'] = ['IsdA_2iteA_bacteria', 'CoAtomerGamma1_1r4xA_human'];
44356
- ic.refpdbHash['LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'MPT63_1lmiA_bacteria'];
44357
- ic.refpdbHash['CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
44358
- */
44359
44303
  // round 1, 16 templates
44360
44304
  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'];
44361
44305
 
@@ -44423,11 +44367,6 @@ class LineGraph {
44423
44367
  ic.refpdbHash['6A15'] = ['CD19_6al5A_human_C2orV-n1'];
44424
44368
  ic.refpdbHash['2QKI'] = ['C3_2qkiD_human_n1'];
44425
44369
 
44426
- // if(ic.pdbDataArray) {
44427
- // await thisClass.parseRefPdbData(ic.pdbDataArray);
44428
- // }
44429
- // else {
44430
-
44431
44370
  let pdbAjaxArray = [];
44432
44371
  for(let k = 0, kl = ic.refpdbArray.length; k < kl; ++k) {
44433
44372
  //let urlpdb = me.htmlCls.baseUrl + "icn3d/refpdb/" + ic.refpdbArray[k] + ".pdb";
@@ -44533,7 +44472,11 @@ class LineGraph {
44533
44472
  for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
44534
44473
  let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
44535
44474
  // ig strand for any subset will have the same k, use the number of residue to separate them
44536
- let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
44475
+ let atomFirst = ic.firstAtomObjCls.getFirstAtomObj(domainAtomsArray[k]);
44476
+ let atomLast = ic.firstAtomObjCls.getLastAtomObj(domainAtomsArray[k]);
44477
+ let resiSum = parseInt(atomFirst.resi) + parseInt(atomLast.resi);
44478
+ //let domainid = chainid + '-' + k + '_' + Object.keys(domainAtomsArray[k]).length;
44479
+ let domainid = chainid + '-' + k + '_' + resiSum;
44537
44480
  ic.domainid2pdb[domainid] = pdb_target;
44538
44481
 
44539
44482
  for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
@@ -44555,8 +44498,27 @@ class LineGraph {
44555
44498
 
44556
44499
  try {
44557
44500
  let dataArray2 = [];
44558
- let allPromise = Promise.allSettled(ajaxArray);
44559
- dataArray2 = await allPromise;
44501
+
44502
+ // let allPromise = Promise.allSettled(ajaxArray);
44503
+ // dataArray2 = await allPromise;
44504
+
44505
+ //split arrays into chunks of 100 jobs
44506
+ let n = (me.bNode) ? 48 : 96;
44507
+ for(let i = 0, il = (ajaxArray.length - 1) / n + 1; i < il; ++i) {
44508
+ let currAjaxArray = [];
44509
+ if(i == il - 1) { // last one
44510
+ currAjaxArray = ajaxArray.slice(i * n, ajaxArray.length);
44511
+ }
44512
+ else {
44513
+ currAjaxArray = ajaxArray.slice(i * n, (i + 1) * n);
44514
+ }
44515
+
44516
+ let currPromise = Promise.allSettled(currAjaxArray);
44517
+ let currDataArray = await currPromise;
44518
+
44519
+ dataArray2 = dataArray2.concat(currDataArray);
44520
+ }
44521
+
44560
44522
 
44561
44523
  let bRound1 = true;
44562
44524
  await thisClass.parseAlignData(dataArray2, domainidpairArray, bRound1);
@@ -44564,12 +44526,42 @@ class LineGraph {
44564
44526
  /// if(ic.deferredRefnum !== undefined) ic.deferredRefnum.resolve();
44565
44527
  }
44566
44528
  catch(err) {
44567
- if(!me.bNode) console.log("Error in aligning with TM-align...");
44529
+ 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...";
44530
+ if(!me.bNode) {
44531
+ var aaa = 1; //alert(mess);
44532
+ }
44533
+ else {
44534
+ console.log(mess);
44535
+ }
44568
44536
  //console.log("Error in aligning with TM-align...");
44569
44537
  return;
44570
44538
  }
44571
44539
  }
44572
44540
 
44541
+ getTemplateList(chainid) { let ic = this.icn3d; ic.icn3dui;
44542
+ let domainid2refpdbname = {};
44543
+
44544
+ for(let i = 0, il = ic.chainid2refpdbname[chainid].length; i < il; ++i) {
44545
+ let refpdbname_domainid = ic.chainid2refpdbname[chainid][i].split('|');
44546
+ domainid2refpdbname[refpdbname_domainid[1]] = refpdbname_domainid[0];
44547
+ }
44548
+
44549
+ let domainidArray = Object.keys(domainid2refpdbname);
44550
+ domainidArray.sort(function(id1, id2) {
44551
+ let resi1 = parseInt(id1.substr(id1.lastIndexOf('_') + 1));
44552
+ let resi2 = parseInt(id2.substr(id2.lastIndexOf('_') + 1));
44553
+ return resi1 - resi2;
44554
+ });
44555
+
44556
+ let chainList = '';
44557
+ for(let i = 0, il = domainidArray.length; i < il; ++i) {
44558
+ chainList += domainid2refpdbname[domainidArray[i]];
44559
+ if(i < il - 1) chainList += ", ";
44560
+ }
44561
+
44562
+ return chainList;
44563
+ }
44564
+
44573
44565
  async parseAlignData(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
44574
44566
  let thisClass = this;
44575
44567
 
@@ -44635,7 +44627,10 @@ class LineGraph {
44635
44627
  }
44636
44628
 
44637
44629
  //if(!(bBstrand && bCstrand && bEstrand && bFstrand && bGstrand)) continue;
44638
- if(!(bBstrand && bCstrand && bEstrand && bFstrand)) continue;
44630
+ if(!(bBstrand && bCstrand && bEstrand && bFstrand)) {
44631
+ if(!me.bNode) console.log("some of the Ig strands B, C, E, F are missing...");
44632
+ continue;
44633
+ }
44639
44634
 
44640
44635
  if(!domainid2score.hasOwnProperty(domainid) || queryData[0].score > domainid2score[domainid]) {
44641
44636
  domainid2score[domainid] = queryData[0].score;
@@ -44709,10 +44704,15 @@ class LineGraph {
44709
44704
  }
44710
44705
 
44711
44706
  // combine domainid into chainid
44707
+ let processedChainid = {};
44712
44708
  for(let domainid in ic.domainid2refpdbname) {
44713
44709
  let chainid = domainid.split('-')[0];
44710
+
44711
+ if(!processedChainid.hasOwnProperty(chainid)) ic.chainid2refpdbname[chainid] = [];
44712
+ processedChainid[chainid] = 1;
44713
+
44714
44714
  if(!ic.chainid2refpdbname.hasOwnProperty(chainid)) ic.chainid2refpdbname[chainid] = [];
44715
- ic.chainid2refpdbname[chainid].push(ic.domainid2refpdbname[domainid]);
44715
+ ic.chainid2refpdbname[chainid].push(ic.domainid2refpdbname[domainid] + '|' + domainid);
44716
44716
  }
44717
44717
 
44718
44718
  // combine domainid into chainid
@@ -44729,15 +44729,15 @@ class LineGraph {
44729
44729
  for(let chainid in chainid2segs) {
44730
44730
  let segArray = chainid2segs[chainid];
44731
44731
 
44732
- let chainList = '';
44733
- for(let i = 0, il = ic.chainid2refpdbname[chainid].length; i < il; ++i) {
44734
- chainList += ic.chainid2refpdbname[chainid][i] + " ";
44735
- }
44732
+ let refpdbnameArray = ic.chainid2refpdbname[chainid];
44733
+
44734
+ let chainList = this.getTemplateList(chainid);
44735
+
44736
44736
  //if(!me.bNode) console.log("The reference PDB(s) for chain " + chainid + " are " + chainList);
44737
44737
  console.log("The reference PDB(s) for chain " + chainid + " are " + chainList);
44738
44738
 
44739
44739
  let prevStrand;
44740
- let bCd19 = ic.chainid2refpdbname[chainid].length == 1 && ic.chainid2refpdbname[chainid][0] == 'CD19_6al5A_human_C2orV-n1';
44740
+ let bCd19 = refpdbnameArray.length == 1 && refpdbnameArray[0] == 'CD19_6al5A_human_C2orV-n1';
44741
44741
  for(let i = 0, il = segArray.length; i < il; ++i) {
44742
44742
  let seg = segArray[i];
44743
44743
  let qStart = seg.q_start;