Skip to content

Commit e22e2c8

Browse files
committed
Pull request #648: Users can use iCn3D to detect Ig domains for any structures and assign IgStrand reference numbers for each residue. The instruction is at https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d.html#igrefnum.
Merge in STRUC/icn3d from release3330 to master * commit 'b8fa42fa64f05d919bf021797c4d32035d871ddc': Users can use iCn3D to detect Ig domains for any structures and assign IgStrand reference numbers for each residue. The instruction is at https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d.html#igrefnum.
2 parents 4713b3c + b8fa42f commit e22e2c8

41 files changed

Lines changed: 14353 additions & 169 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## Change Log
2+
[icn3d-3.33.0](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.33.0.zip) was release on June 12, 2024. Users can use iCn3D to detect Ig domains for any structures and assign IgStrand reference numbers for each residue. The instruction is at https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d.html#igrefnum.
3+
24
[icn3d-3.32.0](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.32.0.zip) was release on May 28, 2024. Allowed to load multiple mmCIF text files, which could contain multiple structures separated by "ENDMDL\n".
35

46
[icn3d-3.31.4](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-3.31.4.zip) was release on May 11, 2024. Release Ig templates for assigning reference numbers.

build/icn3d.js

Lines changed: 88 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11492,6 +11492,13 @@ var icn3d = (function (exports) {
1149211492
ic.drawCls.draw();
1149311493
});
1149411494

