Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/EBI-7778189.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"data":[{"object":"interactor","id":"uniprotkb_P03070","sequence":"MDKVLNREESLQLMDLLGLERSAWGNIPLMRKAYLKKCKEFHPDKGGDEEKMKKMNTLYKKMEDGVKYAHQPDFGGFWDATEIPTYGTDEWEQWWNAFNEENLFCSEEMPSSDDEATADSQHSTPPKKKRKVEDPKDFPSELLSFLSHAVFSNRTLACFAIYTTKEKAALLYKKIMEKYSVTFISRHNSYNHNILFFLTPHRHRVSAINNYAQKLCTFSFLICKGVNKEYLMYSALTRDPFSVIEESLPGGLKEHDFNPEEAEETKQVSWKLVTEYAMETKCDDVLLLLGMYLEFQYSFEMCLKCIKKEQPSHYKYHEKHYANAAIFADSKNQKTICQQAVDTVLAKKRVDSLQLTREQMLTNRFNDLLDRMDIMFGSTGSADIEEWMAGVAWLHCLLPKMDSVVYDFLKCMVYNIPKKRYWLFKGPIDSGKTTLAAALLELCGGKALNVNLPLDRLNFELGVAIDQFLVVFEDVKGTGGESRDLPSGQGINNLDNLRDYLDGSVKVNLEKKHLNKRTQIFPPGIVTMNEYSVPKTLQARFVKQIDFRPKDYLKHCLERSEFLLEKRIIQSGIALLLMLIWYRPVAEFAQSIQSRIVEWKERLDKEFSLSVYQKMKFNVAMGIGVLDWLRNSDDDDEDSQENADKNEDGGEKNMEDSGHETGIDSQSQGSFQAPQSSQSVHDHNQPYHICRGFTCFKKPPTPPPEPET","type":{"id":"MI:0326","name":"protein"},"organism":{"taxid":"1891767","common":"sv40","scientific":"Simian virus 40"},"identifier":{"db":"uniprotkb","id":"P03070"},"label":"lt_sv40"},{"object":"interactor","id":"uniprotkb_P06400","sequence":"MPPKTPRKTAATAAAAAAEPPAPPPPPPPEEDPEQDSGPEDLPLVRLEFEETEEPDFTALCQKLKIPDHVRERAWLTWEKVSSVDGVLGGYIQKKKELWGICIFIAAVDLDEMSFTFTELQKNIEISVHKFFNLLKEIDTSTKVDNAMSRLLKKYDVLFALFSKLERTCELIYLTQPSSSISTEINSALVLKVSWITFLLAKGEVLQMEDDLVISFQLMLCVLDYFIKLSPPMLLKEPYKTAVIPINGSPRTPRRGQNRSARIAKQLENDTRIIEVLCKEHECNIDEVKNVYFKNFIPFMNSLGLVTSNGLPEVENLSKRYEEIYLKNKDLDARLFLDHDKTLQTDSIDSFETQRTPRKSNLDEEVNVIPPHTPVRTVMNTIQQLMMILNSASDQPSENLISYFNNCTVNPKESILKRVKDIGYIFKEKFAKAVGQGCVEIGSQRYKLGVRLYYRVMESMLKSEEERLSIQNFSKLLNDNIFHMSLLACALEVVMATYSRSTSQNLDSGTDLSFPWILNVLNLKAFDFYKVIESFIKAEGNLTREMIKHLERCEHRIMESLAWLSDSPLFDLIKQSKDREGPTDHLESACPLNLPLQNNHTAADMYLSPVRSPKKKGSTTRVNSTANAETQATSAFQTQKPLKSTSLSLFYKKVYRLAYLRLNTLCERLLSEHPELEHIIWTLFQHTLQNEYELMRDRHLDQIMMCSMYGICKVKNIDLKFKIIVTAYKDLPHAVQETFKRVLIKEEEYDSIIVFYNSVFMQRLKTNILQYASTRPPTLSPIPHIPRSPYKFPSSPLRIPGGNIYISPLKSPYKISEGLPTPTKMTPRSRILVSIGESFGTSEKFQKINQMVCNSDRVLKRSAEGSNPPKPLKKLRFDIEGSDEADGSKHLPGESKFQQKLAEMTSTRTRMQKQKMNDSMDTSNKEEK","type":{"id":"MI:0326","name":"protein"},"organism":{"taxid":"9606","common":"human","scientific":"Homo sapiens"},"identifier":{"db":"uniprotkb","id":"P06400"},"label":"RB1"},{"object":"interaction","id":"mint_MINT-25007","interactionType":{"id":"MI:0407","name":"direct interaction"},"experiment":{"detmethod":{"id":"MI:0114","name":"x-ray crystallography"},"host":{"taxid":"-1","common":"in vitro","scientific":"In vitro"},"pubid":[{"db":"intact","id":"EBI-7778122"},{"db":"doi","id":"10.1093\/emboj\/20.1.295"},{"db":"mint","id":"MINT-468745"},{"db":"mint","id":"MINT-5213599"},{"db":"pubmed","id":"11226179"}],"sourceDatabase":{"id":"MI:0471","name":"MINT, Dpt of Biology, University of Rome Tor Vergata"}},"identifiers":[{"db":"mint","id":"MINT-25007"},{"db":"intact","id":"EBI-7778189"}],"participants":[{"id":"1","interactorRef":"uniprotkb_P03070","stoichiometry":"1","bioRole":{"id":"MI:0499","name":"unspecified role"},"expRole":{"id":"MI:0499","name":"unspecified role"},"identificationMethods":[{"id":"MI:0396","name":"predetermined participant"},{"id":"MI:0078","name":"nucleotide sequence identification"}],"features":[{"id":"2","name":"tagged molecule","category":"experimentalFeatures","type":{"id":"MI:0507","name":"tag"},"sequenceData":[{"pos":"?-?","interactorRef":"uniprotkb_P03070","participantRef":"1"}]}]},{"id":"3","interactorRef":"uniprotkb_P06400","stoichiometry":"1","bioRole":{"id":"MI:0499","name":"unspecified role"},"expRole":{"id":"MI:0499","name":"unspecified role"},"identificationMethods":[{"id":"MI:0396","name":"predetermined participant"},{"id":"MI:0078","name":"nucleotide sequence identification"}],"features":[{"id":"4","name":"tagged molecule","category":"experimentalFeatures","type":{"id":"MI:0507","name":"tag"},"sequenceData":[{"pos":"?-?","interactorRef":"uniprotkb_P06400","participantRef":"3"}]}]}]}]}
5 changes: 5 additions & 0 deletions data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,10 @@ const exampleIndex = [
"ac": "EBI-29795992",
"name": "EBI-29795992",
"url": "",
},
{
"ac": "EBI-7778189",
"name": "EBI-7778189",
"url": "https://www.ebi.ac.uk/intact/complex/detail/EBI-7778189"
}
];
2 changes: 1 addition & 1 deletion dist/complexviewer.js

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
autocomplete="off"
onchange="setAnnotations(this);">
<label for="superfamily"> Superfamily</label>
<input type="checkbox" id="disprot" name="disprot" value="DisProt"
autocomplete="off"
onchange="setAnnotations(this);">
<label for="disprot"> DisProt</label>
<input type="checkbox" id="interactor" name="interactor" value="Interactor"
autocomplete="off"
onchange="setAnnotations(this);">
Expand All @@ -125,15 +129,15 @@

