icn3d 3.28.0 → 3.28.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
@@ -40790,7 +40790,7 @@ class AddTrack {
40790
40790
 
40791
40791
  async showMsaTracks(chainid, seqFirst, trackTitleArray, trackSeqArray, startpos, type, acc2exons) { let ic = this.icn3d; ic.icn3dui;
40792
40792
  //ic.startposGiSeq = undefined;
40793
- for(let i = 0, il = ic.giSeq[chainid].length; i < il; ++i) {
40793
+ for(let i = 0, il = ic.chainsSeq[chainid].length; i < il; ++i) {
40794
40794
  //let pos =(i >= ic.matchedPos[chainid] && i - ic.matchedPos[chainid] < ic.chainsSeq, [chainid].length) ? ic.chainsSeq[chainid][i - ic.matchedPos[chainid]].resi : ic.baseResi[chainid] + 1 + i;
40795
40795
  let pos = ic.ParserUtilsCls.getResi(chainid, i);
40796
40796
 
@@ -40994,6 +40994,8 @@ class AddTrack {
40994
40994
  }
40995
40995
 
40996
40996
  async addExonTracks(chainid, geneid, startpos, type) { let ic = this.icn3d, me = ic.icn3dui;
40997
+ let thisClass = this;
40998
+
40997
40999
  let seqFirst, trackTitleArray = [], trackSeqArray = [];
40998
41000
 
40999
41001
  // get acclist from geneid
@@ -41102,12 +41104,14 @@ class AddTrack {
41102
41104
  ++j;
41103
41105
  }
41104
41106
 
41105
- await this.showMsaTracks(chainid, seqFirst, trackTitleArray, trackSeqArray, startpos, type, acc2exons);
41107
+ await thisClass.showMsaTracks(chainid, seqFirst, trackTitleArray, trackSeqArray, startpos, type, acc2exons);
41106
41108
 
41107
41109
  me.htmlCls.clickMenuCls.setLogCmd("add exon track | chainid " + chainid + " | geneid " + geneid + " | startpos " + startpos + " | type " + type, true);
41108
41110
  }
41109
41111
 
41110
41112
  async addMsaTracks(chainid, startpos, type, fastaList) { let ic = this.icn3d, me = ic.icn3dui;
41113
+ let thisClass = this;
41114
+
41111
41115
  let seqFirst, trackTitleArray = [], trackSeqArray = [];
41112
41116
 
41113
41117
  let fastaArray = fastaList.split('>');
@@ -41132,8 +41136,8 @@ class AddTrack {
41132
41136
  trackSeqArray.push(seq);
41133
41137
  }
41134
41138
 
41135
- await this.showMsaTracks(chainid, seqFirst, trackTitleArray, trackSeqArray, startpos, type);
41136
-
41139
+ await thisClass.showMsaTracks(chainid, seqFirst, trackTitleArray, trackSeqArray, startpos, type);
41140
+
41137
41141
  me.htmlCls.clickMenuCls.setLogCmd("add msa track | chainid " + chainid + " | startpos " + startpos + " | type " + type + " | fastaList " + fastaList , true);
41138
41142
  }
41139
41143
  }
@@ -41982,8 +41986,8 @@ class ShowAnno {
41982
41986
  // get Gene info from uniprot
41983
41987
  url = "https://rest.uniprot.org/uniprotkb/search?format=json&fields=xref_geneid,gene_names&query=" + structure;
41984
41988
  let geneData = await me.getAjaxPromise(url, 'json');
41985
- let geneId = (geneData.results[0] && geneData.results[0].uniProtKBCrossReferences[0]) ? geneData.results[0].uniProtKBCrossReferences[0].id : undefined;
41986
- let geneSymbol = (geneData.results[0] && geneData.results[0].genes[0] && geneData.results[0].genes[0].geneName) ? geneData.results[0].genes[0].geneName.value : undefined;
41989
+ let geneId = (geneData.results[0] && geneData.results[0].uniProtKBCrossReferences && geneData.results[0].uniProtKBCrossReferences[0]) ? geneData.results[0].uniProtKBCrossReferences[0].id : undefined;
41990
+ let geneSymbol = (geneData.results[0] && geneData.results[0].genes && geneData.results[0].genes[0] && geneData.results[0].genes[0].geneName) ? geneData.results[0].genes[0].geneName.value : undefined;
41987
41991
  ic.chainsGene[chnid] = {geneId: geneId, geneSymbol: geneSymbol};
41988
41992
  }
41989
41993
  }