icn3d 3.31.1 → 3.31.2
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 +62 -52
- package/icn3d.min.js +1 -1
- package/icn3d.module.js +62 -52
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -71466,7 +71466,7 @@ class Dssp {
|
|
|
71466
71466
|
return (!refnumLabel) ? refnumLabel : refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
|
|
71467
71467
|
}
|
|
71468
71468
|
|
|
71469
|
-
exportRefnum(type,
|
|
71469
|
+
exportRefnum(type, bNoArraySymbol) { let ic = this.icn3d, me = ic.icn3dui;
|
|
71470
71470
|
let refData = '';
|
|
71471
71471
|
|
|
71472
71472
|
// 1. show IgStrand ref numbers
|
|
@@ -71513,91 +71513,101 @@ class Dssp {
|
|
|
71513
71513
|
|
|
71514
71514
|
let bIgDomain = (ic.domainid2info && Object.keys(ic.domainid2info).length > 0) ? 1 : 0;
|
|
71515
71515
|
|
|
71516
|
-
|
|
71517
|
-
refData += '{"Ig domain" : ' + bIgDomain + ',\n';
|
|
71516
|
+
|
|
71518
71517
|
|
|
71519
71518
|
if(bIgDomain) {
|
|
71520
|
-
|
|
71521
|
-
|
|
71522
|
-
let
|
|
71523
|
-
|
|
71524
|
-
|
|
71525
|
-
|
|
71526
|
-
|
|
71527
|
-
|
|
71528
|
-
|
|
71529
|
-
let
|
|
71530
|
-
|
|
71531
|
-
|
|
71532
|
-
|
|
71533
|
-
|
|
71534
|
-
|
|
71535
|
-
|
|
71536
|
-
|
|
71537
|
-
|
|
71538
|
-
|
|
71539
|
-
let
|
|
71540
|
-
|
|
71541
|
-
|
|
71542
|
-
|
|
71519
|
+
for(let structure in ic.structures) {
|
|
71520
|
+
refData += '{"' + structure + '": {"Ig domain" : ' + bIgDomain + ', "igs": [\n';
|
|
71521
|
+
for(let m = 0, ml = ic.structures[structure].length; m < ml; ++m) {
|
|
71522
|
+
let chnid = ic.structures[structure][m];
|
|
71523
|
+
let igArray = ic.chain2igArray[chnid];
|
|
71524
|
+
|
|
71525
|
+
if(igArray && igArray.length > 0) {
|
|
71526
|
+
refData += '{"' + chnid + '": {\n';
|
|
71527
|
+
|
|
71528
|
+
for(let i = 0, il = igArray.length; i < il; ++i) {
|
|
71529
|
+
let startPosArray = igArray[i].startPosArray;
|
|
71530
|
+
let endPosArray = igArray[i].endPosArray;
|
|
71531
|
+
let domainid = igArray[i].domainid;
|
|
71532
|
+
let info = ic.domainid2info[domainid];
|
|
71533
|
+
if(!info) continue;
|
|
71534
|
+
|
|
71535
|
+
refData += '"' + domainid + '": {\n';
|
|
71536
|
+
|
|
71537
|
+
refData += '"refpdbname":"' + info.refpdbname + '", "score":' + info.score + ', "seqid":' + info.seqid + ', "nresAlign":' + info.nresAlign + ', "data": [';
|
|
71538
|
+
for(let j = 0, jl = startPosArray.length; j < jl; ++j) {
|
|
71539
|
+
let startPos = startPosArray[j];
|
|
71540
|
+
let endPos = endPosArray[j];
|
|
71541
|
+
for(let k = startPos; k <= endPos; ++k) {
|
|
71542
|
+
const resid = chnid + '_' + ic.chainsSeq[chnid][k].resi + '_' + ic.chainsSeq[chnid][k].name;
|
|
71543
|
+
refData += '{"' + resid + '": "' + resid2refnum[resid] + '"},\n';
|
|
71544
|
+
}
|
|
71543
71545
|
}
|
|
71546
|
+
refData += '],\n';
|
|
71547
|
+
|
|
71548
|
+
refData += '},\n';
|
|
71544
71549
|
}
|
|
71545
|
-
refData += '],\n';
|
|
71546
71550
|
|
|
71547
|
-
refData += '},\n';
|
|
71551
|
+
refData += '}},\n';
|
|
71548
71552
|
}
|
|
71549
|
-
|
|
71550
|
-
refData += '}},\n';
|
|
71551
71553
|
}
|
|
71552
|
-
}
|
|
71553
71554
|
|
|
71554
|
-
|
|
71555
|
+
refData += ']}},\n';
|
|
71556
|
+
}
|
|
71555
71557
|
}
|
|
71556
|
-
|
|
71557
|
-
refData += '}\n';
|
|
71558
71558
|
}
|
|
71559
71559
|
// 2. show Kabat ref numbers
|
|
71560
71560
|
else if(type == 'kabat' || type == 'Kabat') {
|
|
71561
71561
|
let resid2kabat = {};
|
|
71562
71562
|
for(let resid in ic.resid2refnum) {
|
|
71563
|
-
|
|
71564
|
-
|
|
71563
|
+
let domainid = ic.resid2domainid[resid];
|
|
71564
|
+
let refnumStr, refnumLabel = ic.resid2refnum[resid];
|
|
71565
71565
|
|
|
71566
|
-
|
|
71567
|
-
|
|
71566
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
71567
|
+
if(!atom) continue;
|
|
71568
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
71568
71569
|
|
|
71569
|
-
|
|
71570
|
-
|
|
71571
|
-
|
|
71572
|
-
|
|
71570
|
+
if(refnumLabel) {
|
|
71571
|
+
let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
71572
|
+
refnumStr = (ic.domainid2ig2kabat[domainid]) ? ic.domainid2ig2kabat[domainid][refnumStr_ori] : undefined;
|
|
71573
|
+
}
|
|
71573
71574
|
|
|
71574
|
-
|
|
71575
|
+
resid2kabat[resid + '_' + resn] = refnumStr;
|
|
71575
71576
|
}
|
|
71576
71577
|
|
|
71578
|
+
refData += '{"Kabat": ';
|
|
71577
71579
|
refData += JSON.stringify(resid2kabat);
|
|
71580
|
+
refData += ',\n';
|
|
71578
71581
|
}
|
|
71579
71582
|
// 3. show IMGT ref numbers
|
|
71580
71583
|
else if(type == 'imgt'|| type == 'IMGT') {
|
|
71581
71584
|
let resid2imgt = {};
|
|
71582
71585
|
for(let resid in ic.resid2refnum) {
|
|
71583
|
-
|
|
71584
|
-
|
|
71586
|
+
let domainid = ic.resid2domainid[resid];
|
|
71587
|
+
let refnumStr, refnumLabel = ic.resid2refnum[resid];
|
|
71585
71588
|
|
|
71586
|
-
|
|
71587
|
-
|
|
71589
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
71590
|
+
if(!atom) continue;
|
|
71591
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
71588
71592
|
|
|
71589
|
-
|
|
71590
|
-
|
|
71591
|
-
|
|
71592
|
-
|
|
71593
|
+
if(refnumLabel) {
|
|
71594
|
+
let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
71595
|
+
refnumStr = (ic.domainid2ig2imgt[domainid]) ? ic.domainid2ig2imgt[domainid][refnumStr_ori] : undefined;
|
|
71596
|
+
}
|
|
71593
71597
|
|
|
71594
|
-
|
|
71598
|
+
resid2imgt[resid + '_' + resn] = refnumStr;
|
|
71595
71599
|
}
|
|
71596
71600
|
|
|
71601
|
+
refData += '{"Kabat": ';
|
|
71597
71602
|
refData += JSON.stringify(resid2imgt);
|
|
71603
|
+
refData += ',\n';
|
|
71598
71604
|
}
|
|
71599
71605
|
|
|
71600
71606
|
|
|
71607
|
+
if(!bNoArraySymbol) {
|
|
71608
|
+
refData = '[' + refData + ']';
|
|
71609
|
+
}
|
|
71610
|
+
|
|
71601
71611
|
if(!me.bNode) {
|
|
71602
71612
|
let file_pref = Object.keys(me.utilsCls.getHlStructures()).join(',');
|
|
71603
71613
|
|