<div class="logo-bar space-between">
<a class="logo" href="https://rappsilberlab.org/" target="_blank"><img src="images/logos/rappsilber-logo.png"
alt="Rappsilber Laboratory"></a>
alt="Rappsilber Laboratory"></a>
<a class="logo" href="https://www.ed.ac.uk/" target="_blank"><img src="./images/logos/eduni.jpeg"
alt="Edinburgh University"></a>
alt="Edinburgh University"></a>
<a class="logo" href="https://www.wcb.ed.ac.uk/" target="_blank"><img src="images/logos/wtccb.png"
alt="Wellcome Trust Centre for Cell Biology"></a>
alt="Wellcome Trust Centre for Cell Biology"></a>
<a class="logo" href="https://www.ebi.ac.uk/" target="_blank"><img src="images/logos/ebi-logo.jpeg"
alt="European Bioinformatics Institute"></a>
alt="European Bioinformatics Institute"></a>
<a class="logo" href="https://intermine.org/" target="_blank"><img src="./images/logos/intermine.png"
alt="Intermine"></a>
alt="Intermine"></a>
<a class="logo" href="https://www.cam.ac.uk/" target="_blank"><img src="./images/logos/cambridge-blue.png"
alt="Cambridge University"></a>
</div>
Expand Down Expand Up @@ -201,19 +205,17 @@
tc1.style.width = "45px";
const tc2 = tr.insertCell();
const color = legendEntry.uncertain.color
tc2.style.background = "repeating-linear-gradient(45deg, #ffffff, #ffffff 6px, "+color+" 6px, "+color+" 12px)";
tc2.style.background = "repeating-linear-gradient(45deg, #ffffff, #ffffff 6px, " + color + " 6px, " + color + " 12px)";
tc2.style.width = "45px";
}
else if (legendEntry.certain) {
} else if (legendEntry.certain) {
const tc1 = tr.insertCell();
tc1.style.backgroundColor = legendEntry.certain.color;
tc1.style.width = "90px";
tc1.colSpan = 2;
}
else if (legendEntry.uncertain) {
} else if (legendEntry.uncertain) {
const tc1 = tr.insertCell();
const color = legendEntry.uncertain.color
tc1.style.background = "repeating-linear-gradient(45deg, #ffffff, #ffffff 6px, "+color+" 6px, "+color+" 12px)";
tc1.style.background = "repeating-linear-gradient(45deg, #ffffff, #ffffff 6px, " + color + " 6px, " + color + " 12px)";
tc1.style.width = "90px";
tc1.colSpan = 2;
}
Expand Down
42 changes: 32 additions & 10 deletions src/js/annotation-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,18 @@ export function fetchAnnotations(/*App*/ app, callback) {
const molCount = proteins.length;

for (let prot of proteins) {
protsAnnotated++;
const uniprotAccRegex = new RegExp("[OPQ][0-9][A-Z0-9]{3}[0-9]|[A-NR-Z][0-9]([A-Z][A-Z0-9]{2}[0-9]){1,2}![-]", "i");
const match = uniprotAccRegex.exec(prot.json.identifier.id);
if (match && match[0] === prot.json.identifier.id.trim()) {
getSuperFamFeatures(prot, function () {
protsAnnotated++;
if (protsAnnotated === molCount) {
callback();
}
getSuperFamFeatures(prot, () => {
if (protsAnnotated === molCount) callback();
});
getUniProtFeatures(prot, function () {
protsAnnotated++;
if (protsAnnotated === molCount) {
callback();
}
getUniProtFeatures(prot, () => {
if (protsAnnotated === molCount) callback();
});
getDisProtFeatures(prot, () => {
if (protsAnnotated === molCount) callback();
});
}
}
Expand All @@ -51,6 +49,30 @@ function getUniProtFeatures(prot, callback) {
});
}

const DISPROT_TYPE_TO_NAME = new Map([
['D', 'Disorder'],
['T', 'Transition'],
['F', 'Function']
]);

function getDisProtFeatures(prot, callback) {
const url = `https://disprot.org/api/search?page_size=1&page=0&release=current&show_ambiguous=false&show_obsolete=false&acc=${prot.json.identifier.id.trim()}`;
d3.json(url).then(json => {
let annotations = prot.annotationSets.get("DisProt");
if (typeof annotations === "undefined") {
annotations = [];
prot.annotationSets.set("DisProt", annotations);
}
if (json) {
for (let feature of (json.data[0]?.['disprot_consensus']?.['Structural state'] || [])) {
const anno = new Annotation(DISPROT_TYPE_TO_NAME.get(feature.type), new SequenceDatum(null, `${feature.start}-${feature.end}`));
annotations.push(anno);
}
}
callback();
});
}


function getSuperFamFeatures(prot, callback) {
const url = `https://supfam.org/SUPERFAMILY/cgi-bin/das/up/features?segment=${prot.json.identifier.id.trim()}`;
Expand Down