icn3d 3.25.5 → 3.25.7
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 +48 -15
- package/icn3d.min.js +2 -2
- package/icn3d.module.js +48 -15
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -41923,9 +41923,9 @@ class ShowSeq {
|
|
|
41923
41923
|
let index = 1, bStart = false;
|
|
41924
41924
|
|
|
41925
41925
|
// 1. get the range of each strand excluding loops
|
|
41926
|
-
let strandArray = [], strandHash = {}, strandCnt = 0, resCnt = 0, resCntBfAnchor = 0;
|
|
41926
|
+
let strandArray = [], strandHash = {}, strandCnt = 0, resCnt = 0, resCntBfAnchor = 0, resCntAtAnchor = 0;
|
|
41927
41927
|
if(!bCustom && !kabat_or_imgt) {
|
|
41928
|
-
for(let i = 0, il = giSeq.length; i < il; ++i, ++resCnt, ++resCntBfAnchor) {
|
|
41928
|
+
for(let i = 0, il = giSeq.length; i < il; ++i, ++resCnt, ++resCntBfAnchor, ++resCntAtAnchor) {
|
|
41929
41929
|
let currResi = ic.ParserUtilsCls.getResi(chnid, i);
|
|
41930
41930
|
let residueid = chnid + '_' + currResi;
|
|
41931
41931
|
refnumLabel = ic.resid2refnum[residueid];
|
|
@@ -41976,6 +41976,8 @@ class ShowSeq {
|
|
|
41976
41976
|
if(lastTwo == 50) {
|
|
41977
41977
|
strandArray[strandCnt].anchorRefnum = refnum;
|
|
41978
41978
|
strandArray[strandCnt].resCntBfAnchor = resCntBfAnchor;
|
|
41979
|
+
|
|
41980
|
+
resCntAtAnchor = 0;
|
|
41979
41981
|
}
|
|
41980
41982
|
|
|
41981
41983
|
strandArray[strandCnt].strandPostfix = strandPostfix; // a in A1250a
|
|
@@ -41990,12 +41992,22 @@ class ShowSeq {
|
|
|
41990
41992
|
}
|
|
41991
41993
|
else {
|
|
41992
41994
|
if(strandHash[currStrand + postfix]) {
|
|
41993
|
-
strandArray[strandCnt - 1].endResi = currResi;
|
|
41994
|
-
strandArray[strandCnt - 1].endRefnum = refnum; // 1250a
|
|
41995
|
-
|
|
41996
41995
|
if(lastTwo == 50) {
|
|
41997
41996
|
strandArray[strandCnt - 1].anchorRefnum = refnum;
|
|
41998
41997
|
strandArray[strandCnt - 1].resCntBfAnchor = resCntBfAnchor;
|
|
41998
|
+
|
|
41999
|
+
// update
|
|
42000
|
+
strandArray[strandCnt - 1].startRefnum = strandArray[strandCnt - 1].anchorRefnum - strandArray[strandCnt - 1].resCntBfAnchor;
|
|
42001
|
+
|
|
42002
|
+
resCntAtAnchor = 0;
|
|
42003
|
+
}
|
|
42004
|
+
|
|
42005
|
+
strandArray[strandCnt - 1].endResi = currResi;
|
|
42006
|
+
strandArray[strandCnt - 1].endRefnum = refnum; // 1250a
|
|
42007
|
+
strandArray[strandCnt - 1].resCntAtAnchor = resCntAtAnchor;
|
|
42008
|
+
|
|
42009
|
+
if(strandArray[strandCnt - 1].anchorRefnum) {
|
|
42010
|
+
strandArray[strandCnt - 1].endRefnum = strandArray[strandCnt - 1].anchorRefnum + strandArray[strandCnt - 1].resCntAtAnchor;
|
|
41999
42011
|
}
|
|
42000
42012
|
|
|
42001
42013
|
resCnt = 0;
|
|
@@ -42010,16 +42022,20 @@ class ShowSeq {
|
|
|
42010
42022
|
|
|
42011
42023
|
// 2. remove strands with less than 3 residues
|
|
42012
42024
|
for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
|
|
42013
|
-
if(strandArray[i].endRefnum - strandArray[i].startRefnum < 3
|
|
42025
|
+
if(strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
|
|
42026
|
+
if(i != il - 1) { // modify
|
|
42027
|
+
strandArray[i + 1].loopResCnt += strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
|
|
42028
|
+
}
|
|
42029
|
+
|
|
42014
42030
|
strandArray.splice(i, 1);
|
|
42015
42031
|
}
|
|
42016
42032
|
}
|
|
42017
|
-
|
|
42033
|
+
|
|
42018
42034
|
// 3. assign refnumLabel for each resid
|
|
42019
42035
|
strandCnt = 0;
|
|
42020
42036
|
let loopCnt = 0;
|
|
42021
42037
|
|
|
42022
|
-
let bNterminal = true, refnumLabelNoPostfix, prevStrandCnt = 0, currRefnum;
|
|
42038
|
+
let bNterminal = true, bCterminal = true, refnumLabelNoPostfix, prevStrandCnt = 0, currRefnum;
|
|
42023
42039
|
bStart = false;
|
|
42024
42040
|
let refnumInStrand = 0;
|
|
42025
42041
|
if(strandArray.length > 0) {
|
|
@@ -42094,6 +42110,7 @@ class ShowSeq {
|
|
|
42094
42110
|
}
|
|
42095
42111
|
else if(parseInt(currResi) >= parseInt(strandArray[strandCnt].startResi) && parseInt(currResi) <= parseInt(strandArray[strandCnt].endResi)) {
|
|
42096
42112
|
bNterminal = false;
|
|
42113
|
+
//bCterminal = true; // The next will be C-terminal
|
|
42097
42114
|
|
|
42098
42115
|
if(strandArray[strandCnt].anchorRefnum) { // use anchor to name refnum
|
|
42099
42116
|
if(currResi == strandArray[strandCnt].startResi) {
|
|
@@ -42120,14 +42137,28 @@ class ShowSeq {
|
|
|
42120
42137
|
else if(parseInt(currResi) > parseInt(strandArray[strandCnt].endResi)) {
|
|
42121
42138
|
ic.residIgLoop[residueid] = 1;
|
|
42122
42139
|
|
|
42123
|
-
|
|
42124
|
-
|
|
42125
|
-
|
|
42140
|
+
if(!bCterminal) {
|
|
42141
|
+
refnumLabelNoPostfix = undefined;
|
|
42142
|
+
refnumLabel = undefined;
|
|
42126
42143
|
}
|
|
42127
42144
|
else {
|
|
42128
|
-
|
|
42129
|
-
|
|
42130
|
-
|
|
42145
|
+
// C-terminal
|
|
42146
|
+
if(!ic.resid2refnum[residueid]) {
|
|
42147
|
+
//break;
|
|
42148
|
+
|
|
42149
|
+
bCterminal = false;
|
|
42150
|
+
//bNterminal = true; // The next will be N-terminal
|
|
42151
|
+
|
|
42152
|
+
refnumLabelNoPostfix = undefined;
|
|
42153
|
+
refnumLabel = undefined;
|
|
42154
|
+
}
|
|
42155
|
+
else {
|
|
42156
|
+
bCterminal = true;
|
|
42157
|
+
|
|
42158
|
+
currRefnum = strandArray[strandCnt].endRefnum + loopCnt;
|
|
42159
|
+
refnumLabelNoPostfix = strandArray[strandCnt].strand + currRefnum;
|
|
42160
|
+
refnumLabel = refnumLabelNoPostfix + strandArray[strandCnt].strandPostfix;
|
|
42161
|
+
}
|
|
42131
42162
|
}
|
|
42132
42163
|
}
|
|
42133
42164
|
}
|
|
@@ -55404,11 +55435,13 @@ class LoadPDB {
|
|
|
55404
55435
|
}
|
|
55405
55436
|
}
|
|
55406
55437
|
|
|
55407
|
-
setSsbond() { let ic = this.icn3d; ic.icn3dui;
|
|
55438
|
+
setSsbond(chainidHash) { let ic = this.icn3d; ic.icn3dui;
|
|
55408
55439
|
// get all Cys residues
|
|
55409
55440
|
let structure2cys_resid = {};
|
|
55410
55441
|
|
|
55411
55442
|
for(let chainid in ic.chainsSeq) {
|
|
55443
|
+
if(chainidHash && !chainidHash.hasOwnProperty(chainid)) continue;
|
|
55444
|
+
|
|
55412
55445
|
let seq = ic.chainsSeq[chainid];
|
|
55413
55446
|
let structure = chainid.substr(0, chainid.indexOf('_'));
|
|
55414
55447
|
|