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)