icn3d 3.25.10 → 3.25.12

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
@@ -12681,7 +12681,7 @@ class Events {
12681
12681
  async searchSeq() { let me = this.icn3dui, ic = me.icn3d, thisClass = this;
12682
12682
  let select = $("#" + me.pre + "search_seq").val();
12683
12683
  if(isNaN(select) && select.indexOf('$') == -1 && select.indexOf('.') == -1 && select.indexOf(':') == -1
12684
- && select.indexOf('%') == -1 && select.indexOf('@') == -1) {
12684
+ && select.indexOf('@') == -1) {
12685
12685
  select = ':' + select;
12686
12686
  }
12687
12687
  let commandname = select.replace(/\s+/g, '_');
@@ -15117,6 +15117,22 @@ class Events {
15117
15117
  thisClass.setLogCmd('define coil sets | chain ' + chainid, true);
15118
15118
  });
15119
15119
 
15120
+ $(document).on("click", ".icn3d-igstrandsets", function(e) { let ic = me.icn3d;
15121
+ e.stopImmediatePropagation();
15122
+ //e.preventDefault();
15123
+ let chainid = $(this).attr('chainid');
15124
+ ic.addTrackCls.defineIgstrand(chainid, 'igstrand');
15125
+ thisClass.setLogCmd('define igstrand sets | chain ' + chainid, true);
15126
+ });
15127
+
15128
+ $(document).on("click", ".icn3d-igloopsets", function(e) { let ic = me.icn3d;
15129
+ e.stopImmediatePropagation();
15130
+ //e.preventDefault();
15131
+ let chainid = $(this).attr('chainid');
15132
+ ic.addTrackCls.defineIgstrand(chainid, 'igloop');
15133
+ thisClass.setLogCmd('define igloop sets | chain ' + chainid, true);
15134
+ });
15135
+
15120
15136
  me.myEventCls.onIds("#" + me.pre + "deletesets", "click", function(e) { let ic = me.icn3d;
15121
15137
  ic.definedSetsCls.deleteSelectedSets();
15122
15138
  thisClass.setLogCmd("delete selected sets", true);
@@ -33190,7 +33206,7 @@ class Alternate {
33190
33206
  ic.impostorCls.clearImpostors();
33191
33207
 
33192
33208
  // show membranes
33193
- if(ic.bOpm) {
33209
+ if(ic.bOpm && !me.cfg.chainalign) {
33194
33210
  //if(window.dialog && window.dialog.hasClass('ui-dialog-content')) window.dialog.dialog( "close" );
33195
33211
 
33196
33212
  let html = me.utilsCls.getMemDesc();
@@ -35588,7 +35604,7 @@ class SetColor {
35588
35604
  // color = me.parasCls.thr(me.htmlCls.GREYB);
35589
35605
  // }
35590
35606
  // else {
35591
- let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
35607
+ let refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
35592
35608
  let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
35593
35609
  color = ic.showSeqCls.getRefnumColor(currStrand);
35594
35610
 
@@ -35624,7 +35640,7 @@ class SetColor {
35624
35640
  color = me.parasCls.thr(me.htmlCls.GREYB);
35625
35641
  }
35626
35642
  else {
35627
- let refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
35643
+ let refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
35628
35644
  let currStrand = refnumLabel.replace(new RegExp(refnumStr,'g'), '');
35629
35645
  color = ic.showSeqCls.getProtodomainColor(currStrand);
35630
35646
 
@@ -40752,7 +40768,7 @@ class AddTrack {
40752
40768
  ++helixCnt;
40753
40769
 
40754
40770
  if(Object.keys(selectedResidues).length > 0) {
40755
- setName = currName + 'H' + helixCnt + ')';
40771
+ setName = currName + 'H' + helixCnt.toString().padStart(2, '0') + ')';
40756
40772
  if(type == 'coil') {
40757
40773
  ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
40758
40774
  if(!bUnion) bUnion = true;
@@ -40763,13 +40779,13 @@ class AddTrack {
40763
40779
 
40764
40780
  //zero =(index < 10) ? '0' : '';
40765
40781
  //currName = chainid + zero + index + '_H' + helixCnt;
40766
- currName = chainid + '_H' + helixCnt;
40782
+ currName = chainid + '_H' + helixCnt.toString().padStart(2, '0');
40767
40783
  selectedResidues[residueid] = 1;
40768
40784
 
40769
40785
  if(atom.ssend) {
40770
40786
  //zero =(index < 9) ? '0' : '';
40771
40787
  //prevName = chainid + zero +(index+1) + '_L(H' + helixCnt;
40772
- prevName = chainid + '_C(H' + helixCnt;
40788
+ prevName = chainid + '_C(H' + helixCnt.toString().padStart(2, '0');
40773
40789
  if(type == 'helix') {
40774
40790
  ic.selectionCls.selectResidueList(selectedResidues, currName, currName, bUnion, bUpdateHighlight);
40775
40791
  if(!bUnion) bUnion = true;
@@ -40782,7 +40798,7 @@ class AddTrack {
40782
40798
  ++sheetCnt;
40783
40799
 
40784
40800
  if(Object.keys(selectedResidues).length > 0) {
40785
- setName = currName + 'S' + sheetCnt + ')';
40801
+ setName = currName + 'S' + sheetCnt.toString().padStart(2, '0') + ')';
40786
40802
  if(type == 'coil') {
40787
40803
  ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
40788
40804
  if(!bUnion) bUnion = true;
@@ -40793,13 +40809,13 @@ class AddTrack {
40793
40809
 
40794
40810
  //zero =(index < 10) ? '0' : '';
40795
40811
  //currName = chainid + zero + index + '_S' + sheetCnt;
40796
- currName = chainid + '_S' + sheetCnt;
40812
+ currName = chainid + '_S' + sheetCnt.toString().padStart(2, '0');
40797
40813
  selectedResidues[residueid] = 1;
40798
40814
 
40799
40815
  if(atom.ssend) {
40800
40816
  //zero =(index < 9) ? '0' : '';
40801
40817
  //prevName = chainid + zero +(index+1) + '_L(S' + sheetCnt;
40802
- prevName = chainid + '_C(S' + sheetCnt;
40818
+ prevName = chainid + '_C(S' + sheetCnt.toString().padStart(2, '0');
40803
40819
  if(type == 'sheet') {
40804
40820
  ic.selectionCls.selectResidueList(selectedResidues, currName, currName, bUnion, bUpdateHighlight);
40805
40821
  if(!bUnion) bUnion = true;
@@ -40822,6 +40838,90 @@ class AddTrack {
40822
40838
  }
40823
40839
  }
40824
40840
 
40841
+ // type: igstrand, igloop
40842
+ defineIgstrand(chainid, type) { let ic = this.icn3d, me = ic.icn3dui;
40843
+ if(!$('#' + ic.pre + 'dl_definedsets').hasClass('ui-dialog-content') || !$('#' + ic.pre + 'dl_definedsets').dialog( 'isOpen' )) {
40844
+ me.htmlCls.dialogCls.openDlg('dl_definedsets', 'Select sets');
40845
+ $("#" + ic.pre + "atomsCustom").resizable();
40846
+ }
40847
+
40848
+ let selectedResidues = {};
40849
+ let bUnion = false, bUpdateHighlight = true;
40850
+
40851
+ let strandCnt = 0, loopCnt = 0;
40852
+ let setName, currStrand, prevStrand, prevStrandReal, currType, prevType;
40853
+
40854
+ // clear selection
40855
+ ic.hAtoms = {};
40856
+
40857
+ let bStart = false;
40858
+
40859
+ for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
40860
+ let currResi = ic.chainsSeq[chainid][i].resi;
40861
+ let resid = chainid + '_' + currResi;
40862
+
40863
+ if(!ic.residues.hasOwnProperty(resid) ) continue;
40864
+
40865
+ let refnumLabel, refnumStr;
40866
+ refnumLabel = ic.resid2refnum[resid];
40867
+ if(!refnumLabel) continue;
40868
+
40869
+ refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
40870
+ currStrand = refnumLabel.replace(refnumStr, '');
40871
+
40872
+ if(ic.residIgLoop.hasOwnProperty(resid)) {
40873
+ currType = 'igloop';
40874
+ }
40875
+ else {
40876
+ currType = 'igstrand';
40877
+ }
40878
+
40879
+ if(bStart && currType != prevType && Object.keys(selectedResidues).length > 0) {
40880
+ if(prevType == 'igstrand') {
40881
+ ++strandCnt;
40882
+ setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
40883
+ setName = setName.replace(/'/g, '`');
40884
+ if(type == 'igstrand') {
40885
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
40886
+ if(!bUnion) bUnion = true;
40887
+ }
40888
+ prevStrandReal = prevStrand;
40889
+ }
40890
+ else if(prevType == 'igloop') {
40891
+ ++loopCnt;
40892
+ setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
40893
+ setName = setName.replace(/'/g, '`');
40894
+ if(type == 'igloop') {
40895
+ ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
40896
+ if(!bUnion) bUnion = true;
40897
+ }
40898
+ }
40899
+
40900
+ selectedResidues = {};
40901
+ }
40902
+
40903
+ selectedResidues[resid] = 1;
40904
+
40905
+ prevStrand = currStrand;
40906
+ prevType = currType;
40907
+
40908
+ bStart = true;
40909
+ } // for loop
40910
+
40911
+ if(prevType == 'igstrand') {
40912
+ ++strandCnt;
40913
+ setName = 'Strand-' + prevStrand + '-' + chainid + '-' + strandCnt.toString().padStart(3, '0');
40914
+ setName = setName.replace(/'/g, '`');
40915
+ if(type == 'igstrand') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
40916
+ }
40917
+ else if(prevType == 'igloop') {
40918
+ ++loopCnt;
40919
+ setName = 'Loop-' + prevStrandReal + '_' + currStrand + '-' + chainid + '-' + loopCnt.toString().padStart(3, '0');
40920
+ setName = setName.replace(/'/g, '`');
40921
+ if(type == 'igloop') ic.selectionCls.selectResidueList(selectedResidues, setName, setName, bUnion, bUpdateHighlight);
40922
+ }
40923
+ }
40924
+
40825
40925
  simplifyText(text) { let ic = this.icn3d; ic.icn3dui;
40826
40926
  let out = ''; // 1-based text positions
40827
40927
  let bFoundText = false;
@@ -41831,6 +41931,11 @@ class ShowAnno {
41831
41931
  chainHtml += this.addButton(chnid, "icn3d-helixsets", "Helix Sets", "Define sets for each helix in this chain and add them to the menu of \"Defined Sets\"", 60, buttonStyle) + "&nbsp;"
41832
41932
  + this.addButton(chnid, "icn3d-sheetsets", "Sheet Sets", "Define sets for each sheet in this chain and add them to the menu of \"Defined Sets\"", 60, buttonStyle) + "&nbsp;"
41833
41933
  + this.addButton(chnid, "icn3d-coilsets", "Coil Sets", "Define sets for each coil in this chain and add them to the menu of \"Defined Sets\"", 60, buttonStyle);
41934
+
41935
+ if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid)) {
41936
+ chainHtml += "&nbsp;" + this.addButton(chnid, "icn3d-igstrandsets", "Ig Strand Sets", "Define sets for each Ig strand in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle) + "&nbsp;"
41937
+ + this.addButton(chnid, "icn3d-igloopsets", "Ig Loop Sets", "Define sets for each Ig loop in this chain and add them to the menu of \"Defined Sets\"", 80, buttonStyle);
41938
+ }
41834
41939
  $("#" + ic.pre + "dl_annotations").append(chainHtml);
41835
41940
  //let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'domain', 'site', 'ptm', 'interaction', 'custom', 'ssbond', 'crosslink', 'transmem'];
41836
41941
  let itemArray = ['giseq', 'cdd', 'clinvar', 'snp', 'site', 'ptm', 'ssbond', 'crosslink', 'transmem', 'domain', 'custom', 'interaction'];
@@ -42263,6 +42368,10 @@ class ShowAnno {
42263
42368
  }
42264
42369
  }
42265
42370
  getColorhexFromBlosum62(resA, resB) { let ic = this.icn3d, me = ic.icn3dui;
42371
+ let color = '333333';
42372
+
42373
+ if(!resA || !resB) return color;
42374
+
42266
42375
  resA = resA.toUpperCase();
42267
42376
  resB = resB.toUpperCase();
42268
42377
 
@@ -42272,7 +42381,7 @@ class ShowAnno {
42272
42381
  if(matrixValue === undefined) return '333333';
42273
42382
  // range and color: blue for -4 ~ 0, red for 0 ~ 11
42274
42383
  // max value 221 to avoid white
42275
- let color = '333333';
42384
+
42276
42385
  if(matrixValue > 0) {
42277
42386
  let c = 221 - parseInt(matrixValue / 11.0 * 221);
42278
42387
  let cStr =(c < 10) ? '0' + c.toString(16) : c.toString(16);
@@ -42720,7 +42829,7 @@ class ShowSeq {
42720
42829
  html += '</div>';
42721
42830
  html3 += '</div></div>';
42722
42831
  }
42723
- else if(ic.bShowRefnum && ic.chainid2index.hasOwnProperty(chnid)) {
42832
+ else if(ic.bShowRefnum && ic.chainid2refpdbname.hasOwnProperty(chnid)) {
42724
42833
  let result = this.showRefNum(giSeq, chnid);
42725
42834
  html += result.html;
42726
42835
  html3 += result.html3;
@@ -42763,10 +42872,10 @@ class ShowSeq {
42763
42872
  let html = '', html3 = '';
42764
42873
 
42765
42874
  let chainList = '';
42766
- if(!ic.chainid2index[chnid]) return {html: html, html3: html3};
42875
+ if(!ic.chainid2refpdbname[chnid]) return {html: html, html3: html3};
42767
42876
 
42768
- for(let i = 0, il = ic.chainid2index[chnid].length; i < il; ++i) {
42769
- chainList += ic.refpdbArray[ic.chainid2index[chnid][i]] + " ";
42877
+ for(let i = 0, il = ic.chainid2refpdbname[chnid].length; i < il; ++i) {
42878
+ chainList += ic.chainid2refpdbname[chnid][i] + " ";
42770
42879
  }
42771
42880
 
42772
42881
  let refStruTitle = (chainList) ? "based on " + chainList : "";
@@ -42827,13 +42936,23 @@ class ShowSeq {
42827
42936
 
42828
42937
  // sometimes one chain may have several Ig domains,set an index for each IgDomain
42829
42938
  let index = 1, bStart = false;
42830
-
42939
+
42940
+ if(!bCustom && !kabat_or_imgt) {
42941
+ // reset ic.residIgLoop for the current selection, which could be the second round of ref num assignment
42942
+ let residHash = ic.firstAtomObjCls.getResiduesFromAtoms(ic.hAtoms);
42943
+ for(let resid in residHash) {
42944
+ // not in loop any more if you assign ref numbers multiple times
42945
+ delete ic.residIgLoop[resid];
42946
+ }
42947
+ }
42948
+
42831
42949
  // 1. get the range of each strand excluding loops
42832
42950
  let strandArray = [], strandHash = {}, strandCnt = 0, resCnt = 0, resCntBfAnchor = 0, resCntAtAnchor = 0;
42833
42951
  if(!bCustom && !kabat_or_imgt) {
42834
42952
  for(let i = 0, il = giSeq.length; i < il; ++i, ++resCnt, ++resCntBfAnchor, ++resCntAtAnchor) {
42835
42953
  let currResi = ic.ParserUtilsCls.getResi(chnid, i);
42836
42954
  let residueid = chnid + '_' + currResi;
42955
+
42837
42956
  refnumLabel = ic.resid2refnum[residueid];
42838
42957
 
42839
42958
  let firstChar = (refnumLabel) ? refnumLabel.substr(0,1) : ' ';
@@ -42847,7 +42966,7 @@ class ShowSeq {
42847
42966
  }
42848
42967
 
42849
42968
  if(refnumLabel) {
42850
- refnumStr_ori = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
42969
+ refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
42851
42970
  currStrand = refnumLabel.replace(new RegExp(refnumStr_ori,'g'), '');
42852
42971
  refnumStr_ori.substr(0, 1);
42853
42972
 
@@ -42930,7 +43049,9 @@ class ShowSeq {
42930
43049
  for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
42931
43050
  if(strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
42932
43051
  if(i != il - 1) { // modify
42933
- strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
43052
+ // strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
43053
+
43054
+ strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + parseInt(strandArray[i].endResi) - parseInt(strandArray[i].startResi) + 1;
42934
43055
  }
42935
43056
 
42936
43057
  strandArray.splice(i, 1);
@@ -42953,7 +43074,7 @@ class ShowSeq {
42953
43074
  currStrand = strandArray[strandCnt].strand;
42954
43075
 
42955
43076
  if(refnumLabel) {
42956
- refnumStr = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
43077
+ refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
42957
43078
  currRefnum = parseInt(refnumStr);
42958
43079
  refnumLabelNoPostfix = currStrand + currRefnum;
42959
43080
 
@@ -43035,7 +43156,7 @@ class ShowSeq {
43035
43156
  }
43036
43157
  else if(parseInt(currResi) >= parseInt(strandArray[strandCnt].startResi) && parseInt(currResi) <= parseInt(strandArray[strandCnt].endResi)) {
43037
43158
  // not in loop any more if you assign ref numbers multiple times
43038
- delete ic.residIgLoop[residueid];
43159
+ //delete ic.residIgLoop[residueid];
43039
43160
 
43040
43161
  bBeforeAstrand = false;
43041
43162
 
@@ -43125,7 +43246,7 @@ class ShowSeq {
43125
43246
  let bHidelabel = false;
43126
43247
 
43127
43248
  if(refnumLabel) {
43128
- refnumStr_ori = refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
43249
+ refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
43129
43250
  currStrand = refnumLabel.replace(new RegExp(refnumStr_ori,'g'), '');
43130
43251
  currStrand_ori = currStrand;
43131
43252
 
@@ -52759,7 +52880,7 @@ class ParserUtils {
52759
52880
  if(rmsd) {
52760
52881
  me.htmlCls.clickMenuCls.setLogCmd("realignment RMSD: " + rmsd.toPrecision(4), false);
52761
52882
  let html = "<br><b>Realignment RMSD</b>: " + rmsd.toPrecision(4) + " &#8491;<br><br>";
52762
- if(ic.bAfMem) {
52883
+ if(ic.bAfMem && !me.cfg.chainalign) {
52763
52884
  //if(window.dialog && window.dialog.hasClass('ui-dialog-content')) window.dialog.dialog( "close" );
52764
52885
  html += me.utilsCls.getMemDesc();
52765
52886
  }
@@ -57821,6 +57942,18 @@ class ApplyCommand {
57821
57942
 
57822
57943
  ic.addTrackCls.defineSecondary(chainid, 'coil');
57823
57944
  }
57945
+ else if(commandOri.indexOf('define igstrand sets') == 0) {
57946
+ let chainStr = commandOri.split(' | ')[1];
57947
+ let chainid = chainStr.split(' ')[1];
57948
+
57949
+ ic.addTrackCls.defineIgstrand(chainid, 'igstrand');
57950
+ }
57951
+ else if(commandOri.indexOf('define igloop sets') == 0) {
57952
+ let chainStr = commandOri.split(' | ')[1];
57953
+ let chainid = chainStr.split(' ')[1];
57954
+
57955
+ ic.addTrackCls.defineIgstrand(chainid, 'igloop');
57956
+ }
57824
57957
  else if(commandOri.indexOf('select interaction') == 0) {
57825
57958
  let idArray = commandOri.substr(commandOri.lastIndexOf(' ') + 1).split(',');
57826
57959
  if(idArray !== null) {
@@ -60621,6 +60754,7 @@ class SelectByCommand {
60621
60754
  // $1,2,3: Structure
60622
60755
  // .A,B,C: chain
60623
60756
  // :5-10,K,chemicals: residues, could be 'proteins', 'nucleotides', 'chemicals', 'ions', and 'water'
60757
+ // :refnum_1250,anchors,strands,loops: reference numbers 1250, anchor residues (e.g., 2250), residues in strands, residues in loops
60624
60758
  // @CA,C,C*: atoms
60625
60759
  // wild card * can be used to select all
60626
60760
  //var currHighlightAtoms = {}
@@ -60628,7 +60762,7 @@ class SelectByCommand {
60628
60762
  let dollarPos = commandArray[i].indexOf('$');
60629
60763
  let periodPos = commandArray[i].indexOf('.');
60630
60764
  let colonPos = commandArray[i].indexOf(':');
60631
- let colonPos2 = commandArray[i].indexOf('%'); // for reference numbers
60765
+ let colonPos2 = commandArray[i].indexOf(':ref_'); // for reference numbers
60632
60766
  let atPos = commandArray[i].indexOf('@');
60633
60767
 
60634
60768
  let moleculeStr, chainStr, residueStr, refResStr, atomStrArray;
@@ -60645,14 +60779,14 @@ class SelectByCommand {
60645
60779
  if(colonPos === -1 && colonPos2 === -1 ) {
60646
60780
  residueStr = "*";
60647
60781
  }
60782
+ else if(colonPos2 != -1) {
60783
+ refResStr = testStr.substr(colonPos2 + 5);
60784
+ testStr = testStr.substr(0, colonPos2);
60785
+ }
60648
60786
  else if(colonPos != -1) {
60649
60787
  residueStr = testStr.substr(colonPos + 1);
60650
60788
  testStr = testStr.substr(0, colonPos);
60651
60789
  }
60652
- else if(colonPos2 != -1) {
60653
- refResStr = testStr.substr(colonPos2 + 1);
60654
- testStr = testStr.substr(0, colonPos2);
60655
- }
60656
60790
 
60657
60791
  if(periodPos === -1) {
60658
60792
  chainStr = "*";
@@ -60746,7 +60880,9 @@ class SelectByCommand {
60746
60880
  else if(residueStrArray[j] === '*') { // all resiues
60747
60881
  bAllResidues = true;
60748
60882
  }
60749
- else if(residueStrArray[j] !== 'proteins' && residueStrArray[j] !== 'nucleotides' && residueStrArray[j] !== 'chemicals' && residueStrArray[j] !== 'ions' && residueStrArray[j] !== 'water') { // residue name
60883
+ else if(residueStrArray[j] !== 'proteins' && residueStrArray[j] !== 'nucleotides'
60884
+ && residueStrArray[j] !== 'chemicals' && residueStrArray[j] !== 'ions' && residueStrArray[j] !== 'water'
60885
+ && residueStrArray[j] !== 'anchors' && residueStrArray[j] !== 'strands' && residueStrArray[j] !== 'loops') { // residue name
60750
60886
  let tmpStr = residueStrArray[j].toUpperCase();
60751
60887
  //oneLetterResidue =(residueStrArray[j].length === 1) ? tmpStr : me.utilsCls.residueName2Abbr(tmpStr);
60752
60888
  oneLetterResidueStr = tmpStr;
@@ -60815,6 +60951,16 @@ class SelectByCommand {
60815
60951
  for(let m in chainAtomHash) {
60816
60952
  // residue could also be 'proteins', 'nucleotides', 'chemicals', 'ions', and 'water'
60817
60953
  ic.atoms[m].resn.substr(0,3).toUpperCase();
60954
+ let resid = molecule_chain + '_' + ic.atoms[m].resi;
60955
+ let refnumLabel, refnumStr, refnum;
60956
+ if(bRefnum) {
60957
+ refnumLabel = ic.resid2refnum[resid];
60958
+ if(refnumLabel) {
60959
+ refnumStr = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
60960
+ refnum = parseInt(refnumStr);
60961
+ }
60962
+ }
60963
+
60818
60964
  if(bAllResidues
60819
60965
  //|| me.utilsCls.residueName2Abbr(tmpStr) === oneLetterResidue
60820
60966
  ||(residueStrArray[j] === 'proteins' && m in ic.proteins)
@@ -60822,32 +60968,23 @@ class SelectByCommand {
60822
60968
  ||(residueStrArray[j] === 'chemicals' && m in ic.chemicals)
60823
60969
  ||(residueStrArray[j] === 'ions' && m in ic.ions)
60824
60970
  ||(residueStrArray[j] === 'water' && m in ic.water)
60971
+ ||(bRefnum && refnumLabel && residueStrArray[j] === 'anchors' && refnum % 100 == 50)
60972
+ ||(bRefnum && refnumLabel && residueStrArray[j] === 'strands' && !ic.residIgLoop.hasOwnProperty(resid))
60973
+ ||(bRefnum && refnumLabel && residueStrArray[j] === 'loops' && ic.residIgLoop.hasOwnProperty(resid))
60825
60974
  ) {
60826
60975
  // many duplicates
60827
60976
  if(i === 0) {
60828
- residueHash[molecule_chain + '_' + ic.atoms[m].resi] = 1;
60977
+ residueHash[resid] = 1;
60829
60978
  }
60830
60979
  else {
60831
- let residTmp = molecule_chain + '_' + ic.atoms[m].resi;
60832
- //if(!residueHash.hasOwnProperty(residTmp)) residueHash[residTmp] = undefined;
60833
- if(!residueHash.hasOwnProperty(residTmp)) delete residueHash[residTmp];
60980
+ if(!residueHash.hasOwnProperty(resid)) delete residueHash[resid];
60834
60981
  }
60835
60982
 
60836
60983
  for(let n = 0, nl = atomStrArray.length; n < nl; ++n) {
60837
60984
  let atomStr = atomStrArray[n];
60838
60985
 
60839
60986
  atomHash = this.processAtomStr(atomStr, atomHash, i, m);
60840
-
60841
- // if(atomStr === '*' || atomStr === ic.atoms[m].name) {
60842
- // if(i === 0) {
60843
- // atomHash[m] = 1;
60844
- // }
60845
- // else {
60846
- // if(!atomHash.hasOwnProperty(m)) delete atomHash[m];
60847
- // }
60848
- // }
60849
60987
  }
60850
-
60851
60988
  }
60852
60989
  } // end for(let m in atomHash) {
60853
60990
 
@@ -62964,72 +63101,168 @@ class Dssp {
62964
63101
  async showIgRefNum() { let ic = this.icn3d, me = ic.icn3dui;
62965
63102
  let thisClass = this;
62966
63103
 
62967
- // if(ic.resid2refnum && Object.keys(ic.resid2refnum).length > 0) {
62968
- // ic.bShowRefnum = true;
62969
-
62970
- // // open sequence view
62971
- // ic.hAtomsRefnum = {};
62972
- // ic.bResetAnno = true;
62973
- // await ic.showAnnoCls.showAnnotations();
62974
- // ic.annotationCls.setAnnoViewAndDisplay('detailed view');
63104
+ // if(ic.pdbDataArray) {
63105
+ // await thisClass.parseRefPdbData(ic.pdbDataArray);
62975
63106
  // }
62976
- if(ic.pdbDataArray) {
62977
- await thisClass.parseRefPdbData(ic.pdbDataArray);
62978
- }
62979
- else {
62980
- //ic.refpdbArray = ['1bqu_fn3', '1cd8_igv', '1cdh_cd4', '1dr9_cd80', '1hnf_cd2', '1hxm_d', '1hxm_g', '1ifr_lamin', '1ncn_cd86', '1t6v_vnar', '1yjd_cd28', '2atp_a', '2atp_b', '2dm3_iset', '3kys_tead1', '3pv7_ncr', '4f9l_cd277', '4gos_vtc', '4i0k_cd276', '4jqi_b', '4z18_cd274', '4zqk_pd1', '4zt1_e', '5esv_vh', '5esv_vl', '6al5_cd19', '6jxr_a', '6jxr_b', '6jxr_d', '6jxr_e', '6jxr_g', '6oil_vista', '6rp8_at', '6rp8_t', '6umt_cd273', '6x4g_cd275', '6x4g_icos', '7xq8_a', '7xq8_b', 'q71h61_ild', 'q9um44_hhl', 'p42081_cd86', 'q7z7d3_vtc', '1bqu_x', '1cdh_x', '1hnf_x', '1hxm_dx', '1hxm_gx', '4jqi_x', '4zt1_x', '5esv_vhx', '5esv_vlx', '6jxr_ax', '6jxr_bx', '1dr9_x', '3pv7_x', '4f9l_x', '4iok_x', '4z18_x', '6x4g_cd275x', 'q9um44_x'];
62981
-
62982
- //ic.refpdbArray = ['1bqu_fn3', '1cd8_igv', '1cdh_cd4', '1dr9_cd80', '1hnf_cd2', '1hxm_d', '1hxm_g', '1ifr_lamin', '1ncn_cd86', '1t6v_vnar', '1yjd_cd28', '2atp_a', '2atp_b', '2dm3_iset', '3kys_tead1', '3pv7_ncr', '4f9l_cd277', '4gos_vtc', '4i0k_cd276', '4jqi_b', '4z18_cd274', '4zqk_pd1', '4zt1_e', '5esv_vh', '5esv_vl', '6al5_cd19', '6jxr_a', '6jxr_b', '6jxr_d', '6jxr_e', '6jxr_g', '6oil_vista', '6rp8_at', '6rp8_t', '6umt_cd273', '6x4g_cd275', '6x4g_icos', '7xq8_a', '7xq8_b', 'q71h61_ild', 'q9um44_hhl'];
62983
-
62984
- //ic.refpdbArray = ['ASF1A_2iijA_human', '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_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', 'InsulinR_8guyE_human_FN3-n2', 'IsdA_2iteA_bacteria', 'LAG3_7tzgD_human_C2-n2', 'LAG3_7tzgD_human_V-n1', 'LaminAC_1ifrA_human', 'MHCIa_7phrH_human_C1', 'MPT63_1lmiA_bacteria', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'PD1_4zqkB_human_V', 'PDL1_4z18B_human_V-n1', 'Palladin_2dm3A_human_Iset-n1', 'RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2', 'TCRa_6jxrm_human_C1-n2', 'TCRa_6jxrm_human_V-n1', 'TEAD1_3kysC_human', 'TP34_2o6cA_bacteria', 'Titin_4uowM_human_Unk-n152', 'VISTA_6oilA_human_V', 'VNAR_1t6vN_shark_V', 'VTCN1_Q7Z7D3_human_V-n2'];
62985
-
62986
- //ic.refpdbArray2 = ['B2Microglobulin_7phrL_human_C1.pdb', 'Contactin1_2ee2A_human_FN3-n9.pdb', 'IL6Rb_1bquB_human_FN3-n3.pdb', 'InsulinR_8guyE_human_FN3-n1.pdb', 'JAM1_1nbqA_human_VorIset-n2.pdb', 'NaCaExchanger_2fwuA_dog_n2.pdb', 'ORF7a_1xakA_virus.pdb', 'Sidekick2_1wf5A_human_FN3-n7.pdb', 'Siglec3_5j0bB_human_C2-n2.pdb', 'TP47_1o75A_bacteria.pdb'];
62987
-
62988
- ic.refpdbArray = ['ASF1A_2iijA_human', '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_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', 'InsulinR_8guyE_human_FN3-n2', 'IsdA_2iteA_bacteria', 'LAG3_7tzgD_human_C2-n2', 'LAG3_7tzgD_human_V-n1', 'LaminAC_1ifrA_human', 'MHCIa_7phrH_human_C1', 'MPT63_1lmiA_bacteria', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark', 'PD1_4zqkB_human_V', 'PDL1_4z18B_human_V-n1', 'Palladin_2dm3A_human_Iset-n1', 'RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2', 'TCRa_6jxrm_human_C1-n2', 'TCRa_6jxrm_human_V-n1', 'TEAD1_3kysC_human', 'TP34_2o6cA_bacteria', 'Titin_4uowM_human_Unk-n152', 'VISTA_6oilA_human_V', 'VNAR_1t6vN_shark_V', 'VTCN1_Q7Z7D3_human_V-n2', 'B2Microglobulin_7phrL_human_C1.pdb', 'Contactin1_2ee2A_human_FN3-n9.pdb', 'IL6Rb_1bquB_human_FN3-n3.pdb', 'InsulinR_8guyE_human_FN3-n1.pdb', 'JAM1_1nbqA_human_VorIset-n2.pdb', 'NaCaExchanger_2fwuA_dog_n2.pdb', 'ORF7a_1xakA_virus.pdb', 'Sidekick2_1wf5A_human_FN3-n7.pdb', 'Siglec3_5j0bB_human_C2-n2.pdb', 'TP47_1o75A_bacteria.pdb'];
62989
-
62990
- if(ic.pdbDataArray) {
62991
- await thisClass.parseRefPdbData(ic.pdbDataArray);
62992
- }
62993
- else {
62994
-
62995
- let pdbAjaxArray = [];
62996
- for(let k = 0, kl = ic.refpdbArray.length; k < kl; ++k) {
62997
- //let urlpdb = me.htmlCls.baseUrl + "icn3d/refpdb/" + ic.refpdbArray[k] + ".pdb";
62998
- let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refpdbid=" + ic.refpdbArray[k];
63107
+ // else {
63108
+ //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'];
63109
+
63110
+ //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'];
63111
+
63112
+ /*
63113
+ // round 1
63114
+ 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'];
63115
+ // round 2
63116
+ ic.refpdbHash = {};
63117
+
63118
+ 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'];
63119
+ 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'];
63120
+ 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'];
63121
+ 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'];
63122
+ 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'];
63123
+ 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'];
63124
+ 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'];
63125
+ ic.refpdbHash['CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
63126
+ ic.refpdbHash['TP47_1o75A_bacteria'] = ['TP47_1o75A_bacteria', 'TEAD1_3kysC_human', 'RBPJ_6py8C_human_Unk-n2', 'CuZnSuperoxideDismutase_1hl5C_human', 'ASF1A_2iijA_human'];
63127
+ 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'];
63128
+ */
63129
+ /*
63130
+ // round 1
63131
+ 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'];
63132
+
63133
+ // round 2
63134
+ ic.refpdbHash = {};
63135
+ ic.refpdbHash['NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'ORF7a_1xakA_virus', 'ECadherin_4zt1A_human_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
63136
+ ic.refpdbHash['C3_2qkiD_human_n1'] = ['C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1', 'BArrestin1_4jqiA_rat_n1'];
63137
+ ic.refpdbHash['Siglec3_5j0bB_human_C2-n2'] = ['Siglec3_5j0bB_human_C2-n2', 'CD2_1hnfA_human_C2-n2', 'GHR_1axiB_human_FN3-n1'];
63138
+ ic.refpdbHash['ICOS_6x4gA_human_V'] = ['ICOS_6x4gA_human_V', 'Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
63139
+ ic.refpdbHash['B2Microglobulin_7phrL_human_C1'] = ['B2Microglobulin_7phrL_human_C1', 'FAB-HEAVY_5esv_C1-n2', 'MHCIa_7phrH_human_C1'];
63140
+ ic.refpdbHash['VTCN1_Q7Z7D3_human_V-n2'] = ['VTCN1_Q7Z7D3_human_V-n2', 'FAB-LIGHT_5esv_C1-n2'];
63141
+ ic.refpdbHash['Contactin1_2ee2A_human_FN3-n9'] = ['Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7'];
63142
+ ic.refpdbHash['InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n2'];
63143
+ ic.refpdbHash['JAM1_1nbqA_human_VorIset-n2'] = ['JAM1_1nbqA_human_VorIset-n2', 'Contactin1_3s97C_human_C2-n2'];
63144
+ ic.refpdbHash['LAG3_7tzgD_human_C2-n2'] = ['LAG3_7tzgD_human_C2-n2', 'BTLA_2aw2A_human_Iset'];
63145
+ ic.refpdbHash['Palladin_2dm3A_human_Iset-n1'] = ['Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152'];
63146
+ ic.refpdbHash['PD1_4zqkB_human_V'] = ['PD1_4zqkB_human_V', 'TCRa_6jxrm_human_V-n1', 'FAB-LIGHT_5esv_V-n1'];
63147
+ ic.refpdbHash['CD8a_1cd8A_human_V'] = ['CD8a_1cd8A_human_V', 'FAB-HEAVY_5esv_V-n1', 'VNAR_1t6vN_shark_V'];
63148
+ ic.refpdbHash['VISTA_6oilA_human_V'] = ['VISTA_6oilA_human_V', 'PDL1_4z18B_human_V-n1', 'CD2_1hnfA_human_V-n1'];
63149
+ ic.refpdbHash['LAG3_7tzgD_human_V-n1'] = ['LAG3_7tzgD_human_V-n1'];
63150
+ ic.refpdbHash['TP47_1o75A_bacteria'] = ['TP47_1o75A_bacteria'];
63151
+ ic.refpdbHash['TP34_2o6cA_bacteria'] = ['TP34_2o6cA_bacteria'];
63152
+ ic.refpdbHash['TEAD1_3kysC_human'] = ['TEAD1_3kysC_human', 'CuZnSuperoxideDismutase_1hl5C_human'];
63153
+ ic.refpdbHash['RBPJ_6py8C_human_Unk-n2'] = ['RBPJ_6py8C_human_Unk-n2', 'ASF1A_2iijA_human'];
63154
+ ic.refpdbHash['TCRa_6jxrm_human_C1-n2'] = ['TCRa_6jxrm_human_C1-n2'];
63155
+ ic.refpdbHash['IsdA_2iteA_bacteria'] = ['IsdA_2iteA_bacteria', 'CoAtomerGamma1_1r4xA_human'];
63156
+ ic.refpdbHash['LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human', 'MPT63_1lmiA_bacteria'];
63157
+ ic.refpdbHash['CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
63158
+ */
63159
+ // round 1
63160
+ ic.refpdbArray = ['1FAB-HEAVY_5esv_V-n1', '1CD2_1hnfA_human_V-n1', '1LAG3_7tzgD_human_C2-n2', '1BTLA_2aw2A_human_Iset', '1JAM1_1nbqA_human_VorIset-n2', '1Palladin_2dm3A_human_Iset-n1', '1FAB-HEAVY_5esv_C1-n2', '1FAB-LIGHT_5esv_C1-n2', '1BArrestin1_4jqiA_rat_n1', '1IL6Rb_1bquB_human_FN3-n3', '1Contactin1_2ee2A_human_FN3-n9', '1InsulinR_8guyE_human_FN3-n1', '1NaCaExchanger_2fwuA_dog_n2', '1CuZnSuperoxideDismutase_1hl5C_human', '1CoAtomerGamma1_1r4xA_human', '1RBPJ_6py8C_human_Unk-n2', '1CD2_1hnfA_human_C2-n2', '1GHR_1axiB_human_FN3-n1', '1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4', '1ICOS_6x4gA_human_V', '1TCRa_6jxrm_human_C1-n2', '1LaminAC_1ifrA_human', '1IsdA_2iteA_bacteria', '1MPT63_1lmiA_bacteria', '1CD19_6al5A_human_C2orV-n1', '1ORF7a_1xakA_virus', '1ECadherin_4zt1A_human_n2', '1ASF1A_2iijA_human'];
63161
+
63162
+ // round 2
63163
+ ic.refpdbHash = {};
63164
+ ic.refpdbHash['1FAB-HEAVY_5esv_V-n1'] = ['FAB-HEAVY_5esv_V-n1', 'CD8a_1cd8A_human_V', 'FAB-LIGHT_5esv_V-n1', 'VNAR_1t6vN_shark_V'];
63165
+ ic.refpdbHash['1CD2_1hnfA_human_V-n1'] = ['CD2_1hnfA_human_V-n1', 'Contactin1_3s97C_human_C2-n2', 'LAG3_7tzgD_human_V-n1'];
63166
+ ic.refpdbHash['1LAG3_7tzgD_human_C2-n2'] = ['LAG3_7tzgD_human_C2-n2', 'Siglec3_5j0bB_human_C2-n2'];
63167
+ ic.refpdbHash['1BTLA_2aw2A_human_Iset'] = ['BTLA_2aw2A_human_Iset', 'PD1_4zqkB_human_V', 'TCRa_6jxrm_human_V-n1'];
63168
+ ic.refpdbHash['1JAM1_1nbqA_human_VorIset-n2'] = ['JAM1_1nbqA_human_VorIset-n2', 'PDL1_4z18B_human_V-n1'];
63169
+ ic.refpdbHash['1Palladin_2dm3A_human_Iset-n1'] = ['Palladin_2dm3A_human_Iset-n1', 'Titin_4uowM_human_Unk-n152', 'VISTA_6oilA_human_V'];
63170
+ ic.refpdbHash['1FAB-HEAVY_5esv_C1-n2'] = ['FAB-HEAVY_5esv_C1-n2', 'B2Microglobulin_7phrL_human_C1', 'MHCIa_7phrH_human_C1'];
63171
+ ic.refpdbHash['1FAB-LIGHT_5esv_C1-n2'] = ['FAB-LIGHT_5esv_C1-n2', 'VTCN1_Q7Z7D3_human_V-n2'];
63172
+ ic.refpdbHash['1BArrestin1_4jqiA_rat_n1'] = ['BArrestin1_4jqiA_rat_n1', 'C3_2qkiD_human_n1', 'RBPJ_6py8C_human_Unk-n1'];
63173
+ ic.refpdbHash['1IL6Rb_1bquB_human_FN3-n3'] = ['IL6Rb_1bquB_human_FN3-n3', 'Sidekick2_1wf5A_human_FN3-n7'];
63174
+ ic.refpdbHash['1Contactin1_2ee2A_human_FN3-n9'] = ['Contactin1_2ee2A_human_FN3-n9', 'IL6Rb_1bquB_human_FN3-n2'];
63175
+ ic.refpdbHash['1InsulinR_8guyE_human_FN3-n1'] = ['InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2'];
63176
+ ic.refpdbHash['1NaCaExchanger_2fwuA_dog_n2'] = ['NaCaExchanger_2fwuA_dog_n2', 'NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
63177
+ ic.refpdbHash['1CuZnSuperoxideDismutase_1hl5C_human'] = ['CuZnSuperoxideDismutase_1hl5C_human', 'TEAD1_3kysC_human'];
63178
+ ic.refpdbHash['1CoAtomerGamma1_1r4xA_human'] = ['CoAtomerGamma1_1r4xA_human', 'TP34_2o6cA_bacteria'];
63179
+ ic.refpdbHash['1RBPJ_6py8C_human_Unk-n2'] = ['RBPJ_6py8C_human_Unk-n2', 'TP47_1o75A_bacteria'];
63180
+
63181
+ ic.refpdbHash['1CD2_1hnfA_human_C2-n2'] = ['CD2_1hnfA_human_C2-n2'];
63182
+ ic.refpdbHash['1GHR_1axiB_human_FN3-n1'] = ['GHR_1axiB_human_FN3-n1'];
63183
+ ic.refpdbHash['1Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
63184
+ ic.refpdbHash['1ICOS_6x4gA_human_V'] = ['ICOS_6x4gA_human_V'];
63185
+ ic.refpdbHash['1TCRa_6jxrm_human_C1-n2'] = ['TCRa_6jxrm_human_C1-n2'];
63186
+ ic.refpdbHash['1LaminAC_1ifrA_human'] = ['LaminAC_1ifrA_human'];
63187
+ ic.refpdbHash['1IsdA_2iteA_bacteria'] = ['IsdA_2iteA_bacteria'];
63188
+ ic.refpdbHash['1MPT63_1lmiA_bacteria'] = ['MPT63_1lmiA_bacteria'];
63189
+ ic.refpdbHash['1CD19_6al5A_human_C2orV-n1'] = ['CD19_6al5A_human_C2orV-n1'];
63190
+ ic.refpdbHash['1ORF7a_1xakA_virus'] = ['ORF7a_1xakA_virus'];
63191
+ ic.refpdbHash['1ECadherin_4zt1A_human_n2'] = ['ECadherin_4zt1A_human_n2'];
63192
+ ic.refpdbHash['1ASF1A_2iijA_human'] = ['ASF1A_2iijA_human'];
63193
+
63194
+ // use known ref structure
63195
+ ic.refpdbHash['5ESV'] = ['FAB-HEAVY_5esv_V-n1', 'FAB-LIGHT_5esv_V-n1', 'FAB-HEAVY_5esv_C1-n2', 'FAB-LIGHT_5esv_C1-n2'];
63196
+ ic.refpdbHash['8GUY'] = ['InsulinR_8guyE_human_FN3-n1', 'InsulinR_8guyE_human_FN3-n2'];
63197
+ ic.refpdbHash['6JXR'] = ['TCRa_6jxrm_human_V-n1', 'TCRa_6jxrm_human_C1-n2'];
63198
+ ic.refpdbHash['1HNF'] = ['CD2_1hnfA_human_V-n1', 'CD2_1hnfA_human_C2-n2'];
63199
+ ic.refpdbHash['7TZG'] = ['LAG3_7tzgD_human_V-n1', 'LAG3_7tzgD_human_C2-n2'];
63200
+ ic.refpdbHash['6PY8'] = ['RBPJ_6py8C_human_Unk-n1', 'RBPJ_6py8C_human_Unk-n2'];
63201
+ ic.refpdbHash['1BQU'] = ['IL6Rb_1bquB_human_FN3-n2', 'IL6Rb_1bquB_human_FN3-n3'];
63202
+
63203
+ ic.refpdbHash['1R4X'] = ['CoAtomerGamma1_1r4xA_human'];
63204
+ ic.refpdbHash['6OIL'] = ['VISTA_6oilA_human_V'];
63205
+ ic.refpdbHash['2ZXE'] = ['NaKATPaseTransporterBeta_2zxeB_spurdogshark'];
63206
+ ic.refpdbHash['1I8A'] = ['Endo-1,4-BetaXylanase10A_1i8aA_bacteria_n4'];
63207
+ ic.refpdbHash['2FWU'] = ['NaCaExchanger_2fwuA_dog_n2'];
63208
+ ic.refpdbHash['4JQI'] = ['BArrestin1_4jqiA_rat_n1'];
63209
+ ic.refpdbHash['1NBQ'] = ['JAM1_1nbqA_human_VorIset-n2'];
63210
+ ic.refpdbHash['1O75'] = ['TP47_1o75A_bacteria'];
63211
+ ic.refpdbHash['7PHR'] = ['MHCIa_7phrH_human_C1'];
63212
+ ic.refpdbHash['2IIJ'] = ['ASF1A_2iijA_human'];
63213
+ ic.refpdbHash['4Z18'] = ['PDL1_4z18B_human_V-n1'];
63214
+ ic.refpdbHash['1T6V'] = ['VNAR_1t6vN_shark_V'];
63215
+ ic.refpdbHash['2O6C'] = ['TP34_2o6cA_bacteria'];
63216
+ ic.refpdbHash['3KYS'] = ['TEAD1_3kysC_human'];
63217
+ ic.refpdbHash['7PHR'] = ['B2Microglobulin_7phrL_human_C1'];
63218
+ ic.refpdbHash['2AW2'] = ['BTLA_2aw2A_human_Iset'];
63219
+ ic.refpdbHash['1HL5'] = ['CuZnSuperoxideDismutase_1hl5C_human'];
63220
+ ic.refpdbHash['1WF5'] = ['Sidekick2_1wf5A_human_FN3-n7'];
63221
+ ic.refpdbHash['5J0B'] = ['Siglec3_5j0bB_human_C2-n2'];
63222
+ ic.refpdbHash['1IFR'] = ['LaminAC_1ifrA_human'];
63223
+ ic.refpdbHash['Q7Z7D3'] = ['VTCN1_Q7Z7D3_human_V-n2'];
63224
+ ic.refpdbHash['4ZQK'] = ['PD1_4zqkB_human_V'];
63225
+ ic.refpdbHash['2DM3'] = ['Palladin_2dm3A_human_Iset-n1'];
63226
+ ic.refpdbHash['2ITE'] = ['IsdA_2iteA_bacteria'];
63227
+ ic.refpdbHash['1XAK'] = ['ORF7a_1xakA_virus'];
63228
+ ic.refpdbHash['4ZT1'] = ['ECadherin_4zt1A_human_n2'];
63229
+ ic.refpdbHash['1LMI'] = ['MPT63_1lmiA_bacteria'];
63230
+ ic.refpdbHash['1CD8'] = ['CD8a_1cd8A_human_V'];
63231
+ ic.refpdbHash['3S97'] = ['Contactin1_3s97C_human_C2-n2'];
63232
+ ic.refpdbHash['1AXI'] = ['GHR_1axiB_human_FN3-n1'];
63233
+ ic.refpdbHash['6X4G'] = ['ICOS_6x4gA_human_V'];
63234
+ ic.refpdbHash['2EE2'] = ['Contactin1_2ee2A_human_FN3-n9'];
63235
+ ic.refpdbHash['4UOW'] = ['Titin_4uowM_human_Unk-n152'];
63236
+ ic.refpdbHash['6A15'] = ['CD19_6al5A_human_C2orV-n1'];
63237
+ ic.refpdbHash['2QKI'] = ['C3_2qkiD_human_n1'];
63238
+
63239
+ // if(ic.pdbDataArray) {
63240
+ // await thisClass.parseRefPdbData(ic.pdbDataArray);
63241
+ // }
63242
+ // else {
62999
63243
 
63000
- let pdbAjax = me.getAjaxPromise(urlpdb, 'text');
63244
+ let pdbAjaxArray = [];
63245
+ for(let k = 0, kl = ic.refpdbArray.length; k < kl; ++k) {
63246
+ //let urlpdb = me.htmlCls.baseUrl + "icn3d/refpdb/" + ic.refpdbArray[k] + ".pdb";
63247
+ let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refpdbid=" + ic.refpdbArray[k];
63001
63248
 
63002
- pdbAjaxArray.push(pdbAjax);
63003
- }
63249
+ let pdbAjax = me.getAjaxPromise(urlpdb, 'text');
63004
63250
 
63005
- // try {
63006
- // if(!me.bNode) {
63007
- let allPromise = Promise.allSettled(pdbAjaxArray);
63008
- ic.pdbDataArray = await allPromise;
63009
- await thisClass.parseRefPdbData(ic.pdbDataArray);
63010
- // }
63011
- // else {
63012
- // ic.pdbDataArray = [];
63013
- // for(let i = 0, il = pdbAjaxArray.length; i < il; ++i) {
63014
- // try {
63015
- // let dataTmp = await pdbAjaxArray[i];
63016
- // ic.pdbDataArray.push({'value': dataTmp});
63017
- // }
63018
- // catch(err) {
63019
- // ic.pdbDataArray.push({'value': ''});
63020
- // }
63021
- // }
63022
-
63023
- // await thisClass.parseRefPdbData(ic.pdbDataArray);
63024
- // }
63025
- // }
63026
- // catch(err) {
63027
- // if(!me.bNode) alert("Error in retrieveing reference PDB data...");
63028
- // //alert("Error in retrieveing reference PDB data...");
63029
- // return;
63030
- // }
63031
- }
63251
+ pdbAjaxArray.push(pdbAjax);
63032
63252
  }
63253
+
63254
+ // try {
63255
+ let allPromise = Promise.allSettled(pdbAjaxArray);
63256
+ ic.pdbDataArray = await allPromise;
63257
+ await thisClass.parseRefPdbData(ic.pdbDataArray);
63258
+ // }
63259
+ // catch(err) {
63260
+ // if(!me.bNode) alert("Error in retrieveing reference PDB data...");
63261
+ // //alert("Error in retrieveing reference PDB data...");
63262
+ // return;
63263
+ // }
63264
+ // }
63265
+ // }
63033
63266
  }
63034
63267
 
63035
63268
  async parseRefPdbData(dataArray) { let ic = this.icn3d, me = ic.icn3dui;
@@ -63044,6 +63277,9 @@ class Dssp {
63044
63277
 
63045
63278
  // if(!ic.resid2domainid) ic.resid2domainid = {};
63046
63279
  ic.resid2domainid = {};
63280
+ ic.domainid2pdb = {};
63281
+
63282
+ let minResidues = 20;
63047
63283
 
63048
63284
  for(let i = 0, il = struArray.length; i < il; ++i) {
63049
63285
  let struct = struArray[i];
@@ -63054,7 +63290,7 @@ class Dssp {
63054
63290
 
63055
63291
  if(!ic.proteins.hasOwnProperty(ic.firstAtomObjCls.getFirstAtomObj(ic.chains[chainid]).serial)
63056
63292
  && !ic.proteins.hasOwnProperty(ic.firstAtomObjCls.getMiddleAtomObj(ic.chains[chainid]).serial)) continue;
63057
- if(ic.chainsSeq[chainid].length < 50) continue; // peptide
63293
+ if(ic.chainsSeq[chainid].length < minResidues) continue; // peptide
63058
63294
 
63059
63295
  let currAtoms = me.hashUtilsCls.intHash(ic.chains[chainid], ic.hAtoms);
63060
63296
  if(Object.keys(currAtoms).length == 0) continue;
@@ -63071,11 +63307,6 @@ class Dssp {
63071
63307
  //domainAtomsArray.push(ic.chains[chainid]);
63072
63308
  domainAtomsArray.push(currAtoms);
63073
63309
 
63074
- // for(let n = 0, nl = ic.chainsSeq[chainid].length; n < nl; ++n) {
63075
- // let resid = chainid + '_' + ic.chainsSeq[chainid][n].resi;
63076
- // ic.resid2domainid[resid] = chainid + '-0';
63077
- // }
63078
-
63079
63310
  let residueArray = ic.resid2specCls.atoms2residues(Object.keys(currAtoms));
63080
63311
  for(let n = 0, nl = residueArray.length; n < nl; ++n) {
63081
63312
  let resid = residueArray[n];
@@ -63106,6 +63337,7 @@ class Dssp {
63106
63337
  for(let k = 0, kl = domainAtomsArray.length; k < kl; ++k) {
63107
63338
  let pdb_target = ic.saveFileCls.getAtomPDB(domainAtomsArray[k], undefined, undefined, undefined, undefined, struct);
63108
63339
  let domainid = chainid + '-' + k;
63340
+ ic.domainid2pdb[domainid] = pdb_target;
63109
63341
 
63110
63342
  for(let index = 0, indexl = dataArray.length; index < indexl; ++index) {
63111
63343
  let struct2 = ic.defaultPdbId + index;
@@ -63117,31 +63349,19 @@ class Dssp {
63117
63349
  let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
63118
63350
  ajaxArray.push(alignAjax);
63119
63351
 
63120
- domainidpairArray.push(domainid + "," + index);
63352
+ domainidpairArray.push(domainid + "," + ic.refpdbArray[index]);
63121
63353
  }
63122
63354
  }
63123
63355
  }
63124
- }
63356
+ }
63125
63357
 
63126
63358
  // try {
63127
63359
  let dataArray2 = [];
63128
- // if(!me.bNode) {
63129
- let allPromise = Promise.allSettled(ajaxArray);
63130
- dataArray2 = await allPromise;
63131
- // }
63132
- // else {
63133
- // for(let i = 0, il = ajaxArray.length; i < il; ++i) {
63134
- // try {
63135
- // let dataTmp = await ajaxArray[i];
63136
- // dataArray2.push({'value': dataTmp});
63137
- // }
63138
- // catch(err) {
63139
- // dataArray2.push({'value': []});
63140
- // }
63141
- // }
63142
- // }
63143
-
63144
- await thisClass.parseAlignData(dataArray2, domainidpairArray);
63360
+ let allPromise = Promise.allSettled(ajaxArray);
63361
+ dataArray2 = await allPromise;
63362
+
63363
+ let bRound1 = true;
63364
+ await thisClass.parseAlignData(dataArray2, domainidpairArray, bRound1);
63145
63365
 
63146
63366
  /// if(ic.deferredRefnum !== undefined) ic.deferredRefnum.resolve();
63147
63367
  // }
@@ -63152,7 +63372,7 @@ class Dssp {
63152
63372
  // }
63153
63373
  }
63154
63374
 
63155
- async parseAlignData(dataArray, domainidpairArray) { let ic = this.icn3d, me = ic.icn3dui;
63375
+ async parseAlignData(dataArray, domainidpairArray, bRound1) { let ic = this.icn3d, me = ic.icn3dui;
63156
63376
  let thisClass = this;
63157
63377
 
63158
63378
  let tmscoreThreshold = 0.4; //0.5;
@@ -63160,16 +63380,18 @@ class Dssp {
63160
63380
  // find the best alignment for each chain
63161
63381
  let domainid2score = {}, domainid2segs = {}, chainid2segs = {};
63162
63382
 
63163
- if(!ic.chainid2index) ic.chainid2index = {};
63164
- if(!ic.domainid2index) ic.domainid2index = {};
63383
+ if(!ic.chainid2refpdbname) ic.chainid2refpdbname = {};
63384
+ if(!ic.domainid2refpdbname) ic.domainid2refpdbname = {};
63165
63385
  if(!ic.domainid2ig2kabat) ic.domainid2ig2kabat = {};
63166
63386
  if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
63167
63387
 
63168
- // ic.chainid2index = {};
63169
- // ic.domainid2index = {};
63388
+ // ic.chainid2refpdbname = {};
63389
+ // ic.domainid2refpdbname = {};
63170
63390
  // ic.domainid2ig2kabat = {};
63171
63391
  // ic.domainid2ig2imgt = {};
63172
63392
 
63393
+ let minResidues = 20;
63394
+
63173
63395
  for(let i = 0, il = domainidpairArray.length; i < il; ++i) {
63174
63396
  let queryData = dataArray[i].value; //[0];
63175
63397
 
@@ -63179,12 +63401,14 @@ class Dssp {
63179
63401
  }
63180
63402
 
63181
63403
  if(queryData.length == 0) continue;
63404
+
63405
+ if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < minResidues) continue;
63182
63406
 
63183
- if(queryData[0].score < tmscoreThreshold || queryData[0].num_res < 50) continue;
63184
-
63185
- let domainid_index = domainidpairArray[i].split(',');
63186
- let domainid = domainid_index[0];
63187
- domainid.split('-')[0];
63407
+ //let domainid_index = domainidpairArray[i].split(',');
63408
+ //let domainid = domainid_index[0];
63409
+ let domainid = domainidpairArray[i].substr(0, domainidpairArray[i].indexOf(','));
63410
+ let refpdbname = domainidpairArray[i].substr(domainidpairArray[i].indexOf(',') + 1);
63411
+ //let chainid = domainid.split('-')[0];
63188
63412
 
63189
63413
  // Ig-like domains: B (2150, 2150a, 2150b), C (3150, 3250), E (7150, 7250), F (8150, 8250) strands
63190
63414
  // Ig domain may require G (7050). But we'll leave that out for now.
@@ -63213,22 +63437,76 @@ class Dssp {
63213
63437
  if(!(bBstrand && bCstrand && bEstrand && bFstrand)) continue;
63214
63438
 
63215
63439
  if(!domainid2score.hasOwnProperty(domainid) || queryData[0].score > domainid2score[domainid]) {
63216
- domainid2score[domainid] = queryData[0].score;
63217
- if(!me.bNode) console.log(domainid + ' TM-score: ' + domainid2score[domainid] + ' matched ' + ic.refpdbArray[domainid_index[1]]);
63440
+ domainid2score[domainid] = queryData[0].score;
63218
63441
 
63219
- //ic.chainid2index[chainid] = domainid_index[1]; // could be several, just take the recent one for simplicity
63220
- ic.domainid2index[domainid] = domainid_index[1];
63442
+ ic.domainid2refpdbname[domainid] = refpdbname;
63221
63443
  domainid2segs[domainid] = queryData[0].segs;
63222
63444
  ic.domainid2ig2kabat[domainid] = queryData[0].ig2kabat;
63223
63445
  ic.domainid2ig2imgt[domainid] = queryData[0].ig2imgt;
63224
63446
  }
63225
63447
  }
63226
63448
 
63449
+ if(bRound1) {
63450
+ if(!me.bNode) console.log("Start round 2 alignment with the reference culsters " + JSON.stringify(ic.domainid2refpdbname));
63451
+
63452
+ // start round2
63453
+ let ajaxArray = [];
63454
+ let domainidpairArray3 = [];
63455
+ let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
63456
+ for(let domainid in ic.domainid2refpdbname) {
63457
+ let pdbAjaxArray = [];
63458
+ let refpdbname = ic.domainid2refpdbname[domainid];
63459
+ let pdbid = domainid.substr(0, domainid.indexOf('_'));
63460
+
63461
+ if(ic.refpdbHash.hasOwnProperty(pdbid)) {
63462
+ // use itself as the ref structure
63463
+ refpdbname = pdbid;
63464
+
63465
+ if(!me.bNode) console.log("Adjusted refpdbname for domainid " + domainid + ": " + refpdbname);
63466
+ }
63467
+
63468
+ for(let k = 0, kl = ic.refpdbHash[refpdbname].length; k < kl; ++k) {
63469
+ let urlpdb = me.htmlCls.baseUrl + "mmcifparser/mmcifparser.cgi?refpdbid=" + ic.refpdbHash[refpdbname][k];
63470
+
63471
+ let pdbAjax = me.getAjaxPromise(urlpdb, 'text');
63472
+
63473
+ pdbAjaxArray.push(pdbAjax);
63474
+ }
63475
+
63476
+ let allPromise2 = Promise.allSettled(pdbAjaxArray);
63477
+ ic.pdbDataArray = await allPromise2;
63478
+
63479
+ let pdb_target = ic.domainid2pdb[domainid];
63480
+ for(let index = 0, indexl = ic.pdbDataArray.length; index < indexl; ++index) {
63481
+ let struct2 = ic.defaultPdbId + index;
63482
+ let pdb_query = ic.pdbDataArray[index].value; //[0];
63483
+ let header = 'HEADER ' + struct2 + '\n';
63484
+ pdb_query = header + pdb_query;
63485
+
63486
+ let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbHash[refpdbname][index]};
63487
+ let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
63488
+ ajaxArray.push(alignAjax);
63489
+
63490
+ //domainidpairArray3.push(domainid + "," + refpdbname);
63491
+ domainidpairArray3.push(domainid + "," + ic.refpdbHash[refpdbname][index]);
63492
+ }
63493
+ }
63494
+
63495
+ let dataArray3 = [];
63496
+ let allPromise = Promise.allSettled(ajaxArray);
63497
+ dataArray3 = await allPromise;
63498
+
63499
+ await thisClass.parseAlignData(dataArray3, domainidpairArray3);
63500
+
63501
+ // end of round 2
63502
+ return;
63503
+ }
63504
+
63227
63505
  // combine domainid into chainid
63228
- for(let domainid in ic.domainid2index) {
63506
+ for(let domainid in ic.domainid2refpdbname) {
63229
63507
  let chainid = domainid.split('-')[0];
63230
- if(!ic.chainid2index.hasOwnProperty(chainid)) ic.chainid2index[chainid] = [];
63231
- ic.chainid2index[chainid].push(ic.domainid2index[domainid]);
63508
+ if(!ic.chainid2refpdbname.hasOwnProperty(chainid)) ic.chainid2refpdbname[chainid] = [];
63509
+ ic.chainid2refpdbname[chainid].push(ic.domainid2refpdbname[domainid]);
63232
63510
  }
63233
63511
 
63234
63512
  // combine domainid into chainid
@@ -63244,16 +63522,15 @@ if(!me.bNode) console.log(domainid + ' TM-score: ' + domainid2score[domainid] +
63244
63522
  if(!ic.chainsMapping) ic.chainsMapping = {};
63245
63523
  for(let chainid in chainid2segs) {
63246
63524
  let segArray = chainid2segs[chainid];
63247
- if(!me.bNode) {
63248
- let chainList = '';
63249
- for(let i = 0, il = ic.chainid2index[chainid].length; i < il; ++i) {
63250
- chainList += ic.refpdbArray[ic.chainid2index[chainid][i]] + " ";
63251
- }
63252
- console.log("The reference PDB(s) for chain " + chainid + " are " + chainList);
63253
- }
63525
+
63526
+ let chainList = '';
63527
+ for(let i = 0, il = ic.chainid2refpdbname[chainid].length; i < il; ++i) {
63528
+ chainList += ic.chainid2refpdbname[chainid][i] + " ";
63529
+ }
63530
+ if(!me.bNode) console.log("The reference PDB(s) for chain " + chainid + " are " + chainList);
63254
63531
 
63255
63532
  let prevStrand;
63256
- let bCd19 = ic.chainid2index[chainid].length == 1 && ic.refpdbArray[ic.chainid2index[chainid][0]] == '6al5_cd19';
63533
+ let bCd19 = ic.chainid2refpdbname[chainid].length == 1 && ic.chainid2refpdbname[chainid][0] == 'CD19_6al5A_human_C2orV-n1';
63257
63534
  for(let i = 0, il = segArray.length; i < il; ++i) {
63258
63535
  let seg = segArray[i];
63259
63536
  let qStart = seg.q_start;
@@ -63423,6 +63700,10 @@ if(!me.bNode) {
63423
63700
  await ic.showAnnoCls.showAnnotations();
63424
63701
  ic.annotationCls.setAnnoViewAndDisplay('detailed view');
63425
63702
  }
63703
+
63704
+ rmStrandFromRefnumlabel(refnumLabel) {
63705
+ return refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
63706
+ }
63426
63707
  }
63427
63708
 
63428
63709
  /**
@@ -63448,18 +63729,35 @@ class Scap {
63448
63729
  }
63449
63730
  }
63450
63731
 
63451
- adjust2DWidth(id) { let ic = this.icn3d, me = ic.icn3dui;
63452
- let halfWidth = 125;
63732
+ adjust2DWidth(id) { let ic = this.icn3d; ic.icn3dui;
63453
63733
  id = ic.pre + id;
63454
-
63734
+ /*
63455
63735
  let height =($("#" + ic.pre + 'dl_selectannotations').hasClass("ui-dialog-content")) ? $("#" + ic.pre + 'dl_selectannotations').dialog( "option", "height") : me.htmlCls.HEIGHT;
63456
63736
  let width =($("#" + ic.pre + 'dl_selectannotations').hasClass("ui-dialog-content")) ? halfWidth * 2 : me.htmlCls.WIDTH * 0.5;
63457
63737
 
63458
63738
  $("#" + id).dialog( "option", "width", width );
63459
63739
  $("#" + id).dialog( "option", "height", height);
63460
- let position = { my: "left-" + halfWidth + " top+" + me.htmlCls.MENU_HEIGHT, at: "right top", of: "#" + ic.pre + "viewer", collision: "none" };
63740
+ let position = { my: "left-" + halfWidth + " top+" + me.htmlCls.MENU_HEIGHT, at: "right top", of: "#" + ic.pre + "viewer", collision: "none" }
63461
63741
 
63462
- $("#" + id).dialog( "option", "position", position );
63742
+ $("#" + id).dialog( "option", "position", position );
63743
+ */
63744
+
63745
+ let width, height, top;
63746
+
63747
+ if($("#" + ic.pre + 'dl_selectannotations').hasClass("ui-dialog-content")) {
63748
+ width = $("#" + ic.pre + 'dl_selectannotations').dialog( "option", "width");
63749
+ height = $("#" + ic.pre + 'dl_selectannotations').dialog( "option", "height") * 0.5;
63750
+ top = height;
63751
+
63752
+ $("#" + ic.pre + "dl_selectannotations").dialog( "option", "height", height);
63753
+
63754
+ $("#" + id).dialog( "option", "width", width );
63755
+ $("#" + id).dialog( "option", "height", height);
63756
+
63757
+ let position = { my: "left top", at: "right top+" + top, of: "#" + ic.pre + "viewer", collision: "none" };
63758
+
63759
+ $("#" + id).dialog( "option", "position", position );
63760
+ }
63463
63761
  }
63464
63762
 
63465
63763
  async retrieveScap(snp, bInteraction, bPdb) { let ic = this.icn3d, me = ic.icn3dui;