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.module.js
CHANGED
|
@@ -42824,9 +42824,9 @@ class ShowSeq {
|
|
|
42824
42824
|
let index = 1, bStart = false;
|
|
42825
42825
|
|
|
42826
42826
|
// 1. get the range of each strand excluding loops
|
|
42827
|
-
let strandArray = [], strandHash = {}, strandCnt = 0, resCnt = 0, resCntBfAnchor = 0;
|
|
42827
|
+
let strandArray = [], strandHash = {}, strandCnt = 0, resCnt = 0, resCntBfAnchor = 0, resCntAtAnchor = 0;
|
|
42828
42828
|
if(!bCustom && !kabat_or_imgt) {
|
|
42829
|
-
for(let i = 0, il = giSeq.length; i < il; ++i, ++resCnt, ++resCntBfAnchor) {
|
|
42829
|
+
for(let i = 0, il = giSeq.length; i < il; ++i, ++resCnt, ++resCntBfAnchor, ++resCntAtAnchor) {
|
|
42830
42830
|
let currResi = ic.ParserUtilsCls.getResi(chnid, i);
|
|
42831
42831
|
let residueid = chnid + '_' + currResi;
|
|
42832
42832
|
refnumLabel = ic.resid2refnum[residueid];
|
|
@@ -42877,6 +42877,8 @@ class ShowSeq {
|
|
|
42877
42877
|
if(lastTwo == 50) {
|
|
42878
42878
|
strandArray[strandCnt].anchorRefnum = refnum;
|
|
42879
42879
|
strandArray[strandCnt].resCntBfAnchor = resCntBfAnchor;
|
|
42880
|
+
|
|
42881
|
+
resCntAtAnchor = 0;
|
|
42880
42882
|
}
|
|
42881
42883
|
|
|
42882
42884
|
strandArray[strandCnt].strandPostfix = strandPostfix; // a in A1250a
|
|
@@ -42891,12 +42893,22 @@ class ShowSeq {
|
|
|
42891
42893
|
}
|
|
42892
42894
|
else {
|
|
42893
42895
|
if(strandHash[currStrand + postfix]) {
|
|
42894
|
-
strandArray[strandCnt - 1].endResi = currResi;
|
|
42895
|
-
strandArray[strandCnt - 1].endRefnum = refnum; // 1250a
|
|
42896
|
-
|
|
42897
42896
|
if(lastTwo == 50) {
|
|
42898
42897
|
strandArray[strandCnt - 1].anchorRefnum = refnum;
|
|
42899
42898
|
strandArray[strandCnt - 1].resCntBfAnchor = resCntBfAnchor;
|
|
42899
|
+
|
|
42900
|
+
// update
|
|
42901
|
+
strandArray[strandCnt - 1].startRefnum = strandArray[strandCnt - 1].anchorRefnum - strandArray[strandCnt - 1].resCntBfAnchor;
|
|
42902
|
+
|
|
42903
|
+
resCntAtAnchor = 0;
|
|
42904
|
+
}
|
|
42905
|
+
|
|
42906
|
+
strandArray[strandCnt - 1].endResi = currResi;
|
|
42907
|
+
strandArray[strandCnt - 1].endRefnum = refnum; // 1250a
|
|
42908
|
+
strandArray[strandCnt - 1].resCntAtAnchor = resCntAtAnchor;
|
|
42909
|
+
|
|
42910
|
+
if(strandArray[strandCnt - 1].anchorRefnum) {
|
|
42911
|
+
strandArray[strandCnt - 1].endRefnum = strandArray[strandCnt - 1].anchorRefnum + strandArray[strandCnt - 1].resCntAtAnchor;
|
|
42900
42912
|
}
|
|
42901
42913
|
|
|
42902
42914
|
resCnt = 0;
|
|
@@ -42911,16 +42923,20 @@ class ShowSeq {
|
|
|
42911
42923
|
|
|
42912
42924
|
// 2. remove strands with less than 3 residues
|
|
42913
42925
|
for(let il = strandArray.length, i = il - 1; i >= 0; --i) {
|
|
42914
|
-
if(strandArray[i].endRefnum - strandArray[i].startRefnum < 3
|
|
42926
|
+
if(strandArray[i].endRefnum - strandArray[i].startRefnum + 1 < 3) { // remove the strand
|
|
42927
|
+
if(i != il - 1) { // modify
|
|
42928
|
+
strandArray[i + 1].loopResCnt += strandArray[i].endRefnum - strandArray[i].startRefnum + 1;
|
|
42929
|
+
}
|
|
42930
|
+
|
|
42915
42931
|
strandArray.splice(i, 1);
|
|
42916
42932
|
}
|
|
42917
42933
|
}
|
|
42918
|
-
|
|
42934
|
+
|
|
42919
42935
|
// 3. assign refnumLabel for each resid
|
|
42920
42936
|
strandCnt = 0;
|
|
42921
42937
|
let loopCnt = 0;
|
|
42922
42938
|
|
|
42923
|
-
let bNterminal = true, refnumLabelNoPostfix, prevStrandCnt = 0, currRefnum;
|
|
42939
|
+
let bNterminal = true, bCterminal = true, refnumLabelNoPostfix, prevStrandCnt = 0, currRefnum;
|
|
42924
42940
|
bStart = false;
|
|
42925
42941
|
let refnumInStrand = 0;
|
|
42926
42942
|
if(strandArray.length > 0) {
|
|
@@ -42995,6 +43011,7 @@ class ShowSeq {
|
|
|
42995
43011
|
}
|
|
42996
43012
|
else if(parseInt(currResi) >= parseInt(strandArray[strandCnt].startResi) && parseInt(currResi) <= parseInt(strandArray[strandCnt].endResi)) {
|
|
42997
43013
|
bNterminal = false;
|
|
43014
|
+
//bCterminal = true; // The next will be C-terminal
|
|
42998
43015
|
|
|
42999
43016
|
if(strandArray[strandCnt].anchorRefnum) { // use anchor to name refnum
|
|
43000
43017
|
if(currResi == strandArray[strandCnt].startResi) {
|
|
@@ -43021,14 +43038,28 @@ class ShowSeq {
|
|
|
43021
43038
|
else if(parseInt(currResi) > parseInt(strandArray[strandCnt].endResi)) {
|
|
43022
43039
|
ic.residIgLoop[residueid] = 1;
|
|
43023
43040
|
|
|
43024
|
-
|
|
43025
|
-
|
|
43026
|
-
|
|
43041
|
+
if(!bCterminal) {
|
|
43042
|
+
refnumLabelNoPostfix = undefined;
|
|
43043
|
+
refnumLabel = undefined;
|
|
43027
43044
|
}
|
|
43028
43045
|
else {
|
|
43029
|
-
|
|
43030
|
-
|
|
43031
|
-
|
|
43046
|
+
// C-terminal
|
|
43047
|
+
if(!ic.resid2refnum[residueid]) {
|
|
43048
|
+
//break;
|
|
43049
|
+
|
|
43050
|
+
bCterminal = false;
|
|
43051
|
+
//bNterminal = true; // The next will be N-terminal
|
|
43052
|
+
|
|
43053
|
+
refnumLabelNoPostfix = undefined;
|
|
43054
|
+
refnumLabel = undefined;
|
|
43055
|
+
}
|
|
43056
|
+
else {
|
|
43057
|
+
bCterminal = true;
|
|
43058
|
+
|
|
43059
|
+
currRefnum = strandArray[strandCnt].endRefnum + loopCnt;
|
|
43060
|
+
refnumLabelNoPostfix = strandArray[strandCnt].strand + currRefnum;
|
|
43061
|
+
refnumLabel = refnumLabelNoPostfix + strandArray[strandCnt].strandPostfix;
|
|
43062
|
+
}
|
|
43032
43063
|
}
|
|
43033
43064
|
}
|
|
43034
43065
|
}
|
|
@@ -56305,11 +56336,13 @@ class LoadPDB {
|
|
|
56305
56336
|
}
|
|
56306
56337
|
}
|
|
56307
56338
|
|
|
56308
|
-
setSsbond() { let ic = this.icn3d; ic.icn3dui;
|
|
56339
|
+
setSsbond(chainidHash) { let ic = this.icn3d; ic.icn3dui;
|
|
56309
56340
|
// get all Cys residues
|
|
56310
56341
|
let structure2cys_resid = {};
|
|
56311
56342
|
|
|
56312
56343
|
for(let chainid in ic.chainsSeq) {
|
|
56344
|
+
if(chainidHash && !chainidHash.hasOwnProperty(chainid)) continue;
|
|
56345
|
+
|
|
56313
56346
|
let seq = ic.chainsSeq[chainid];
|
|
56314
56347
|
let structure = chainid.substr(0, chainid.indexOf('_'));
|
|
56315
56348
|
|