icn3d 3.30.0 → 3.30.1

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
@@ -38196,6 +38196,7 @@ class AnnoDomain {
38196
38196
 
38197
38197
  let result = ic.domain3dCls.c2b_NewSplitChain(atoms);
38198
38198
  let subdomains = result.subdomains;
38199
+ let pos2resi = result.pos2resi;
38199
38200
  //let substruct = result.substruct;
38200
38201
  //let jsonStr = ic.domain3dCls.getDomainJsonForAlign(atoms);
38201
38202
 
@@ -38210,6 +38211,8 @@ class AnnoDomain {
38210
38211
 
38211
38212
  data.domains[chainid].domains.push(domain);
38212
38213
  }
38214
+
38215
+ data.domains[chainid].pos2resi = pos2resi;
38213
38216
  }
38214
38217
  }
38215
38218
 
@@ -38246,7 +38249,7 @@ class AnnoDomain {
38246
38249
  let html = '<div id="' + ic.pre + chnid + '_domainseq_sequence" class="icn3d-dl_sequence">';
38247
38250
  let html2 = html;
38248
38251
  let html3 = html;
38249
- let domainArray, proteinname;
38252
+ let domainArray, pos2resi, proteinname;
38250
38253
  let pos = chnid.indexOf('_');
38251
38254
  let chain = chnid.substr(pos + 1);
38252
38255
  // MMDB symmetry chain has the form of 'A1'
@@ -38254,9 +38257,11 @@ class AnnoDomain {
38254
38257
  chain = chain.substr(0, chain.length - 1);
38255
38258
  }
38256
38259
 
38257
- if(bCalcDirect) {
38260
+ // if(bCalcDirect) {
38258
38261
  proteinname = chnid;
38259
38262
  domainArray = (data.domains[chnid]) ? data.domains[chnid].domains : [];
38263
+ pos2resi = data.domains[chnid].pos2resi;
38264
+ /*
38260
38265
  }
38261
38266
  else {
38262
38267
  let molinfo = data.moleculeInfor;
@@ -38275,6 +38280,7 @@ class AnnoDomain {
38275
38280
  domainArray = [];
38276
38281
  }
38277
38282
  }
38283
+ */
38278
38284
 
38279
38285
  for(let index = 0, indexl = domainArray.length; index < indexl; ++index) {
38280
38286
  //var fulltitle = '3D domain ' +(index+1).toString() + ' of ' + proteinname + '(PDB ID: ' + data.pdbId + ')';
@@ -38288,8 +38294,11 @@ class AnnoDomain {
38288
38294
  let resCnt = 0;
38289
38295
 
38290
38296
  for(let i = 0, il = subdomainArray.length; i < il; ++i) {
38291
- let domainFrom = Math.round(subdomainArray[i][0]) - 1; // convert 1-based to 0-based
38292
- let domainTo = Math.round(subdomainArray[i][1]) - 1;
38297
+ // let domainFrom = Math.round(subdomainArray[i][0]) - 1; // convert 1-based to 0-based
38298
+ // let domainTo = Math.round(subdomainArray[i][1]) - 1;
38299
+ let domainFrom = Math.round(subdomainArray[i][0]); // convert 1-based to 0-based
38300
+ let domainTo = Math.round(subdomainArray[i][1]);
38301
+
38293
38302
  if(domainFromHash.hasOwnProperty(domainFrom) || domainToHash.hasOwnProperty(domainTo)) {
38294
38303
  continue; // do nothing for duplicated "from" or "to", e.g, PDBID 1ITW, 5FWI
38295
38304
  }
@@ -38300,8 +38309,8 @@ class AnnoDomain {
38300
38309
 
38301
38310
  // use the NCBI residue number, and convert to PDB residue number during selection
38302
38311
  // if(ic.bNCBI || bCalcDirect) {
38303
- fromArray.push(domainFrom);
38304
- toArray.push(domainTo);
38312
+ fromArray.push(pos2resi[domainFrom]);
38313
+ toArray.push(pos2resi[domainTo]);
38305
38314
  // }
38306
38315
  // else {
38307
38316
  // fromArray.push(domainFrom + ic.baseResi[chnid]);
@@ -38310,7 +38319,9 @@ class AnnoDomain {
38310
38319
 
38311
38320
  resCnt += domainTo - domainFrom + 1;
38312
38321
  for(let j = domainFrom; j <= domainTo; ++j) {
38313
- resiHash[j+1] = 1;
38322
+ // resiHash[j+1] = 1;
38323
+ let resi = pos2resi[j];
38324
+ resiHash[resi] = 1;
38314
38325
  }
38315
38326
  }
38316
38327
 
@@ -38326,7 +38337,8 @@ class AnnoDomain {
38326
38337
  for(let j = from; j <= to; ++j) {
38327
38338
  // 0-based
38328
38339
  let obj = {};
38329
- let resi = ic.ParserUtilsCls.getResi(chnid, j);
38340
+ // let resi = ic.ParserUtilsCls.getResi(chnid, j);
38341
+ let resi = pos2resi[j];
38330
38342
  obj[chnid + '_' + resi] = domainName;
38331
38343
  ic.resid2domain[chnid].push(obj);
38332
38344
  }
@@ -38347,7 +38359,8 @@ class AnnoDomain {
38347
38359
  html += ic.showSeqCls.insertGap(chnid, i, '-');
38348
38360
  //if(i >= domainFrom && i <= domainTo) {
38349
38361
  let resi = ic.ParserUtilsCls.getResi(chnid, i);
38350
- if(resiHash.hasOwnProperty(i+1)) {
38362
+ // if(resiHash.hasOwnProperty(i+1)) {
38363
+ if(resiHash.hasOwnProperty(resi)) {
38351
38364
  let cFull = ic.giSeq[chnid][i];
38352
38365
  let c = cFull;
38353
38366
  if(cFull.length > 1) {
@@ -39992,7 +40005,7 @@ class Domain3d {
39992
40005
  // get a list of Calpha-Calpha contacts
39993
40006
  ///list< pair< pair< int, let >, let > >
39994
40007
  let cts = this.c2b_AlphaContacts(seqLen, x0, y0, z0, dcut, resiArray);
39995
-
40008
+
39996
40009
  //
39997
40010
  // Produce a "map" of the SSEs, i.e. vec_sse[i] = 0 means residue i + 1
39998
40011
  // is in a loop, and vec_sse[i] = k means residue i + 1 belongs to SSE