icn3d 3.25.7 → 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 +46 -30
- package/icn3d.min.js +2 -2
- package/icn3d.module.js +46 -30
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -38626,12 +38626,12 @@ class Domain3d {
|
|
|
38626
38626
|
|
|
38627
38627
|
if (nsse <= 3)
|
|
38628
38628
|
// too small, can't split or trim
|
|
38629
|
-
return {subdomains: subdomains, substruct: substruct};
|
|
38629
|
+
return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi};
|
|
38630
38630
|
|
|
38631
38631
|
if (nsse > this.MAX_SSE) {
|
|
38632
38632
|
// we have a problem...
|
|
38633
38633
|
|
|
38634
|
-
return {subdomains: subdomains, substruct: substruct};
|
|
38634
|
+
return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi};
|
|
38635
38635
|
}
|
|
38636
38636
|
|
|
38637
38637
|
let seqLen = residueArray.length; // + resiOffset;
|
|
@@ -38903,7 +38903,7 @@ class Domain3d {
|
|
|
38903
38903
|
let k = prts[i] - 1;
|
|
38904
38904
|
|
|
38905
38905
|
if ((k < 0) || (k >= substruct.length)) {
|
|
38906
|
-
return {subdomains: subdomains, substruct: substruct};
|
|
38906
|
+
return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi};
|
|
38907
38907
|
}
|
|
38908
38908
|
|
|
38909
38909
|
//SSE_Rec sserec = substruct[k];
|
|
@@ -39020,7 +39020,7 @@ class Domain3d {
|
|
|
39020
39020
|
}
|
|
39021
39021
|
}
|
|
39022
39022
|
|
|
39023
|
-
return {subdomains: subdomains, substruct: substruct, pos2resi:pos2resi };
|
|
39023
|
+
return {subdomains: subdomains, substruct: substruct, pos2resi: pos2resi };
|
|
39024
39024
|
} // end c2b_NewSplitChain
|
|
39025
39025
|
|
|
39026
39026
|
getDomainJsonForAlign(atoms) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -42024,18 +42024,18 @@ class ShowSeq {
|
|
|
42024
42024
|
for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
|
|
42025
42025
|
if(strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
|
|
42026
42026
|
if(i != il - 1) { // modify
|
|
42027
|
-
strandArray[i + 1].loopResCnt += strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
|
|
42027
|
+
strandArray[i + 1].loopResCnt += strandArray[i].loopResCnt + strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
|
|
42028
42028
|
}
|
|
42029
42029
|
|
|
42030
42030
|
strandArray.splice(i, 1);
|
|
42031
42031
|
}
|
|
42032
42032
|
}
|
|
42033
|
-
|
|
42033
|
+
|
|
42034
42034
|
// 3. assign refnumLabel for each resid
|
|
42035
42035
|
strandCnt = 0;
|
|
42036
42036
|
let loopCnt = 0;
|
|
42037
42037
|
|
|
42038
|
-
let
|
|
42038
|
+
let bBeforeAstrand = true, bAfterGstrand = true, refnumLabelNoPostfix, prevStrandCnt = 0, currRefnum;
|
|
42039
42039
|
bStart = false;
|
|
42040
42040
|
let refnumInStrand = 0;
|
|
42041
42041
|
if(strandArray.length > 0) {
|
|
@@ -42054,7 +42054,7 @@ class ShowSeq {
|
|
|
42054
42054
|
let firstChar = refnumLabel.substr(0,1);
|
|
42055
42055
|
if(!bStart && (firstChar == ' ' || firstChar == 'A' || firstChar == 'B')) { // start of a new IG domain
|
|
42056
42056
|
bStart = true;
|
|
42057
|
-
|
|
42057
|
+
bBeforeAstrand = true;
|
|
42058
42058
|
loopCnt = 0;
|
|
42059
42059
|
}
|
|
42060
42060
|
}
|
|
@@ -42069,29 +42069,48 @@ class ShowSeq {
|
|
|
42069
42069
|
if(parseInt(currResi) < parseInt(strandArray[strandCnt].startResi)) {
|
|
42070
42070
|
ic.residIgLoop[residueid] = 1;
|
|
42071
42071
|
|
|
42072
|
-
if(
|
|
42072
|
+
if(bBeforeAstrand) { // make it continuous to the 1st strand
|
|
42073
42073
|
if(bStart) {
|
|
42074
42074
|
currRefnum = strandArray[strandCnt].startRefnum - strandArray[strandCnt].loopResCnt + loopCnt;
|
|
42075
42075
|
refnumLabelNoPostfix = strandArray[strandCnt].strand + currRefnum;
|
|
42076
42076
|
refnumLabel = refnumLabelNoPostfix + strandArray[strandCnt].strandPostfix;
|
|
42077
|
-
}
|
|
42077
|
+
}
|
|
42078
|
+
else {
|
|
42079
|
+
//loopCnt = 0;
|
|
42080
|
+
refnumLabelNoPostfix = undefined;
|
|
42081
|
+
refnumLabel = undefined;
|
|
42082
|
+
}
|
|
42078
42083
|
}
|
|
42079
42084
|
else {
|
|
42080
|
-
//currStrand = strandArray[prevStrandCnt].strand;
|
|
42081
|
-
|
|
42082
42085
|
if(prevStrandCnt >= 0 && strandArray[prevStrandCnt].strand.substr(0, 1) == 'G') {
|
|
42083
|
-
if(
|
|
42084
|
-
|
|
42085
|
-
refnumLabelNoPostfix =
|
|
42086
|
-
refnumLabel =
|
|
42086
|
+
if(!bAfterGstrand) {
|
|
42087
|
+
//loopCnt = 0;
|
|
42088
|
+
refnumLabelNoPostfix = undefined;
|
|
42089
|
+
refnumLabel = undefined;
|
|
42087
42090
|
}
|
|
42088
42091
|
else {
|
|
42089
|
-
bStart
|
|
42090
|
-
|
|
42091
|
-
|
|
42092
|
+
if(bStart && ic.resid2refnum[residueid]) {
|
|
42093
|
+
bAfterGstrand = true;
|
|
42094
|
+
|
|
42095
|
+
currRefnum = strandArray[prevStrandCnt].endRefnum + loopCnt;
|
|
42096
|
+
refnumLabelNoPostfix = strandArray[prevStrandCnt].strand + currRefnum;
|
|
42097
|
+
refnumLabel = refnumLabelNoPostfix + strandArray[prevStrandCnt].strandPostfix;
|
|
42098
|
+
}
|
|
42099
|
+
else {
|
|
42100
|
+
bStart = false;
|
|
42101
|
+
bBeforeAstrand = true;
|
|
42102
|
+
//loopCnt = 0;
|
|
42103
|
+
|
|
42104
|
+
bAfterGstrand = false;
|
|
42105
|
+
|
|
42106
|
+
refnumLabelNoPostfix = undefined;
|
|
42107
|
+
refnumLabel = undefined;
|
|
42108
|
+
}
|
|
42092
42109
|
}
|
|
42093
42110
|
}
|
|
42094
42111
|
else {
|
|
42112
|
+
bAfterGstrand = true; // reset
|
|
42113
|
+
|
|
42095
42114
|
let len = strandArray[strandCnt].loopResCnt;
|
|
42096
42115
|
let halfLen = parseInt(len / 2.0 + 0.5);
|
|
42097
42116
|
|
|
@@ -42109,8 +42128,7 @@ class ShowSeq {
|
|
|
42109
42128
|
}
|
|
42110
42129
|
}
|
|
42111
42130
|
else if(parseInt(currResi) >= parseInt(strandArray[strandCnt].startResi) && parseInt(currResi) <= parseInt(strandArray[strandCnt].endResi)) {
|
|
42112
|
-
|
|
42113
|
-
//bCterminal = true; // The next will be C-terminal
|
|
42131
|
+
bBeforeAstrand = false;
|
|
42114
42132
|
|
|
42115
42133
|
if(strandArray[strandCnt].anchorRefnum) { // use anchor to name refnum
|
|
42116
42134
|
if(currResi == strandArray[strandCnt].startResi) {
|
|
@@ -42137,23 +42155,20 @@ class ShowSeq {
|
|
|
42137
42155
|
else if(parseInt(currResi) > parseInt(strandArray[strandCnt].endResi)) {
|
|
42138
42156
|
ic.residIgLoop[residueid] = 1;
|
|
42139
42157
|
|
|
42140
|
-
if(!
|
|
42158
|
+
if(!bAfterGstrand) {
|
|
42141
42159
|
refnumLabelNoPostfix = undefined;
|
|
42142
42160
|
refnumLabel = undefined;
|
|
42143
42161
|
}
|
|
42144
42162
|
else {
|
|
42145
42163
|
// C-terminal
|
|
42146
42164
|
if(!ic.resid2refnum[residueid]) {
|
|
42147
|
-
|
|
42148
|
-
|
|
42149
|
-
bCterminal = false;
|
|
42150
|
-
//bNterminal = true; // The next will be N-terminal
|
|
42165
|
+
bAfterGstrand = false;
|
|
42151
42166
|
|
|
42152
42167
|
refnumLabelNoPostfix = undefined;
|
|
42153
42168
|
refnumLabel = undefined;
|
|
42154
42169
|
}
|
|
42155
42170
|
else {
|
|
42156
|
-
|
|
42171
|
+
bAfterGstrand = true;
|
|
42157
42172
|
|
|
42158
42173
|
currRefnum = strandArray[strandCnt].endRefnum + loopCnt;
|
|
42159
42174
|
refnumLabelNoPostfix = strandArray[strandCnt].strand + currRefnum;
|
|
@@ -42289,7 +42304,8 @@ class ShowSeq {
|
|
|
42289
42304
|
let color = this.getRefnumColor(currStrand, true);
|
|
42290
42305
|
let colorStr = (!bLoop) ? 'style="color:' + color + '; text-decoration: underline overline;"' : 'style="color:' + color + '"';
|
|
42291
42306
|
|
|
42292
|
-
let
|
|
42307
|
+
let lastTwoStr = refnum.substr(refnum.length - 2, 2);
|
|
42308
|
+
let lastTwo = parseInt(lastTwoStr);
|
|
42293
42309
|
parseInt(refnum.substr(refnum.length - 3, 3));
|
|
42294
42310
|
|
|
42295
42311
|
let html = '';
|
|
@@ -42302,7 +42318,7 @@ class ShowSeq {
|
|
|
42302
42318
|
}
|
|
42303
42319
|
else if(refnumLabel && lastTwo % 2 == 0 && lastTwo != 52 && !bHidelabel) { // don't show label for the first, middle, and last loop residues
|
|
42304
42320
|
// e.g., 2152a
|
|
42305
|
-
|
|
42321
|
+
lastTwoStr = isNaN(refnumStr) ? lastTwoStr + refnumStr.substr(refnumStr.length - 1, 1) : lastTwoStr;
|
|
42306
42322
|
html += '<span ' + colorStr + ' title="' + refnumLabel + '">' + lastTwoStr + '</span>';
|
|
42307
42323
|
}
|
|
42308
42324
|
else {
|
|
@@ -70457,7 +70473,7 @@ class iCn3DUI {
|
|
|
70457
70473
|
//even when multiple iCn3D viewers are shown together.
|
|
70458
70474
|
this.pre = this.cfg.divid + "_";
|
|
70459
70475
|
|
|
70460
|
-
this.REVISION = '3.25.
|
|
70476
|
+
this.REVISION = '3.25.1';
|
|
70461
70477
|
|
|
70462
70478
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
70463
70479
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|