11495+
me.myEventCls.onIds("#" + me.pre + "mn6_addlabelIg", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
11496+
ic.residueLabelsCls.addIgLabels(ic.hAtoms);
11497+
ic.selectionCls.saveSelectionIfSelected();
11498+
thisClass.setLogCmd('add ig labels', true);
11499+
ic.drawCls.draw();
11500+
});
11501+
1149511502
me.myEventCls.onIds("#" + me.pre + "mn6_addlabelChains", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
1149611503
ic.analysisCls.addChainLabels(ic.hAtoms);
1149711504
ic.selectionCls.saveSelectionIfSelected();
@@ -12716,15 +12723,12 @@ var icn3d = (function (exports) {
1271612723
html += this.getLink('mn1_exportSecondary', 'Secondary Structure', undefined, 2);
1271712724
}
1271812725

12719-
//!!!
12720-
/*
1272112726
html += this.getMenuText('m1_exportrefnum', 'Reference Numbers', undefined, undefined, 2);
1272212727
html += "<ul>";
1272312728
html += this.getLink('mn1_exportIgstrand', 'Ig Strand', undefined, 3);
1272412729
html += this.getLink('mn1_exportKabat', 'Kabat', undefined, 3);
1272512730
html += this.getLink('mn1_exportImgt', 'IMGT', undefined, 3);
1272612731
html += "</ul>";
12727-
*/
1272812732

1272912733
html += "<li><br/></li>";
1273012734

@@ -13567,9 +13571,8 @@ var icn3d = (function (exports) {
1356713571
html += this.getRadio('mn4_clr', 'mn4_clrConfidence', 'pLDDT', undefined, 1, 1);
1356813572
//}
1356913573

13570-
//!!!
13571-
// html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
13572-
// html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
13574+
html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
13575+
html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
1357313576
}
1357413577
else {
1357513578
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
@@ -13699,8 +13702,10 @@ var icn3d = (function (exports) {
1369913702
if(me.cfg.cid === undefined) {
1370013703
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResidues', 'per Residue', undefined, 1, 2);
1370113704
html += this.getRadio('mn6_addlabel', 'mn6_addlabelResnum', 'per Residue & Number', undefined, 1, 2);
13702-
//!!!
13703-
// html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
13705+
13706+
html += this.getRadio('mn6_addlabel', 'mn6_addlabelRefnum', 'per Reference Number', undefined, 1, 2);
13707+
html += this.getRadio('mn6_addlabel', 'mn6_addlabelIg', 'per Ig Domain', undefined, 1, 2);
13708+
1370413709
html += this.getRadio('mn6_addlabel', 'mn6_addlabelChains', 'per Chain', undefined, undefined, 2);
1370513710
html += this.getRadio('mn6_addlabel', 'mn6_addlabelTermini', 'N- & C-Termini', undefined, 1, 2);
1370613711
}
@@ -13793,17 +13798,13 @@ var icn3d = (function (exports) {
1379313798
html += this.getMenuText('mn6_igrefwrap', 'Ref. Number', undefined, undefined, 1);
1379413799

1379513800
html += "<ul>";
13796-
//!!!
13797-
/*
13801+
1379813802
html += this.getLink('mn6_igrefYes', 'Show Ig for Selection', undefined, 2);
1379913803
html += this.getLink('mn6_igrefTpl', 'Ig w/ Specified Template', undefined, 2);
1380013804
html += this.getLink('mn6_alignrefTpl', 'Align w/ Specified Template', undefined, 2);
1380113805
html += this.getLink('mn6_igrefNo', 'Reset Ig Ref. Number', undefined, 2);
1380213806

1380313807
html += this.getMenuSep();
13804-
*/
13805-
13806-
1380713808

1380813809
html += this.getLink('mn6_customref', 'Custom Ref. Number', undefined, 2);
1380913810
html += "</ul>";
@@ -13893,6 +13894,7 @@ var icn3d = (function (exports) {
1389313894
html += this.getMenuUrl('faq_simialphapdb', me.htmlCls.baseUrl + "icn3d/icn3d.html#simifoldseek", "Similar AlphaFold/PDB", 1, 2);
1389413895
html += this.getMenuUrl('faq_alnstru', me.htmlCls.baseUrl + "icn3d/icn3d.html#alignmul", "Align Multiple Structures", 1, 2);
1389513896
html += this.getMenuUrl('faq_batchanal', me.htmlCls.baseUrl + "icn3d/icn3d.html#batchanalysis", "Batch Analysis", 1, 2);
13897+
html += this.getMenuUrl('faq_batchanal', me.htmlCls.baseUrl + "icn3d/icn3d.html#igrefnum", "Assign Ig Ref. Numbers", 1, 2);
1389613898
html += this.getMenuUrl('faq_embedicn3d', me.htmlCls.baseUrl + "icn3d/icn3d.html#embedicn3d", "Embed iCn3D", 1, 2);
1389713899
html += "</ul>";
1389813900
html += "</li>";
@@ -16081,13 +16083,10 @@ var icn3d = (function (exports) {
1608116083
html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_interact'>Interactions" + me.htmlCls.space2 + "</span></td>";
1608216084
html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_crosslink'>Cross-Linkages" + me.htmlCls.space2 + "</span></td>";
1608316085
html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_transmem'>Transmembrane" + me.htmlCls.space2 + "</span></td>";
16084-
//!!!
16085-
/*
16086+
1608616087
html += "<td></td>";
1608716088
html += "</tr><tr>";
1608816089
html += tmpStr1 + me.htmlCls.inputCheckStr + "id='" + me.pre + "anno_ig'>Ig Domains" + me.htmlCls.space2 + "</span></td>";
16089-
*/
16090-
1609116090

1609216091
html += "<td></td>";
1609316092
html += "</tr></table></div></div>";
@@ -35758,6 +35757,33 @@ var icn3d = (function (exports) {
3575835757
ic.hlObjectsCls.removeHlObjects();
3575935758
}
3576035759

35760+
//Add labels for each Ig domain
35761+
addIgLabels(atoms) { let ic = this.icn3d, me = ic.icn3dui;
35762+
if(me.bNode) return;
35763+
35764+
let size = 60; //18;
35765+
35766+
ic.labels['ig'] = [];
35767+
let chainidHash = ic.firstAtomObjCls.getChainsFromAtoms(atoms);
35768+
35769+
for(let chainid in ic.igLabel2Pos) {
35770+
if(!chainidHash.hasOwnProperty(chainid)) continue;
35771+
35772+
for(let text in ic.igLabel2Pos[chainid]) {
35773+
let label = {}; // Each label contains 'position', 'text', 'color', 'background'
35774+
label.position = ic.igLabel2Pos[chainid][text];
35775+
label.text = text;
35776+
35777+
label.size = size;
35778+
label.color = '#00FFFF';
35779+
35780+
ic.labels['ig'].push(label);
35781+
}
35782+
}
35783+
35784+
ic.hlObjectsCls.removeHlObjects();
35785+
}
35786+
3576135787
addNonCarbonAtomLabels(atoms) { let ic = this.icn3d, me = ic.icn3dui;
3576235788
if(me.bNode) return;
3576335789

@@ -42028,6 +42054,8 @@ var icn3d = (function (exports) {
4202842054
let igCnt = ic.chain2igArray[chnid].length;
4202942055
let fromArray = [], toArray = [];
4203042056
let posindex2domainindex = {};
42057+
if(!ic.igLabel2Pos) ic.igLabel2Pos = {};
42058+
ic.igLabel2Pos[chnid] = {};
4203142059
for(let i = 0; i < igCnt; ++i) {
4203242060
let igElem = ic.chain2igArray[chnid][i];
4203342061
fromArray = fromArray.concat(igElem.startPosArray);
@@ -42037,6 +42065,18 @@ var icn3d = (function (exports) {
4203742065
let pos = igElem.startPosArray[j];
4203842066
posindex2domainindex[pos] = i;
4203942067
}
42068+
42069+
let resi1 = ic.ParserUtilsCls.getResi(chnid, igElem.startPosArray[0]);
42070+
let resid1 = chnid + "_" + resi1;
42071+
let calpha1 = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid1]);
42072+
42073+
let resi2 = ic.ParserUtilsCls.getResi(chnid, igElem.endPosArray[igElem.endPosArray.length - 1]);
42074+
let resid2 = chnid + "_" + resi2;
42075+
let calpha2 = ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.residues[resid2]);
42076+
42077+
let label = chnid.substr(chnid.lastIndexOf('_') + 1) + '-Ig' + (i+1).toString();
42078+
42079+
ic.igLabel2Pos[chnid][label] = calpha1.coord.clone().add(calpha2.coord).multiplyScalar(0.5);
4204042080
}
4204142081

4204242082
// let htmlCnt = '<span class="icn3d-residueNum" title="Ig domain count">' + igCnt.toString() + ' Igs</span>';
@@ -42087,6 +42127,7 @@ var icn3d = (function (exports) {
4208742127
if(igArray.length == 0) return {html: html, html2: html2, html3: html3}
4208842128
let rangeArray = [], titleArray = [], fullTitleArray = [], domainArray = [];
4208942129

42130+
let chain = chnid.substr(chnid.lastIndexOf('_') + 1);
4209042131
for(let i = 0, il = igArray.length; i < il; ++i) {
4209142132
let domainid = igArray[i].domainid;
4209242133
if(!ic.domainid2info) continue;
@@ -42098,7 +42139,7 @@ var icn3d = (function (exports) {
4209842139

4209942140
let igType = (parseFloat(tmscore) < ic.refnumCls.TMThresholdIgType ) ? 'Ig' : ic.ref2igtype[info.refpdbname];
4210042141
titleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + ')');
42101-
fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', type: ' + ic.ref2igtype[info.refpdbname] + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign);
42142+
fullTitleArray.push(igType + ' (TM:' + parseFloat(tmscore).toFixed(2) + '), template: ' + info.refpdbname + ', type: ' + ic.ref2igtype[info.refpdbname] + ', Seq. identity: ' + parseFloat(info.seqid).toFixed(2) + ', aligned residues: ' + info.nresAlign + ', label in 3D: ' + chain + '-Ig' + (i+1).toString());
4210242143

4210342144
domainArray.push(igType);
4210442145

@@ -49368,7 +49409,7 @@ var icn3d = (function (exports) {
4936849409
}
4936949410

4937049411
//Remove the highlight in the 2D interaction diagram.
49371-
removeHl2D() { let ic = this.icn3d; ic.icn3dui;
49412+
removeHl2D(bRemoveChainOnly) { let ic = this.icn3d; ic.icn3dui;
4937249413
// clear nodes in 2d dgm
4937349414
$("#" + ic.pre + "dl_2ddgm rect").attr('stroke', '#000000');
4937449415
$("#" + ic.pre + "dl_2ddgm circle").attr('stroke', '#000000');
@@ -49382,6 +49423,22 @@ var icn3d = (function (exports) {
4938249423
$("#" + ic.pre + "dl_2ddgm svg line").attr('stroke', '#000000');
4938349424
$("#" + ic.pre + "dl_2ddgm line").attr('stroke-width', 1);
4938449425
}
49426+
49427+
if(!bRemoveChainOnly) {
49428+
// clear nodes in 2d interaction network
49429+
// $("#" + ic.pre + "dl_linegraph rect").attr('stroke', '#000000');
49430+
$("#" + ic.pre + "dl_linegraph circle").attr('stroke', '#000000');
49431+
49432+
// $("#" + ic.pre + "dl_linegraph rect").attr('stroke-width', 1);
49433+
$("#" + ic.pre + "dl_linegraph circle").attr('stroke-width', 1);
49434+
49435+
// clear nodes in 2d interaction graph
49436+
$("#" + ic.pre + "dl_scatterplot rect").attr('stroke', '#000000');
49437+
$("#" + ic.pre + "dl_scatterplot circle").attr('stroke', '#000000');
49438+
49439+
$("#" + ic.pre + "dl_scatterplot rect").attr('stroke-width', 1);
49440+
$("#" + ic.pre + "dl_scatterplot circle").attr('stroke-width', 1);
49441+
}
4938549442
}
4938649443

4938749444
//Remove the selection in the menu of defined sets.
@@ -49479,7 +49536,7 @@ var icn3d = (function (exports) {
4947949536
// update highlight in 2D window
4948049537
//Update the highlight of 2D interaction diagram according to the current highlighted atoms.
4948149538
updateHl2D(chainArray2d) { let ic = this.icn3d, me = ic.icn3dui;
49482-
this.removeHl2D();
49539+
this.removeHl2D(true);
4948349540

4948449541
if(ic.hAtoms && ic.atoms && Object.keys(ic.hAtoms).length == Object.keys(ic.atoms).length) return;
4948549542

@@ -49906,6 +49963,8 @@ var icn3d = (function (exports) {
4990649963
&& ic.chainsMapping[chainid2] && ic.chainsMapping[chainid2][resid2]) {
4990749964
mapping1 = (nodeA.s == "a") ? ic.chainsMapping[chainid1][resid1] : ic.chainsMapping[chainid2][resid2];
4990849965
mapping2 = (nodeA.s == "a") ? ic.chainsMapping[chainid2][resid2] : ic.chainsMapping[chainid1][resid1];
49966+
49967+
let bIgRef = (mapping1.length > 4 && !isNaN(parseInt(mapping1.substr(-4, 4)))) || (mapping2.length > 4 && !isNaN(parseInt(mapping2.substr(-4, 4))));
4990949968

4991049969
let mappingid = mapping1 + '_' + mapping2 + '_' + link.c; // link.c determines the interaction type
4991149970

@@ -49917,7 +49976,7 @@ var icn3d = (function (exports) {
4991749976
linkDiff.source += separatorDiff + ic.chainsMapping[chainid1][resid1];
4991849977
linkDiff.target += separatorDiff + ic.chainsMapping[chainid2][resid2];
4991949978

49920-
if(linkedNodeCnt[mappingid] == structureArray.length && linkedNodeInterDiffBool[mappingid] == 0) {
49979+
if(linkedNodeCnt[mappingid] == structureArray.length && (bIgRef || linkedNodeInterDiffBool[mappingid] == 0)) {
4992149980
linkArraySplitCommon[index].push(linkCommon);
4992249981
}
4992349982
else {
@@ -64840,7 +64899,7 @@ var icn3d = (function (exports) {
6484064899
let chainid = chainidArray[i];
6484164900
let atoms = me.hashUtilsCls.intHash(ic.hAtoms, ic.chains[chainid]);
6484264901
let firstAtom = ic.firstAtomObjCls.getFirstAtomObj(atoms);
64843-
structHash[firstAtom.structure] = 1;
64902+
if(firstAtom) structHash[firstAtom.structure] = 1;
6484464903
}
6484564904
}
6484664905

@@ -65862,6 +65921,11 @@ var icn3d = (function (exports) {
6586265921

6586365922
ic.drawCls.draw();
6586465923
}
65924+
else if(command == 'add ig labels') {
65925+
ic.residueLabelsCls.addIgLabels(ic.hAtoms);
65926+
65927+
ic.drawCls.draw();
65928+
}
6586565929
else if(command == 'add atom labels') {
6586665930
ic.residueLabelsCls.addAtomLabels(ic.hAtoms);
6586765931

@@ -67188,6 +67252,7 @@ var icn3d = (function (exports) {
6718867252
else if(cmd.indexOf('hide annotation') == 0) return seqAnnoStr + ': checkboxes off';
6718967253
else if(cmd == 'add residue labels') return labelStr + 'per Residue';
6719067254
else if(cmd == 'add residue number labels') return labelStr + 'per Residue & Number';
67255+
else if(cmd == 'add Ig domain labels') return labelStr + 'per Ig Domain';
6719167256
else if(cmd == 'add atom labels') return labelStr + 'per Atom';
6719267257
else if(cmd == 'add chain labels') return labelStr + 'per Chain';
6719367258
else if(cmd == 'add terminal labels') return labelStr + 'N- & C- Termini';
@@ -81692,7 +81757,7 @@ var icn3d = (function (exports) {
8169281757
//even when multiple iCn3D viewers are shown together.
8169381758
this.pre = this.cfg.divid + "_";
8169481759

81695-
this.REVISION = '3.32.0';
81760+
this.REVISION = '3.33.0';
8169681761

8169781762
// In nodejs, iCn3D defines "window = {navigator: {}}"
8169881763
this.bNode = (Object.keys(window).length < 2) ? true : false;

build/icn3d.min.js

Lines changed: 3 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)