icn3d 3.25.8 → 3.25.9
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 +41 -25
- package/icn3d.min.js +1 -1
- package/icn3d.module.js +41 -25
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -42925,18 +42925,18 @@ class ShowSeq {
|
|
|
42925
42925
|
for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
|
|
42926
42926
|
if(strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
|
|
42927
42927
|
if(i != il - 1) { // modify
|
|
42928
|
-
strandArray[i + 1].loopResCnt += strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
|
|
42928
|
+
strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
|
|
42929
42929
|
}
|
|
42930
42930
|
|
|
42931
42931
|
strandArray.splice(i, 1);
|
|
42932
42932
|
}
|
|
42933
42933
|
}
|
|
42934
|
-
|
|
42934
|
+
|
|
42935
42935
|
// 3. assign refnumLabel for each resid
|
|
42936
42936
|
strandCnt = 0;
|
|
42937
42937
|
let loopCnt = 0;
|
|
42938
42938
|
|
|
42939
|
-
let
|
|
42939
|
+
let bBeforeAstrand = true, bAfterGstrand = true, refnumLabelNoPostfix, prevStrandCnt = 0, currRefnum;
|
|
42940
42940
|
bStart = false;
|
|
42941
42941
|
let refnumInStrand = 0;
|
|
42942
42942
|
if(strandArray.length > 0) {
|
|
@@ -42955,7 +42955,7 @@ class ShowSeq {
|
|
|
42955
42955
|
let firstChar = refnumLabel.substr(0,1);
|
|
42956
42956
|
if(!bStart && (firstChar == ' ' || firstChar == 'A' || firstChar == 'B')) { // start of a new IG domain
|
|
42957
42957
|
bStart = true;
|
|
42958
|
-
|
|
42958
|
+
bBeforeAstrand = true;
|
|
42959
42959
|
loopCnt = 0;
|
|
42960
42960
|
}
|
|
42961
42961
|
}
|
|
@@ -42970,29 +42970,48 @@ class ShowSeq {
|
|
|
42970
42970
|
if(parseInt(currResi) < parseInt(strandArray[strandCnt].startResi)) {
|
|
42971
42971
|
ic.residIgLoop[residueid] = 1;
|
|
42972
42972
|
|
|
42973
|
-
if(
|
|
42973
|
+
if(bBeforeAstrand) { // make it continuous to the 1st strand
|
|
42974
42974
|
if(bStart) {
|
|
42975
42975
|
currRefnum = strandArray[strandCnt].startRefnum - strandArray[strandCnt].loopResCnt + loopCnt;
|
|
42976
42976
|
refnumLabelNoPostfix = strandArray[strandCnt].strand + currRefnum;
|
|
42977
42977
|
refnumLabel = refnumLabelNoPostfix + strandArray[strandCnt].strandPostfix;
|
|
42978
|
-
}
|
|
42978
|
+
}
|
|
42979
|
+
else {
|
|
42980
|
+
//loopCnt = 0;
|
|
42981
|
+
refnumLabelNoPostfix = undefined;
|
|
42982
|
+
refnumLabel = undefined;
|
|
42983
|
+
}
|
|
42979
42984
|
}
|
|
42980
42985
|
else {
|
|
42981
|
-
//currStrand = strandArray[prevStrandCnt].strand;
|
|
42982
|
-
|
|
42983
42986
|
if(prevStrandCnt >= 0 && strandArray[prevStrandCnt].strand.substr(0, 1) == 'G') {
|
|
42984
|
-
if(
|
|
42985
|
-
|
|
42986
|
-
refnumLabelNoPostfix =
|
|
42987
|
-
refnumLabel =
|
|
42987
|
+
if(!bAfterGstrand) {
|
|
42988
|
+
//loopCnt = 0;
|
|
42989
|
+
refnumLabelNoPostfix = undefined;
|
|
42990
|
+
refnumLabel = undefined;
|
|
42988
42991
|
}
|
|
42989
42992
|
else {
|
|
42990
|
-
bStart
|
|
42991
|
-
|
|
42992
|
-
|
|
42993
|
+
if(bStart && ic.resid2refnum[residueid]) {
|
|
42994
|
+
bAfterGstrand = true;
|
|
42995
|
+
|
|
42996
|
+
currRefnum = strandArray[prevStrandCnt].endRefnum + loopCnt;
|
|
42997
|
+
refnumLabelNoPostfix = strandArray[prevStrandCnt].strand + currRefnum;
|
|
42998
|
+
refnumLabel = refnumLabelNoPostfix + strandArray[prevStrandCnt].strandPostfix;
|
|
42999
|
+
}
|
|
43000
|
+
else {
|
|
43001
|
+
bStart = false;
|
|
43002
|
+
bBeforeAstrand = true;
|
|
43003
|
+
//loopCnt = 0;
|
|
43004
|
+
|
|
43005
|
+
bAfterGstrand = false;
|
|
43006
|
+
|
|
43007
|
+
refnumLabelNoPostfix = undefined;
|
|
43008
|
+
refnumLabel = undefined;
|
|
43009
|
+
}
|
|
42993
43010
|
}
|
|
42994
43011
|
}
|
|
42995
43012
|
else {
|
|
43013
|
+
bAfterGstrand = true; // reset
|
|
43014
|
+
|
|
42996
43015
|
let len = strandArray[strandCnt].loopResCnt;
|
|
42997
43016
|
let halfLen = parseInt(len / 2.0 + 0.5);
|
|
42998
43017
|
|
|
@@ -43010,8 +43029,7 @@ class ShowSeq {
|
|
|
43010
43029
|
}
|
|
43011
43030
|
}
|
|
43012
43031
|
else if(parseInt(currResi) >= parseInt(strandArray[strandCnt].startResi) && parseInt(currResi) <= parseInt(strandArray[strandCnt].endResi)) {
|
|
43013
|
-
|
|
43014
|
-
//bCterminal = true; // The next will be C-terminal
|
|
43032
|
+
bBeforeAstrand = false;
|
|
43015
43033
|
|
|
43016
43034
|
if(strandArray[strandCnt].anchorRefnum) { // use anchor to name refnum
|
|
43017
43035
|
if(currResi == strandArray[strandCnt].startResi) {
|
|
@@ -43038,23 +43056,20 @@ class ShowSeq {
|
|
|
43038
43056
|
else if(parseInt(currResi) > parseInt(strandArray[strandCnt].endResi)) {
|
|
43039
43057
|
ic.residIgLoop[residueid] = 1;
|
|
43040
43058
|
|
|
43041
|
-
if(!
|
|
43059
|
+
if(!bAfterGstrand) {
|
|
43042
43060
|
refnumLabelNoPostfix = undefined;
|
|
43043
43061
|
refnumLabel = undefined;
|
|
43044
43062
|
}
|
|
43045
43063
|
else {
|
|
43046
43064
|
// C-terminal
|
|
43047
43065
|
if(!ic.resid2refnum[residueid]) {
|
|
43048
|
-
|
|
43049
|
-
|
|
43050
|
-
bCterminal = false;
|
|
43051
|
-
//bNterminal = true; // The next will be N-terminal
|
|
43066
|
+
bAfterGstrand = false;
|
|
43052
43067
|
|
|
43053
43068
|
refnumLabelNoPostfix = undefined;
|
|
43054
43069
|
refnumLabel = undefined;
|
|
43055
43070
|
}
|
|
43056
43071
|
else {
|
|
43057
|
-
|
|
43072
|
+
bAfterGstrand = true;
|
|
43058
43073
|
|
|
43059
43074
|
currRefnum = strandArray[strandCnt].endRefnum + loopCnt;
|
|
43060
43075
|
refnumLabelNoPostfix = strandArray[strandCnt].strand + currRefnum;
|
|
@@ -43190,7 +43205,8 @@ class ShowSeq {
|
|
|
43190
43205
|
let color = this.getRefnumColor(currStrand, true);
|
|
43191
43206
|
let colorStr = (!bLoop) ? 'style="color:' + color + '; text-decoration: underline overline;"' : 'style="color:' + color + '"';
|
|
43192
43207
|
|
|
43193
|
-
let
|
|
43208
|
+
let lastTwoStr = refnum.substr(refnum.length - 2, 2);
|
|
43209
|
+
let lastTwo = parseInt(lastTwoStr);
|
|
43194
43210
|
parseInt(refnum.substr(refnum.length - 3, 3));
|
|
43195
43211
|
|
|
43196
43212
|
let html = '';
|
|
@@ -43203,7 +43219,7 @@ class ShowSeq {
|
|
|
43203
43219
|
}
|
|
43204
43220
|
else if(refnumLabel && lastTwo % 2 == 0 && lastTwo != 52 && !bHidelabel) { // don't show label for the first, middle, and last loop residues
|
|
43205
43221
|
// e.g., 2152a
|
|
43206
|
-
|
|
43222
|
+
lastTwoStr = isNaN(refnumStr) ? lastTwoStr + refnumStr.substr(refnumStr.length - 1, 1) : lastTwoStr;
|
|
43207
43223
|
html += '<span ' + colorStr + ' title="' + refnumLabel + '">' + lastTwoStr + '</span>';
|
|
43208
43224
|
}
|
|
43209
43225
|
else {
|