CINXE.COM
Accessing OMA Groups
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Accessing OMA Groups</title> <meta name="description" content="The OMA Browser provides orthology predictions among hundreds of complete genomes across all of life"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="keywords" content="orthology,evolutionary gene relations,evolution,paralogy,inference"> <!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(["setCookieDomain", "*.omabrowser.org"]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="https://matomo.sib.swiss/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '6']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <noscript><p><img src="https://matomo.sib.swiss/matomo.php?idsite=6&rec=1" style="border:0;" alt="" /></p></noscript> <!-- End Matomo Code --> <link rel="shortcut icon" href="/static/image/favicon.ico" type="image/x-icon"> <!-- css includes --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Dosis:400,800%7CNoto+Sans:400,700%7CRopa+Sans%7CMaterial+Icons"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha256-eSi1q2PG6J7g7ib17yAaWMcrr5GrtohYChqibrV7PBE=" crossorigin="anonymous"> <link rel="stylesheet" href="/static/css/oma_styles.css"> <!-- js includes --> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/js/bootstrap.bundle.min.js" integrity="sha256-E/V4cWE4qvAeO5MOhjtGtqDzPndRO1LBk8lJ/PR7CA4=" crossorigin="anonymous"></script> <script>const static_root = "/static/";</script> <!-- AA: not sure which of those libs will still be needed. I suspect autocomplete.min.js for sure, rest probably not --> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css"> <script src="/static/js/jquery.autocomplete.min.js"></script> <script id="release_char-data" type="application/json">"E"</script> </head> <body class=""> <nav class="navbar fixed-top navbar-expand-xl bg-light navbar-light topnav"> <div class="logos-navbar mr-auto"> <a href="https://www.sib.swiss/"><img src="/static/image/logo-SIB.png" alt="Logo SIB"/></a> <a href="/oma/home/"><img src="/static/image/logo-oma-mobile.svg" alt="Logo OMA small"/></a> </div> <span class="oma-main-search-header"> <script src="/static/js/vue.js"></script> <style> .button_search { cursor:pointer; align-self: center; height: 100%; background-color: transparent; border: none; margin-right: 4px; margin-left: auto; order: 2; } .button_search:disabled { cursor:not-allowed; } .help_icon { align-self: center; font-size: 1.5em; margin: 4px; cursor: pointer; } .prefix-dropdown { border: none; background-color: transparent; } .vl { border-left: 2px solid grey; margin-left: 4px; margin-right: 4px; } #search_nav_input_part { display: flex; border: 1px solid #eee; font-size: 0.9em; box-sizing: border-box; padding: 0 0 0 4px; border-radius: 500px; } .ml-input{} .sl-input{height: 50px;} .token-input__tag { height: 30px; display: inline-block; margin-right: 10px; background-color: #eee; margin-top: 10px; line-height: 30px; padding: 0 5px; border-radius: 5px; } .token-input__tag > span { cursor: pointer; opacity: 0.75; } .token-input__text { border: none; outline: none; font-size: 0.9em; line-height: 50px; flex-grow: 1; background: transparent; } .token-delete { margin-left: 4px; color: red; } #token-container_search_nav{ overflow: scroll; display: inline; } .ml-token-con{margin-bottom: 8px;} .sl-token-con{white-space: nowrap;} </style> <script type="module"> const {createApp} = Vue window.search_token_vue_search_nav = createApp({ data() { return { tokens: [], //{query: 'HUMAN', single_term: true, prefix: "Species", type: "Taxon"} prefixes: { 'Protein': ['proteinid','xref','go','ec','description','domain','sequence'], 'Taxon': ['species','taxid', 'taxon'], 'HOG': ['hog','sequence'], 'OMA_Group': ['og', 'fingerprint','sequence'], }, default_prefix : 'description', show_error: false, error_message : " Error.", post_query_search_nav: '', multiline: false, wild_card: 'sequence', placeholder: ' "Blue-light photoreceptor" | proteinid:P53_RAT | species:"Drosophila melanogaster" ', //'P53_RAT | Insulin | species:HUMAN | "auxin response factor"', placeholder_default: 'proteinid:P53_RAT | "Blue-light photoreceptor" | species:"Drosophila melanogaster" ' //'P53_RAT | Insulin | species:HUMAN | "auxin response factor"', } }, compilerOptions: { delimiters: ["$[", "]$"] }, methods: { get_list_prefixes(lowercase=false){ let lp = [].concat(...Object.values(this.prefixes)); if (lowercase){ lp = lp.map(element => {return element.toLowerCase();}); } return lp }, get_prefix_used(){ return this.tokens.map(x => this.get_type_prefix(x.prefix)); }, get_type_prefix(prefix){ for (var key in this.prefixes) { if (this.prefixes.hasOwnProperty(key)) { if (this.prefixes[key].includes(prefix.toLowerCase())){ return key } } } return null }, addToken(event) { event.preventDefault() let val = event.target.value.trim(); if (val.length === 0 && this.tokens.length > 0){ this.collect_token() // wanted to auto search if press and empty + token but post request miss post_query data } else { var sinle_term = val[0] !== '"'; var multi_term_closed = (val.length > 1 && val[val.length - 1] === '"') var has_prefix = val.includes(':') var prefix_end = val[val.length - 1] === ':' var p = has_prefix ? val.split(':')[0].toLowerCase() : this.default_prefix; // If prefix but not valid if (has_prefix && !this.get_list_prefixes(true).includes(p.toLowerCase())) { this.show_error = true; this.error_message = "Error: Incorrect prefix." return; } else { this.show_error = false; } // If something typed if (val.length > 0) { // Multiple word query if (!sinle_term) { // STOP if multiple not closed if (!multi_term_closed) { if (event.code === "Space") { event.target.value = val + ' ' } return } } // STOP if the prefix is fine and we are at : if (prefix_end) { return } // has a prefix if (has_prefix) { var tmp = val.split(':')[1].trim() sinle_term = tmp[0] !== '"'; multi_term_closed = (val.length > 1 && tmp[tmp.length - 1] === '"') // multiple term if (!sinle_term) { // STOP if not closed if (!multi_term_closed) { if (event.code === "Space") { event.target.value = val + ' ' } return } } val = tmp } if (this.validate_token(val.replaceAll('"', ''), sinle_term, p)) { val = val.replaceAll('"', '') this.tokens.push({ query: val, single_term: sinle_term, prefix: p, type: this.get_type_prefix(p) }); event.target.value = ''; } } } document.getElementById("token-container_search_nav").scrollLeft += 200000; }, addToken_and_search(event){ this.addToken(event); if (this.tokens.length > 0){ this.collect_token() this.$refs.submit_button.click(); } }, removeToken(index) { this.tokens.splice(index, 1) }, removeLastToken(event) { if (event.target.value.length === 0) { this.removeToken(this.tokens.length - 1) } }, enter_from_input(event) { if (event.target.value.trim().length > 0) {this.addToken(event)} else{ event.target.nextElementSibling.focus().click() } }, collect_token(){ this.post_query_search_nav = JSON.stringify(this.tokens) }, detokenize(index){ var token = this.tokens.splice(index, 1)[0]; var input_token_search = document.getElementById('input_token_search_search_nav'); var token_str = token.prefix + ': ' token_str += token.single_term ? '' : '"' token_str += token.query token_str += token.single_term ? '' : '"' input_token_search.value = token_str }, on_change_prefix(target, t){ var prefix = target.value if (this.validate_token(t.query, t.single_term,prefix, true)){ t.prefix = prefix.toLowerCase() } else { target.value = t.prefix; } }, validate_token(val, sinle_term, p , OnChange=false){ if (this.wild_card.includes(p)){ return true } // todo Validate type val is valid for p // validate prefix not in conflict with other prefix var pu = this.get_prefix_used(); var current_prefix_type = this.get_type_prefix(p) if (current_prefix_type !== 'Taxon'){ var no_taxon = pu.filter(x => x !== 'Taxon'); if (no_taxon.length == 0){return true} else if (OnChange && no_taxon.length == 1){return true} else if (no_taxon.length > 0 && no_taxon.includes(current_prefix_type) ){return true} else if (no_taxon.length > 0 && !no_taxon.includes(current_prefix_type)) { this.show_error = true; this.error_message = "Warning: You are searching for " + no_taxon[0] + "; you can't add a token for " + current_prefix_type return false } } return true }, preload_token(tokens){ this.tokens = [] for (var i in tokens) { var token = tokens[i] if (this.validate_token(token.query, token.sinle_term, token.prefix )){ this.tokens.push({query: token.query, single_term: token.sinle_term, prefix: token.prefix, type:token.type}); } } this.placeholder = ''; this.$refs.input_handle.focus(); }, is_empty(){return this.tokens.length === 0}, modal_clicked(){ $('#exampleModal_search_nav').modal('show') }, format_token_string(str){ if (str.length < 20){return str} return str.slice(0, 20) + '...' } }, }).mount('#search_nav') var autocomplete_opts = { paramName: 'search', serviceUrl: '/api/xref/', minChars: 3, triggerSelectOnValidInput: false, deferRequestBy: 200, transformResult: function (response) { var json = JSON.parse(response); var xref_source_order = ['UniProtKB/SwissProt', 'UniProtKB/TrEMBL', 'Ensembl Protein', 'Ensembl Gene', 'Ensembl Transcript', 'RefSeq', 'EntrezGene', 'FlyBase', 'WormBase', 'EnsemblGenomes', 'NCBI', 'EMBL', 'SourceID', 'SourceAC', 'HGNC', 'Gene Name', 'Synonym', 'Protein Name', 'ORF Name', 'Ordered Locus Name', 'PDB', 'Swiss Model', 'STRING', 'neXtProt', 'Bgee', 'EPD', 'ChEMBL', 'GlyConnect', 'SwissPalm', 'DisGeNET', 'WikiGene', 'IPI', 'GI', 'n/a']; json.sort(function (a, b){ const idx_a = xref_source_order.indexOf(a.source), idx_b = xref_source_order.indexOf(b.source); if (idx_a === idx_b){ return a.xref > b.xref ? 1 : -1; } return idx_a - idx_b; }); return { suggestions: $.map(json, function (dataItem) { return {value: dataItem.xref, data: dataItem}; }) }; }, groupBy: 'source', formatResult: function(suggestion, currentValue) { // Do not replace anything if there current value is empty if (!currentValue) { return suggestion.value; } // escape any special char var pattern = '(' + currentValue.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&") + ')'; var highlight_and_escape = function(val){ return val.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>') .replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"') .replace(/<(\/?strong)>/g, '<$1>'); }; return '<span class="auto-xref">' + highlight_and_escape(suggestion.data.xref) + '</span> ' + '<span class="auto-omaid">' + suggestion.data.omaid + '</span>' + '<span class="auto-species">' + highlight_and_escape(suggestion.data.genome.species) + '</span>'; }, onSelect: function(item){ window.location.href = "/oma/vps/" + item.data.entry_nr; return false; }, response: function( event, ui ) {console.log('HOG')} }; $('#input_token_search_search_nav').autocomplete(autocomplete_opts); </script> <!-- Modal --> <div class="modal fade" data-backdrop="false" id="exampleModal_search_nav" tabindex="-1" aria-labelledby="exampleModalLabelsearch_nav" aria-hidden="true"> <div class="modal-dialog modal-lg modal-dialog-centered" > <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="exampleModalLabelsearch_nav">How to use the search in OMA Browser ?</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body" style="text-align: justify"> <strong>How does the search work?</strong> <p>Input a query in the search field. Everytime you press Space or Enter after a word, a <b>token</b> will be created. The token is composed of a <b>prefix</b> describing how the query should be treated and the actual <b>query</b> itself.</p> <strong>What are the different types of tokens?</strong> <p>Each token represents either a Gene, HOG, OMA group, or Taxon. Prefixes are used to specify which category to associate with the query term. </p> <table class="table table-bordered"> <thead> <tr> <th scope="col">Category</th> <th scope="col">Prefixes</th> </tr> </thead> <tbody> <tr> <th scope="row">Genes</th> <td>id, go, ec, description, domain, sequence</td> </tr> <tr> <th scope="row">HOGs</th> <td>hog, sequence</td> </tr> <tr> <th scope="row">OMA Groups</th> <td>omagroup, fingerprint, sequence</td> </tr> <tr> <th scope="row">Taxon</th> <td>species, taxid, taxon</td> </tr> </tbody> </table> <small>For example, the token [go:4225] will search for genes in the OMA database annotated with the GO:0004225 gene ontology term. </small> <br> <strong>How to search for a multi-word query?</strong> <p>If your query term is composed of multiple words (e.g homo sapiens), use " " to encapsulate it. </p> <strong>How many tokens can I have?</strong> <p>There is no limit on the number of tokens. It is not possible to enter multiple tokens of different categories, except taxon, which can be combined with other categories. For example, you can search for 'hog:60627 species:HUMAN' to return human genes found in HOG:606207. </p> <strong>How to edit/delete a token?</strong> <p>To edit a query, click on it to modify the input field. To edit a prefix, click on the dropdown icon to select another one. To remove a token, click on the x to delete it.</p> <strong>Autosuggest</strong> <p>Typing a query without hitting enter or space will prompt an autosuggestion for the identifier after a few seconds.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <form method="POST" id='form_' action="/oma/search-token/" > <input type="hidden" name="csrfmiddlewaretoken" value="N4hFklyccj0TyQRK6qtYANX0OVj7Wm0qEOUmFg1lSIB9WUoniommEQ2bNJ2sDV9j"> <div id="search_nav"> <div id="search_nav_input_part" :class="multiline ? 'ml-input' : 'sl-input'"> <span class="material-symbols-outlined help_icon" @click="modal_clicked"> help </span> <div id="token-container_search_nav" :class="multiline ? 'ml-token-con' : 'sl-token-con'" > <span v-for="token, index in tokens" :key="token" class="token-input__tag"> <select class="prefix-dropdown" @change="on_change_prefix($event.target, token)"> <template v-for="(prefixes_list, prefix_type) in prefixes"> <optgroup :label="prefix_type" > <option v-for="prefix in prefixes_list" :key="prefix" :selected="prefix == token.prefix"> $[ prefix ]$ </option> </optgroup> </template> </select> <span class="vl"></span> <p style="display: inline" @click='detokenize(index)'> $[ format_token_string(token.query) ]$ </p> <span @click='removeToken(index)' class="token-delete">X</span> </select> </span> </div> <input type="hidden" name="hidden_query" :value="post_query_search_nav"> <input type='text' :placeholder='placeholder' ref="input_handle" class='token-input__text' id="input_token_search_search_nav" @keydown.enter='enter_from_input' @keydown.space='addToken' @keydown.delete='removeLastToken' /> <button class=" button_search float-right" id="button_submit" ref="submit_button" :disabled="is_empty()" @click='collect_token()' type="submit"> <img style='width: 24px;' src="/static/image/logo-oma-o.svg" alt="Logo OMA icon"/> </button> </div> <div style="display: flex" v-show="show_error"> <small style="color: red; margin-right: auto;" > $[this.error_message]$ </small> </div> </div> </form> </span> <button type="button" class="navbar-toggler ml-auto collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span></span> <span></span> <span></span> </button> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <div class="navbar-nav ml-auto"> <div class="search"> <h3>Search</h3> <script src="/static/js/vue.js"></script> <style> .button_search { cursor:pointer; align-self: center; height: 100%; background-color: transparent; border: none; margin-right: 4px; margin-left: auto; order: 2; } .button_search:disabled { cursor:not-allowed; } .help_icon { align-self: center; font-size: 1.5em; margin: 4px; cursor: pointer; } .prefix-dropdown { border: none; background-color: transparent; } .vl { border-left: 2px solid grey; margin-left: 4px; margin-right: 4px; } #search_min_input_part { display: flex; border: 1px solid #eee; font-size: 0.9em; box-sizing: border-box; padding: 0 0 0 4px; border-radius: 500px; } .ml-input{} .sl-input{height: 50px;} .token-input__tag { height: 30px; display: inline-block; margin-right: 10px; background-color: #eee; margin-top: 10px; line-height: 30px; padding: 0 5px; border-radius: 5px; } .token-input__tag > span { cursor: pointer; opacity: 0.75; } .token-input__text { border: none; outline: none; font-size: 0.9em; line-height: 50px; flex-grow: 1; background: transparent; } .token-delete { margin-left: 4px; color: red; } #token-container_search_min{ overflow: scroll; display: inline; } .ml-token-con{margin-bottom: 8px;} .sl-token-con{white-space: nowrap;} </style> <script type="module"> const {createApp} = Vue window.search_token_vue_search_min = createApp({ data() { return { tokens: [], //{query: 'HUMAN', single_term: true, prefix: "Species", type: "Taxon"} prefixes: { 'Protein': ['proteinid','xref','go','ec','description','domain','sequence'], 'Taxon': ['species','taxid', 'taxon'], 'HOG': ['hog','sequence'], 'OMA_Group': ['og', 'fingerprint','sequence'], }, default_prefix : 'description', show_error: false, error_message : " Error.", post_query_search_min: '', multiline: false, wild_card: 'sequence', placeholder: ' "Blue-light photoreceptor" | proteinid:P53_RAT | species:"Drosophila melanogaster" ', //'P53_RAT | Insulin | species:HUMAN | "auxin response factor"', placeholder_default: 'proteinid:P53_RAT | "Blue-light photoreceptor" | species:"Drosophila melanogaster" ' //'P53_RAT | Insulin | species:HUMAN | "auxin response factor"', } }, compilerOptions: { delimiters: ["$[", "]$"] }, methods: { get_list_prefixes(lowercase=false){ let lp = [].concat(...Object.values(this.prefixes)); if (lowercase){ lp = lp.map(element => {return element.toLowerCase();}); } return lp }, get_prefix_used(){ return this.tokens.map(x => this.get_type_prefix(x.prefix)); }, get_type_prefix(prefix){ for (var key in this.prefixes) { if (this.prefixes.hasOwnProperty(key)) { if (this.prefixes[key].includes(prefix.toLowerCase())){ return key } } } return null }, addToken(event) { event.preventDefault() let val = event.target.value.trim(); if (val.length === 0 && this.tokens.length > 0){ this.collect_token() // wanted to auto search if press and empty + token but post request miss post_query data } else { var sinle_term = val[0] !== '"'; var multi_term_closed = (val.length > 1 && val[val.length - 1] === '"') var has_prefix = val.includes(':') var prefix_end = val[val.length - 1] === ':' var p = has_prefix ? val.split(':')[0].toLowerCase() : this.default_prefix; // If prefix but not valid if (has_prefix && !this.get_list_prefixes(true).includes(p.toLowerCase())) { this.show_error = true; this.error_message = "Error: Incorrect prefix." return; } else { this.show_error = false; } // If something typed if (val.length > 0) { // Multiple word query if (!sinle_term) { // STOP if multiple not closed if (!multi_term_closed) { if (event.code === "Space") { event.target.value = val + ' ' } return } } // STOP if the prefix is fine and we are at : if (prefix_end) { return } // has a prefix if (has_prefix) { var tmp = val.split(':')[1].trim() sinle_term = tmp[0] !== '"'; multi_term_closed = (val.length > 1 && tmp[tmp.length - 1] === '"') // multiple term if (!sinle_term) { // STOP if not closed if (!multi_term_closed) { if (event.code === "Space") { event.target.value = val + ' ' } return } } val = tmp } if (this.validate_token(val.replaceAll('"', ''), sinle_term, p)) { val = val.replaceAll('"', '') this.tokens.push({ query: val, single_term: sinle_term, prefix: p, type: this.get_type_prefix(p) }); event.target.value = ''; } } } document.getElementById("token-container_search_nav").scrollLeft += 200000; }, addToken_and_search(event){ this.addToken(event); if (this.tokens.length > 0){ this.collect_token() this.$refs.submit_button.click(); } }, removeToken(index) { this.tokens.splice(index, 1) }, removeLastToken(event) { if (event.target.value.length === 0) { this.removeToken(this.tokens.length - 1) } }, enter_from_input(event) { if (event.target.value.trim().length > 0) {this.addToken(event)} else{ event.target.nextElementSibling.focus().click() } }, collect_token(){ this.post_query_search_min = JSON.stringify(this.tokens) }, detokenize(index){ var token = this.tokens.splice(index, 1)[0]; var input_token_search = document.getElementById('input_token_search_search_min'); var token_str = token.prefix + ': ' token_str += token.single_term ? '' : '"' token_str += token.query token_str += token.single_term ? '' : '"' input_token_search.value = token_str }, on_change_prefix(target, t){ var prefix = target.value if (this.validate_token(t.query, t.single_term,prefix, true)){ t.prefix = prefix.toLowerCase() } else { target.value = t.prefix; } }, validate_token(val, sinle_term, p , OnChange=false){ if (this.wild_card.includes(p)){ return true } // todo Validate type val is valid for p // validate prefix not in conflict with other prefix var pu = this.get_prefix_used(); var current_prefix_type = this.get_type_prefix(p) if (current_prefix_type !== 'Taxon'){ var no_taxon = pu.filter(x => x !== 'Taxon'); if (no_taxon.length == 0){return true} else if (OnChange && no_taxon.length == 1){return true} else if (no_taxon.length > 0 && no_taxon.includes(current_prefix_type) ){return true} else if (no_taxon.length > 0 && !no_taxon.includes(current_prefix_type)) { this.show_error = true; this.error_message = "Warning: You are searching for " + no_taxon[0] + "; you can't add a token for " + current_prefix_type return false } } return true }, preload_token(tokens){ this.tokens = [] for (var i in tokens) { var token = tokens[i] if (this.validate_token(token.query, token.sinle_term, token.prefix )){ this.tokens.push({query: token.query, single_term: token.sinle_term, prefix: token.prefix, type:token.type}); } } this.placeholder = ''; this.$refs.input_handle.focus(); }, is_empty(){return this.tokens.length === 0}, modal_clicked(){ $('#exampleModal_search_min').modal('show') }, format_token_string(str){ if (str.length < 20){return str} return str.slice(0, 20) + '...' } }, }).mount('#search_min') var autocomplete_opts = { paramName: 'search', serviceUrl: '/api/xref/', minChars: 3, triggerSelectOnValidInput: false, deferRequestBy: 200, transformResult: function (response) { var json = JSON.parse(response); var xref_source_order = ['UniProtKB/SwissProt', 'UniProtKB/TrEMBL', 'Ensembl Protein', 'Ensembl Gene', 'Ensembl Transcript', 'RefSeq', 'EntrezGene', 'FlyBase', 'WormBase', 'EnsemblGenomes', 'NCBI', 'EMBL', 'SourceID', 'SourceAC', 'HGNC', 'Gene Name', 'Synonym', 'Protein Name', 'ORF Name', 'Ordered Locus Name', 'PDB', 'Swiss Model', 'STRING', 'neXtProt', 'Bgee', 'EPD', 'ChEMBL', 'GlyConnect', 'SwissPalm', 'DisGeNET', 'WikiGene', 'IPI', 'GI', 'n/a']; json.sort(function (a, b){ const idx_a = xref_source_order.indexOf(a.source), idx_b = xref_source_order.indexOf(b.source); if (idx_a === idx_b){ return a.xref > b.xref ? 1 : -1; } return idx_a - idx_b; }); return { suggestions: $.map(json, function (dataItem) { return {value: dataItem.xref, data: dataItem}; }) }; }, groupBy: 'source', formatResult: function(suggestion, currentValue) { // Do not replace anything if there current value is empty if (!currentValue) { return suggestion.value; } // escape any special char var pattern = '(' + currentValue.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&") + ')'; var highlight_and_escape = function(val){ return val.replace(new RegExp(pattern, 'gi'), '<strong>$1<\/strong>') .replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"') .replace(/<(\/?strong)>/g, '<$1>'); }; return '<span class="auto-xref">' + highlight_and_escape(suggestion.data.xref) + '</span> ' + '<span class="auto-omaid">' + suggestion.data.omaid + '</span>' + '<span class="auto-species">' + highlight_and_escape(suggestion.data.genome.species) + '</span>'; }, onSelect: function(item){ window.location.href = "/oma/vps/" + item.data.entry_nr; return false; }, response: function( event, ui ) {console.log('HOG')} }; $('#input_token_search_search_min').autocomplete(autocomplete_opts); </script> <!-- Modal --> <div class="modal fade" data-backdrop="false" id="exampleModal_search_min" tabindex="-1" aria-labelledby="exampleModalLabelsearch_min" aria-hidden="true"> <div class="modal-dialog modal-lg modal-dialog-centered" > <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="exampleModalLabelsearch_min">How to use the search in OMA Browser ?</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body" style="text-align: justify"> <strong>How does the search work?</strong> <p>Input a query in the search field. Everytime you press Space or Enter after a word, a <b>token</b> will be created. The token is composed of a <b>prefix</b> describing how the query should be treated and the actual <b>query</b> itself.</p> <strong>What are the different types of tokens?</strong> <p>Each token represents either a Gene, HOG, OMA group, or Taxon. Prefixes are used to specify which category to associate with the query term. </p> <table class="table table-bordered"> <thead> <tr> <th scope="col">Category</th> <th scope="col">Prefixes</th> </tr> </thead> <tbody> <tr> <th scope="row">Genes</th> <td>id, go, ec, description, domain, sequence</td> </tr> <tr> <th scope="row">HOGs</th> <td>hog, sequence</td> </tr> <tr> <th scope="row">OMA Groups</th> <td>omagroup, fingerprint, sequence</td> </tr> <tr> <th scope="row">Taxon</th> <td>species, taxid, taxon</td> </tr> </tbody> </table> <small>For example, the token [go:4225] will search for genes in the OMA database annotated with the GO:0004225 gene ontology term. </small> <br> <strong>How to search for a multi-word query?</strong> <p>If your query term is composed of multiple words (e.g homo sapiens), use " " to encapsulate it. </p> <strong>How many tokens can I have?</strong> <p>There is no limit on the number of tokens. It is not possible to enter multiple tokens of different categories, except taxon, which can be combined with other categories. For example, you can search for 'hog:60627 species:HUMAN' to return human genes found in HOG:606207. </p> <strong>How to edit/delete a token?</strong> <p>To edit a query, click on it to modify the input field. To edit a prefix, click on the dropdown icon to select another one. To remove a token, click on the x to delete it.</p> <strong>Autosuggest</strong> <p>Typing a query without hitting enter or space will prompt an autosuggestion for the identifier after a few seconds.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <form method="POST" id='form_' action="/oma/search-token/" > <input type="hidden" name="csrfmiddlewaretoken" value="N4hFklyccj0TyQRK6qtYANX0OVj7Wm0qEOUmFg1lSIB9WUoniommEQ2bNJ2sDV9j"> <div id="search_min"> <div id="search_min_input_part" :class="multiline ? 'ml-input' : 'sl-input'"> <span class="material-symbols-outlined help_icon" @click="modal_clicked"> help </span> <div id="token-container_search_min" :class="multiline ? 'ml-token-con' : 'sl-token-con'" > <span v-for="token, index in tokens" :key="token" class="token-input__tag"> <select class="prefix-dropdown" @change="on_change_prefix($event.target, token)"> <template v-for="(prefixes_list, prefix_type) in prefixes"> <optgroup :label="prefix_type" > <option v-for="prefix in prefixes_list" :key="prefix" :selected="prefix == token.prefix"> $[ prefix ]$ </option> </optgroup> </template> </select> <span class="vl"></span> <p style="display: inline" @click='detokenize(index)'> $[ format_token_string(token.query) ]$ </p> <span @click='removeToken(index)' class="token-delete">X</span> </select> </span> </div> <input type="hidden" name="hidden_query" :value="post_query_search_min"> <input type='text' :placeholder='placeholder' ref="input_handle" class='token-input__text' id="input_token_search_search_min" @keydown.enter='enter_from_input' @keydown.space='addToken' @keydown.delete='removeLastToken' /> <button class=" button_search float-right" id="button_submit" ref="submit_button" :disabled="is_empty()" @click='collect_token()' type="submit"> <img style='width: 24px;' src="/static/image/logo-oma-o.svg" alt="Logo OMA icon"/> </button> </div> <div style="display: flex" v-show="show_error"> <small style="color: red; margin-right: auto;" > $[this.error_message]$ </small> </div> </div> </form> </div> <ul class="navbar-nav"> <!-- explore dropdown --> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle text-nowrap" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Explore <span class="caret"></span></a> <div class="dropdown-menu" role="menu"> <a class="dropdown-item" href="/oma/release/">Species/release information</a> <a class="dropdown-item" href="/oma/phylostratigraphy/">Phylostratigraphy</a> <div class="dropdown-divider"></div> <div role="presentation" class="dropdown-header">Quick access to</div> <a class="dropdown-item" href="/oma/genome/">Extant and Ancestral genomes</a> <a class="dropdown-item" href="/oma/landOMA/">OMA groups</a> <a class="dropdown-item" href="/oma/hogs/">Hierarchical orthologous groups (HOGs)</a> <a class="dropdown-item" href="/oma/landAnnotation/">Functional annotations</a> <a class="dropdown-item" href="/oma/synteny/">Local synteny</a> </div> </li> <!-- compute dropdown --> <li class="nav-item dropdown"> <a href="#" class="nav-link dropdown-toggle text-nowrap" data-toggle="dropdown">Tools <span class="caret"></span></a> <div class="dropdown-menu" role="menu"> <div role="presentation" class="dropdown-header">Online tools</div> <a class="dropdown-item" href="/oma/fastmapping/">Fast mapping</a> <a class="dropdown-item" href="/oma/functions/">Functional prediction</a> <a class="dropdown-item" href="/oma/dotplot/">Synteny dotplot</a> <a class="dropdown-item" href="/oma/genomePW/">Genome pair orthology</a> <a class="dropdown-item" href="/oma/go_enrichment/">GO enrichment analysis</a> <a class="dropdown-item" href="/oma/omamo/search/">OMA-MO: Find model organism</a> <a class="dropdown-item" href="https://omark.omabrowser.org">OMArk: Assess proteome quality</a> <div class="dropdown-divider"></div> <div role="presentation" class="dropdown-header">Software</div> <a class="dropdown-item" href="https://omabrowser.org/standalone/">OMA StandAlone</a> <a class="dropdown-item" href="https://github.com/dessimozlab/read2tree">read2tree</a> <a class="dropdown-item" href="https://github.com/dessimozlab/FastOMA">FastOMA</a> <a class="dropdown-item" href="https://github.com/dessimozlab/pyham">pyHam</a> <div class="dropdown-divider"></div> <div role="presentation" class="dropdown-header">Visualisation tools</div> <a class="dropdown-item" href="https://phylo.io/">Phylo.io</a> <a class="dropdown-item" href="https://github.com/dessimozlab/iham">IHam</a> <div class="dropdown-divider"></div> <a class="dropdown-item text-center" href="/oma/tools/"><b> <i class="fas fa-toolbox"></i> See all OMA tools</b></a> </div> </li> <!-- Download dropdown --> <li class="nav-item dropdown"> <a href="#" class="nav-link dropdown-toggle text-nowrap" data-toggle="dropdown">Download <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <div role="presentation" class="dropdown-header">OMA database files</div> <a class="dropdown-item" href="/oma/current/">Current release</a> <a class="dropdown-item" href="/oma/export/">Export All/All</a> <a class="dropdown-item" href="/oma/export_markers">Export marker genes</a> <a class="dropdown-item" href="/oma/archives/">Archives</a> <div class="dropdown-divider"></div> <div role="presentation" class="dropdown-header">API</div> <a class="dropdown-item" href="/api/docs">OMA API</a> <a class="dropdown-item" href="/oma/APISOAP/">SOAP</a> <a class="dropdown-item" href="https://bioconductor.org/packages/release/bioc/html/OmaDB.html">R API binding</a> <a class="dropdown-item" href="https://github.com/DessimozLab/pyomadb">Python API binding</a> <div class="dropdown-divider"></div> <div role="presentation" class="dropdown-header">Semantic web</div> <a class="dropdown-item" href="https://sparql.omabrowser.org/">SPARQL endpoint</a> <div class="dropdown-divider"></div> <a class="dropdown-item text-center" href="/oma/uses/"><b> <i class="fas fa-keyboard"></i> Access the OMA data</b></a> </ul> </li> <!-- Help dropdown --> <li class="nav-item dropdown"> <a href="#" class="nav-link dropdown-toggle text-nowrap" data-toggle="dropdown">Help <span class="caret"></span></a> <ul class="dropdown-menu dropdown-menu-right" role="menu"> <a class="dropdown-item" href="/oma/about/">Introduction</a> <a class="dropdown-item" href="/oma/type/">Orthology Basics</a> <a class="dropdown-item" href="/oma/homologs/">Type of homologs</a> <a class="dropdown-item" href="/oma/uses/">Access the OMA data</a> <a class="dropdown-item" href="/oma/tools/">Catalog of tools</a> <a class="dropdown-item" href="/oma/suggestion/genome/">Suggesting a genome</a> <a class="dropdown-item" href="/oma/FAQ/">FAQ</a> <a class="dropdown-item" href="https://www.biostars.org/tag/oma/">Q&A on BioStars</a> <a class="dropdown-item " href="/oma/glossary/"> Glossary</a> <div class="dropdown-divider"></div> <a class="dropdown-item text-center" href="/oma/academy/"><b> <i class="fas fa-book"></i> OMA Academy</b></a> </ul> </li> <!-- about dropdown --> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle text-nowrap" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">About <span class="caret"></span></a> <div class="dropdown-menu dropdown-menu-right" role="menu"> <a class="dropdown-item" href="/oma/about/">OMA</a> <a class="dropdown-item" href="/oma/team/">Team</a> <a class="dropdown-item" href="/oma/sab/">SAB</a> <a class="dropdown-item" href="/oma/funding/">Funding</a> <a class="dropdown-item" href="/oma/terms_of_use/">Terms of use</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="mailto:contact@omabrowser.org"><span class="glyphicon glyphicon-envelope"></span> Contact</a> </div> </li> </ul> </div> </div> </nav> <div id="oma-generic-container"> <div class="container"> <div class="jumbotron"> <h1>OMA groups</h1> <div class="oma-seperator"> <span class="colour1"></span> <span class="colour2"></span> <span class="colour3"></span> </div> <div class="card card-header-oma"> <div class="card-body "> <p class="text-justify">OMA groups are groups of protein sequences that are inferred to be related exclusively by speciation events. Consequently, there is at most one sequence per species in each OMA group. By convention, each sequence belongs to at most one OMA group.</p> <p class="text-justify">For an alternative, more inclusive definition of orthologous groups, consider using <a href="/oma/hogs/">hierarchical orthologous groups</a>.</p> <br> <h5 > <strong> Search an OMA group</strong></h5> <br> <form class="form-horizontal" role="search" action="/oma/search/" method="GET"> <input type="hidden" name="type" value="group_fingerprint"/> <div class="form-group form-row"> <label for="textG1" class="col-sm-3 col-form-label control-label text-right">Fingerprint (stable across releases): </label> <div class="col-sm-8 no-gutters"> <div class="input-group col mb-2"> <input id='textG1' name="query" type="text" class="form-control"> <div class="input-group-append"> <button class="btn btn-outline-secondary" type="submit"><i class="fas fa-search"></i></button> </div> </div> </div> <div class="col-md-8 offset-sm-3"> <span class="font-weight-bold">Example: </span> <a href="#" class="text-muted" id='exFinger'>DERCRQP</a> </div> </div> </form> <br> <form class="form-horizontal" role="search" action="/oma/search/" method="GET"> <input type="hidden" name="type" value="group_groupid"/> <div class="form-group form-row"> <label for="textG2" class="col-sm-3 col-form-label control-label text-right">Group number (not stable across releases): </label> <div class="col-sm-8 no-gutters"> <div class="input-group col mb-2"> <input id='textG2' name="query" type="text" class="form-control"> <div class="input-group-append"> <button class="btn btn-outline-secondary" type="submit"><i class="fas fa-search"></i></span></button> </div> </div> </div> <div class="col-md-8 offset-sm-3"> <span class="font-weight-bold">Example: </span> <a href="#" class="text-muted" id='exNumber'>70525</a> </div> </div> </form> <br> <h5> <strong>Marker Genes</strong></h5> <div> <p>OMA Groups are useful for species tree reconstruction. You can <a href="/oma/export_markers">export a set of marker genes</a> for a subset of species of your choice.</p> </div> </div> </div> </div> </div> </div> <script type="text/javascript"> function OpenInNewTab(url) { var win = window.open(url, '_blank'); win.focus(); } $('#exNumber').click( function() { $('#textG2').val($(this).text()).focus(); }); $('#exFinger').click( function() { $('#textG1').val($(this).text()).focus(); }); </script> </body> </html>