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.module.js
CHANGED
|
@@ -72367,7 +72367,7 @@ class Dssp {
|
|
|
72367
72367
|
return (!refnumLabel) ? refnumLabel : refnumLabel.replace(/'/g, '').replace(/\*/g, '').replace(/\^/g, '').replace(/\+/g, '').replace(/\-/g, '').substr(1); // C', C''
|
|
72368
72368
|
}
|
|
72369
72369
|
|
|
72370
|
-
exportRefnum(type,
|
|
72370
|
+
exportRefnum(type, bNoArraySymbol) { let ic = this.icn3d, me = ic.icn3dui;
|
|
72371
72371
|
let refData = '';
|
|
72372
72372
|
|
|
72373
72373
|
// 1. show IgStrand ref numbers
|
|
@@ -72414,91 +72414,101 @@ class Dssp {
|
|
|
72414
72414
|
|
|
72415
72415
|
let bIgDomain = (ic.domainid2info && Object.keys(ic.domainid2info).length > 0) ? 1 : 0;
|
|
72416
72416
|
|
|
72417
|
-
|
|
72418
|
-
refData += '{"Ig domain" : ' + bIgDomain + ',\n';
|
|
72417
|
+
|
|
72419
72418
|
|
|
72420
72419
|
if(bIgDomain) {
|
|
72421
|
-
|
|
72422
|
-
|
|
72423
|
-
let
|
|
72424
|
-
|
|
72425
|
-
|
|
72426
|
-
|
|
72427
|
-
|
|
72428
|
-
|
|
72429
|
-
|
|
72430
|
-
let
|
|
72431
|
-
|
|
72432
|
-
|
|
72433
|
-
|
|
72434
|
-
|
|
72435
|
-
|
|
72436
|
-
|
|
72437
|
-
|
|
72438
|
-
|
|
72439
|
-
|
|
72440
|
-
let
|
|
72441
|
-
|
|
72442
|
-
|
|
72443
|
-
|
|
72420
|
+
for(let structure in ic.structures) {
|
|
72421
|
+
refData += '{"' + structure + '": {"Ig domain" : ' + bIgDomain + ', "igs": [\n';
|
|
72422
|
+
for(let m = 0, ml = ic.structures[structure].length; m < ml; ++m) {
|
|
72423
|
+
let chnid = ic.structures[structure][m];
|
|
72424
|
+
let igArray = ic.chain2igArray[chnid];
|
|
72425
|
+
|
|
72426
|
+
if(igArray && igArray.length > 0) {
|
|
72427
|
+
refData += '{"' + chnid + '": {\n';
|
|
72428
|
+
|
|
72429
|
+
for(let i = 0, il = igArray.length; i < il; ++i) {
|
|
72430
|
+
let startPosArray = igArray[i].startPosArray;
|
|
72431
|
+
let endPosArray = igArray[i].endPosArray;
|
|
72432
|
+
let domainid = igArray[i].domainid;
|
|
72433
|
+
let info = ic.domainid2info[domainid];
|
|
72434
|
+
if(!info) continue;
|
|
72435
|
+
|
|
72436
|
+
refData += '"' + domainid + '": {\n';
|
|
72437
|
+
|
|
72438
|
+
refData += '"refpdbname":"' + info.refpdbname + '", "score":' + info.score + ', "seqid":' + info.seqid + ', "nresAlign":' + info.nresAlign + ', "data": [';
|
|
72439
|
+
for(let j = 0, jl = startPosArray.length; j < jl; ++j) {
|
|
72440
|
+
let startPos = startPosArray[j];
|
|
72441
|
+
let endPos = endPosArray[j];
|
|
72442
|
+
for(let k = startPos; k <= endPos; ++k) {
|
|
72443
|
+
const resid = chnid + '_' + ic.chainsSeq[chnid][k].resi + '_' + ic.chainsSeq[chnid][k].name;
|
|
72444
|
+
refData += '{"' + resid + '": "' + resid2refnum[resid] + '"},\n';
|
|
72445
|
+
}
|
|
72444
72446
|
}
|
|
72447
|
+
refData += '],\n';
|
|
72448
|
+
|
|
72449
|
+
refData += '},\n';
|
|
72445
72450
|
}
|
|
72446
|
-
refData += '],\n';
|
|
72447
72451
|
|
|
72448
|
-
refData += '},\n';
|
|
72452
|
+
refData += '}},\n';
|
|
72449
72453
|
}
|
|
72450
|
-
|
|
72451
|
-
refData += '}},\n';
|
|
72452
72454
|
}
|
|
72453
|
-
}
|
|
72454
72455
|
|
|
72455
|
-
|
|
72456
|
+
refData += ']}},\n';
|
|
72457
|
+
}
|
|
72456
72458
|
}
|
|
72457
|
-
|
|
72458
|
-
refData += '}\n';
|
|
72459
72459
|
}
|
|
72460
72460
|
// 2. show Kabat ref numbers
|
|
72461
72461
|
else if(type == 'kabat' || type == 'Kabat') {
|
|
72462
72462
|
let resid2kabat = {};
|
|
72463
72463
|
for(let resid in ic.resid2refnum) {
|
|
72464
|
-
|
|
72465
|
-
|
|
72464
|
+
let domainid = ic.resid2domainid[resid];
|
|
72465
|
+
let refnumStr, refnumLabel = ic.resid2refnum[resid];
|
|
72466
72466
|
|
|
72467
|
-
|
|
72468
|
-
|
|
72467
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
72468
|
+
if(!atom) continue;
|
|
72469
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
72469
72470
|
|
|
72470
|
-
|
|
72471
|
-
|
|
72472
|
-
|
|
72473
|
-
|
|
72471
|
+
if(refnumLabel) {
|
|
72472
|
+
let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
72473
|
+
refnumStr = (ic.domainid2ig2kabat[domainid]) ? ic.domainid2ig2kabat[domainid][refnumStr_ori] : undefined;
|
|
72474
|
+
}
|
|
72474
72475
|
|
|
72475
|
-
|
|
72476
|
+
resid2kabat[resid + '_' + resn] = refnumStr;
|
|
72476
72477
|
}
|
|
72477
72478
|
|
|
72479
|
+
refData += '{"Kabat": ';
|
|
72478
72480
|
refData += JSON.stringify(resid2kabat);
|
|
72481
|
+
refData += ',\n';
|
|
72479
72482
|
}
|
|
72480
72483
|
// 3. show IMGT ref numbers
|
|
72481
72484
|
else if(type == 'imgt'|| type == 'IMGT') {
|
|
72482
72485
|
let resid2imgt = {};
|
|
72483
72486
|
for(let resid in ic.resid2refnum) {
|
|
72484
|
-
|
|
72485
|
-
|
|
72487
|
+
let domainid = ic.resid2domainid[resid];
|
|
72488
|
+
let refnumStr, refnumLabel = ic.resid2refnum[resid];
|
|
72486
72489
|
|
|
72487
|
-
|
|
72488
|
-
|
|
72490
|
+
let atom = ic.firstAtomObjCls.getFirstAtomObj(ic.residues[resid]);
|
|
72491
|
+
if(!atom) continue;
|
|
72492
|
+
let resn = me.utilsCls.residueName2Abbr(atom.resn.substr(0, 3));
|
|
72489
72493
|
|
|
72490
|
-
|
|
72491
|
-
|
|
72492
|
-
|
|
72493
|
-
|
|
72494
|
+
if(refnumLabel) {
|
|
72495
|
+
let refnumStr_ori = ic.refnumCls.rmStrandFromRefnumlabel(refnumLabel);
|
|
72496
|
+
refnumStr = (ic.domainid2ig2imgt[domainid]) ? ic.domainid2ig2imgt[domainid][refnumStr_ori] : undefined;
|
|
72497
|
+
}
|
|
72494
72498
|
|
|
72495
|
-
|
|
72499
|
+
resid2imgt[resid + '_' + resn] = refnumStr;
|
|
72496
72500
|
}
|
|
72497
72501
|
|
|
72502
|
+
refData += '{"Kabat": ';
|
|
72498
72503
|
refData += JSON.stringify(resid2imgt);
|
|
72504
|
+
refData += ',\n';
|
|
72499
72505
|
}
|
|
72500
72506
|
|
|
72501
72507
|
|
|
72508
|
+
if(!bNoArraySymbol) {
|
|
72509
|
+
refData = '[' + refData + ']';
|
|
72510
|
+
}
|
|
72511
|
+
|
|
72502
72512
|
if(!me.bNode) {
|
|
72503
72513
|
let file_pref = Object.keys(me.utilsCls.getHlStructures()).join(',');
|
|
72504
72514
|
|