<p>You can use <a href="https://www.ncbi.nlm.nih.gov/books/NBK179288/" rel="nofollow noreferrer">Entrez Direct</a> for this as follows: </p>

<pre><code>efetch -db protein -id YP_805528.1 -format gpc -mode xml | xtract -insd Protein EC_number
YP_805528.1     6.3.2.13
</code></pre>

CC BY-SA 4.0
2018-11-02T23:40:42.797Z
2018-11-03T00:04:44.177Z
2018-11-03T00:04:44.177Z
vkkodali
<p>I annotated my bacterial genomes using the new <a href="https://github.com/ncbi/pgap" rel="nofollow noreferrer">NCBI Prokaryotic Genome Annotation Pipeline</a> and now, I want to annotate EC-numbers.</p>

<p>In the master annotation file (.gff), I get the RefSeq-ID of every successful annotation, e.g. <code>RefSeq:YP_805528.1</code>.</p>

<p>When I visit the <a href="https://www.ncbi.nlm.nih.gov/gene/?term=YP_805528.1" rel="nofollow noreferrer">respective NCBI page</a>, I see that it sometimes is mapped to an EC number.</p>

<p>I'd like to automate this process: Convert every RefSeq-ID to an EC number. How can I do this?</p>

<p>(I may already have discovered the first step: I can map the RefSeq-ID to the NCBI-ID (Entrez-ID) using this <a href="ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2refseq.gz" rel="nofollow noreferrer">NCBI conversion database</a>: <code>YP_805528.1 -&gt; 4419225</code>. But I don't see how to get from <a href="ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/" rel="nofollow noreferrer">these</a> <a href="http://barc.wi.mit.edu/entrez_gene/entrez_gene.pdf" rel="nofollow noreferrer">databases</a> to EC.)</p>

<p>Are there other ways? As far as I know, most people blast their genes to already-mapped databases <a href="http://breathmintsforpenguins.blogspot.com/2014/07/using-swissprot-and-expasy-enzyme-to.html" rel="nofollow noreferrer">like SwissProt and ExPASy ENZYME</a>. But I don't like this approach because technically, the NCBI annotation pipeline already did this. Why compute the same thing twice?</p>

<sequence-annotation><identifiers><phylogenetics><refseq>
Mapping RefSeq-ID or NCBI-ID (Entrez-ID) to EC number
# Mapping RefSeq-ID or NCBI-ID (Entrez-ID) to EC number

(Asked by: username_0 on 2018-11-02)

I annotated my bacterial genomes using the new [NCBI Prokaryotic Genome Annotation Pipeline](https://github.com/ncbi/pgap) and now, I want to annotate EC-numbers.

In the master annotation file (.gff), I get the RefSeq-ID of every successful annotation, e.g. `RefSeq:YP_805528.1`.

When I visit the [respective NCBI page](https://www.ncbi.nlm.nih.gov/gene/?term=YP_805528.1), I see that it sometimes is mapped to an EC number.

I'd like to automate this process: Convert every RefSeq-ID to an EC number. How can I do this?

(I may already have discovered the first step: I can map the RefSeq-ID to the NCBI-ID (Entrez-ID) using this [NCBI conversion database](ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2refseq.gz): `YP_805528.1 -> 4419225`. But I don't see how to get from [these](ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/) [databases](http://barc.wi.mit.edu/entrez_gene/entrez_gene.pdf) to EC.)

Are there other ways? As far as I know, most people blast their genes to already-mapped databases [like SwissProt and ExPASy ENZYME](http://breathmintsforpenguins.blogspot.com/2014/07/using-swissprot-and-expasy-enzyme-to.html). But I don't like this approach because technically, the NCBI annotation pipeline already did this. Why compute the same thing twice?

**Tags:** sequence-annotation, identifiers, phylogenetics, refseq

---

## 1 answers

### Answer by username_1 on 2018-11-02. Score: 2

You can use Entrez Direct for this as follows: 
efetch -db protein -id YP_805528.1 -format gpc -mode xml | xtract -insd Protein EC_number
YP_805528.1     6.3.2.13


---

