Difference between revisions of "Template:GO"

From blackwiki
Jump to navigation Jump to search
imported>Artoria2e5
imported>Artoria2e5
 
Line 2: Line 2:
 
   If we are seeing the full format, make a link
 
   If we are seeing the full format, make a link
 
-->[{{#switch:{{{provider|}}}|quickgo=https://www.ebi.ac.uk/QuickGO/term/{{{1}}}|amigo|#default=http://amigo.geneontology.org/amigo/term/{{{1}}}}} {{#if:{{{label|}}}|{{{1}}}: {{{label}}}|{{{1}}}}}]|<!--
 
-->[{{#switch:{{{provider|}}}|quickgo=https://www.ebi.ac.uk/QuickGO/term/{{{1}}}|amigo|#default=http://amigo.geneontology.org/amigo/term/{{{1}}}}} {{#if:{{{label|}}}|{{{1}}}: {{{label}}}|{{{1}}}}}]|<!--
−
   Throw error
+
   Try rescue naked, else throw
−
-->{{error|GO term must start with GO:}}<includeonly>[[Category:GO template errors]]</includeonly>}}<noinclude>
+
-->{{#iferror:{{#invoke:String|match|{{{1|}}}|^%d%d%d%d%d%d%d$}}|{{error|GO term must start with GO: or be exactly seven digits}}|[{{#switch:{{{provider|}}}|quickgo=https://www.ebi.ac.uk/QuickGO/term/GO:{{{1}}}|amigo|#default=http://amigo.geneontology.org/amigo/term/GO:{{{1}}}}} {{#if:{{{label|}}}|GO:{{{1}}}: {{{label}}}|GO:{{{1}}}}}]}}
 +
 
 +
<includeonly>[[Category:GO template errors]]</includeonly>}}<noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 15:12, 8 December 2020

GO term must start with GO: or be exactly seven digits

Template documentation[view] [edit] [history] [purge]

Usage

This template provides an external link to define a Gene Ontology code. For example, {{GO|GO:0004022}} is shown as:

GO term must start with GO: or be exactly seven digits

whereas {{GO|GO:0004022|label=alcohol dehydrogenase}} is shown as:

GO term must start with GO: or be exactly seven digits

Tracking category

See also