<p>Using the UniProt website API (<a href="https://www.uniprot.org/help/api" rel="nofollow noreferrer">https://www.uniprot.org/help/api</a>) this could be done with a query like</p>
<p><a href="https://www.uniprot.org/uniprot/?query=name%3A%22type%20IV%20secretion%20protein%20Rhs%22&amp;columns=id%2Centry%20name%2Creviewed%2Cprotein%20names%2Cgenes%2Cgo(biological%20process)%2Cgo(molecular%20function)%2Cgo(cellular%20component)&amp;sort=score" rel="nofollow noreferrer">https://www.uniprot.org/uniprot/?query=name%3A%22type%20IV%20secretion%20protein%20Rhs%22&amp;columns=id%2Centry%20name%2Creviewed%2Cprotein%20names%2Cgenes%2Cgo(biological%20process)%2Cgo(molecular%20function)%2Cgo(cellular%20component)&amp;sort=score</a></p>
<p>or, in tab-separated format:</p>
<p><a href="https://www.uniprot.org/uniprot/?query=name:%22type%20IV%20secretion%20protein%20Rhs%22&amp;format=tab&amp;limit=10&amp;columns=id,entry%20name,reviewed,protein%20names,genes,go(biological%20process),go(molecular%20function),go(cellular%20component)&amp;sort=score" rel="nofollow noreferrer">https://www.uniprot.org/uniprot/?query=name:%22type%20IV%20secretion%20protein%20Rhs%22&amp;format=tab&amp;limit=10&amp;columns=id,entry%20name,reviewed,protein%20names,genes,go(biological%20process),go(molecular%20function),go(cellular%20component)&amp;sort=score</a></p>
<p>(Remove the &quot;&amp;limit=10&quot; part from the URL to obtain the full set instead of the first 10 entries.)</p>
<p>You can add colums as described here:
<a href="https://www.uniprot.org/help/customize" rel="nofollow noreferrer">https://www.uniprot.org/help/customize</a>,
<a href="https://www.youtube.com/watch?v=ado1r8IDm3U" rel="nofollow noreferrer">https://www.youtube.com/watch?v=ado1r8IDm3U</a> (video, at about 1min25)
or
<a href="https://insideuniprot.blogspot.com/2015/03" rel="nofollow noreferrer">https://insideuniprot.blogspot.com/2015/03</a></p>
<p>Note that while UniProt tries to improve protein name annotation, the unreviewed section of UniProtKB (i.e. UniProtKB/TrEMBL) is often far from perfect and its accuracy relies on the information provided by the submitter of the nucleotide entry, unless an automatic annotation rule is available to assign a more suitable name (see <a href="https://www.uniprot.org/help/protein_names" rel="nofollow noreferrer">https://www.uniprot.org/help/protein_names</a>).</p>
<p>Please don't hesitate to contact the UniProt helpdesk if you have any additional questions.</p>

CC BY-SA 4.0
2021-03-08T08:54:10.150Z
2021-03-08T08:54:10.150Z
Elisabeth.Gasteiger
<p>Say I found an interesting protein in a genbank file, e.g.:</p>
<pre><code> gene            273792..275552
                 /locus_tag=&quot;ECs_0242&quot;
 CDS             273792..275552
                 /locus_tag=&quot;ECs_0242&quot;
                 /codon_start=1
                 /transl_table=11
                 /product=&quot;type IV secretion protein Rhs&quot;
                 /protein_id=&quot;NP_308269.1&quot;
                 /translation=&quot;[...]&quot;
</code></pre>
<p>(from <a href="https://www.ncbi.nlm.nih.gov/nuccore/NC_002695.2" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/nuccore/NC_002695.2</a>)</p>
<p>I would like to programmatically get a classification of this protein.<br/>
The (not new) motivation is that my pipeline finds many proteins, and I want to identify enriched or depleted protein classes (e.g., enrichment for DNA-binding proteins).</p>
<p>By googling for &quot;type IV secretion protein Rhs&quot;, I found a <a href="https://www.uniprot.org/uniprot/A0A0L1CB30" rel="nofollow noreferrer">UniProt entry</a> which has a link to <a href="https://www.ebi.ac.uk/QuickGO/annotations?geneProductId=A0A0L1CB30" rel="nofollow noreferrer">a QuickGO page</a>, which includes three categories: &quot;transposase activity&quot;, &quot;transposition, DNA-mediated&quot; and &quot;DNA binding&quot;. From this page I can also get an ancestor chart for each of these categories, e.g.:</p>
<p><a href="https://i.sstatic.net/O3Att.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/O3Att.png" alt="DNA binding chart" /></a></p>
<p>Optimally, the code would work quickly (preferably locally), and for a description from a CDS feature (e.g.: &quot;type IV secretion protein Rhs&quot;) return the GO categories it belongs to. It would be even better to also have the ancestry of each category in a computer-readable format.</p>
<p>What is the best way to do that?<br/>
Is there a specific <a href="https://www.uniprot.org/downloads" rel="nofollow noreferrer">UniProt subset</a> that fits my need (finding GO categories given a protein description)?<br/>
Is there a specific <a href="http://geneontology.org/docs/download-ontology/#subsets" rel="nofollow noreferrer">GO subset</a> that fits my need (extracting ancestor GO categories as explained <a href="https://github.com/owlcollab/owltools/wiki/Finding-Common-Ancestors" rel="nofollow noreferrer">here</a>)?<br/></p>
<p>(I figured that GO categories fit my need of classifying proteins, but if a better option exists, please let me know)</p>

<sequence-annotation><uniprot><genbank><gene-ontology>
How to programmatically classify a protein according to its genbank feature
# How to programmatically classify a protein according to its genbank feature

(Asked by: username_0 on 2021-01-19)

Say I found an interesting protein in a genbank file, e.g.:
 gene            273792..275552
                 /locus_tag="ECs_0242"
 CDS             273792..275552
                 /locus_tag="ECs_0242"
                 /codon_start=1
                 /transl_table=11
                 /product="type IV secretion protein Rhs"
                 /protein_id="NP_308269.1"
                 /translation="[...]"

(from https://www.ncbi.nlm.nih.gov/nuccore/NC_002695.2)
I would like to programmatically get a classification of this protein.
The (not new) motivation is that my pipeline finds many proteins, and I want to identify enriched or depleted protein classes (e.g., enrichment for DNA-binding proteins).
By googling for "type IV secretion protein Rhs", I found a UniProt entry which has a link to a QuickGO page, which includes three categories: "transposase activity", "transposition, DNA-mediated" and "DNA binding". From this page I can also get an ancestor chart for each of these categories, e.g.:

Optimally, the code would work quickly (preferably locally), and for a description from a CDS feature (e.g.: "type IV secretion protein Rhs") return the GO categories it belongs to. It would be even better to also have the ancestry of each category in a computer-readable format.
What is the best way to do that?
Is there a specific UniProt subset that fits my need (finding GO categories given a protein description)?
Is there a specific GO subset that fits my need (extracting ancestor GO categories as explained here)?
(I figured that GO categories fit my need of classifying proteins, but if a better option exists, please let me know)

**Tags:** sequence-annotation, uniprot, genbank, gene-ontology

---

## 1 answers

### Answer by username_1 on 2021-03-08. Score: 2 | Accepted answer

Using the UniProt website API (<https://www.uniprot.org/help/api>) this could be done with a query like

<https://www.uniprot.org/uniprot/?query=name%3A%22type%20IV%20secretion%20protein%20Rhs%22&columns=id%2Centry%20name%2Creviewed%2Cprotein%20names%2Cgenes%2Cgo(biological%20process)%2Cgo(molecular%20function)%2Cgo(cellular%20component)&sort=score>

or, in tab-separated format:

<https://www.uniprot.org/uniprot/?query=name:%22type%20IV%20secretion%20protein%20Rhs%22&format=tab&limit=10&columns=id,entry%20name,reviewed,protein%20names,genes,go(biological%20process),go(molecular%20function),go(cellular%20component)&sort=score>

(Remove the "&limit=10" part from the URL to obtain the full set instead of the first 10 entries.)

You can add colums as described here:
<https://www.uniprot.org/help/customize>,
<https://www.youtube.com/watch?v=ado1r8IDm3U> (video, at about 1min25)
or
<https://insideuniprot.blogspot.com/2015/03>

Note that while UniProt tries to improve protein name annotation, the unreviewed section of UniProtKB (i.e. UniProtKB/TrEMBL) is often far from perfect and its accuracy relies on the information provided by the submitter of the nucleotide entry, unless an automatic annotation rule is available to assign a more suitable name (see <https://www.uniprot.org/help/protein_names>).

Please don't hesitate to contact the UniProt helpdesk if you have any additional questions.


---

