icn3d 3.25.14 → 3.25.15

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
@@ -52223,13 +52223,15 @@ class ParserUtils {
52223
52223
  let allPromise = Promise.allSettled([prms1, prms2]);
52224
52224
  let dataArray = await allPromise;
52225
52225
 
52226
- ic.interactionData1 = (me.bNode) ? dataArray[0] : dataArray[0].value;
52226
+ // ic.interactionData1 = (me.bNode) ? dataArray[0] : dataArray[0].value;
52227
+ ic.interactionData1 = dataArray[0].value;
52227
52228
  ic.html2ddgm = '';
52228
52229
  ic.diagram2dCls.draw2Ddgm(ic.interactionData1, mmdbid1, 0);
52229
52230
  if(me.cfg.show2d) me.htmlCls.dialogCls.openDlg('dl_2ddgm', 'Interactions');
52230
52231
 
52231
52232
 
52232
- ic.interactionData2 = (me.bNode) ? dataArray[1] : dataArray[1].value;
52233
+ // ic.interactionData2 = (me.bNode) ? dataArray[1] : dataArray[1].value;
52234
+ ic.interactionData2 = dataArray[1].value;
52233
52235
  ic.diagram2dCls.draw2Ddgm(ic.interactionData2, mmdbid2, 1);
52234
52236
 
52235
52237
  ic.html2ddgm += "<br>" + ic.diagram2dCls.set2DdgmNote(true);
@@ -52277,7 +52279,8 @@ class ParserUtils {
52277
52279
  // Each argument is an array with the following structure: [ data, statusText, jqXHR ]
52278
52280
  //var data2 = v2[0];
52279
52281
  for(let index = 0, indexl = chainidArray.length; index < indexl; ++index) {
52280
- let data = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
52282
+ // let data = (me.bNode) ? dataArray[index] : dataArray[index].value;//[0];
52283
+ let data = dataArray[index].value;//[0];
52281
52284
  let mmdbid = chainidArray[index].substr(0, chainidArray[index].indexOf('_'));
52282
52285
 
52283
52286
  ic.diagram2dCls.draw2Ddgm(data, mmdbid, 0);
@@ -55969,7 +55972,8 @@ class Vastplus {
55969
55972
 
55970
55973
  let queryDataArray = [];
55971
55974
  for(let index = 0, indexl = chainidpairArray.length; index < indexl; ++index) {
55972
- let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value; //[0];
55975
+ // let queryData = (me.bNode) ? dataArray[index] : dataArray[index].value; //[0];
55976
+ let queryData = dataArray[index].value; //[0];
55973
55977
 
55974
55978
  queryDataArray.push(queryData);
55975
55979
  /*
@@ -71253,25 +71257,35 @@ iCn3DUI.prototype.show3DStructure = async function(pdbStr) { let me = this;
71253
71257
  let data = await me.getAjaxPromise(url, 'json', false, 'The RID ' + me.cfg.rid + ' may have expired...');
71254
71258
 
71255
71259
  for(let q = 0, ql = data.BlastOutput2.length; q < ql; ++q) {
71256
- if(data.BlastOutput2[q].report.results.search.query_id != me.cfg.query_id) continue;
71257
- let hitArray = data.BlastOutput2[q].report.results.search.hits;
71260
+
71261
+ let hitArray;
71262
+ if(data.BlastOutput2[q].report.results.iterations) { // psi-blast may have "iterations". Use the last iteration.
71263
+ let nIterations = data.BlastOutput2[q].report.results.iterations.length;
71264
+ if(data.BlastOutput2[q].report.results.iterations[nIterations - 1].search.query_id != me.cfg.query_id) continue;
71265
+ hitArray = data.BlastOutput2[q].report.results.iterations[nIterations - 1].search.hits;
71266
+ }
71267
+ else { // blastp may not have "iterations"
71268
+ if(data.BlastOutput2[q].report.results.search.query_id != me.cfg.query_id) continue;
71269
+ hitArray = data.BlastOutput2[q].report.results.search.hits;
71270
+ }
71271
+
71258
71272
  let qseq = undefined;
71259
71273
  for(let i = 0, il = hitArray.length; i < il; ++i) {
71260
- let hit = hitArray[i];
71261
- let bFound = false;
71262
- for(let j = 0, jl = hit.description.length; j < jl; ++j) {
71263
- let acc = hit.description[j].accession;
71264
- if(acc == me.cfg.blast_rep_id) {
71265
- bFound = true;
71266
- break;
71274
+ let hit = hitArray[i];
71275
+ let bFound = false;
71276
+ for(let j = 0, jl = hit.description.length; j < jl; ++j) {
71277
+ let acc = hit.description[j].accession;
71278
+ if(acc == me.cfg.blast_rep_id) {
71279
+ bFound = true;
71280
+ break;
71281
+ }
71282
+ }
71283
+ if(bFound) {
71284
+ qseq = hit.hsps[0].qseq;
71285
+ //remove gap '-'
71286
+ qseq = qseq.replace(/-/g, '');
71287
+ break;
71267
71288
  }
71268
- }
71269
- if(bFound) {
71270
- qseq = hit.hsps[0].qseq;
71271
- //remove gap '-'
71272
- qseq = qseq.replace(/-/g, '');
71273
- break;
71274
- }
71275
71289
  }
71276
71290
  if(qseq !== undefined) me.cfg.query_id = qseq;
71277
71291
  ic.inputid = me.cfg.query_id + '_' + me.cfg.blast_rep_id;