text: user3628: I annotated my bacterial genomes using the new NCBI Prokaryotic Genome Annotation Pipeline 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, 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: YP_805528.1 -> 4419225. But I don't see how to get from these databases 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. But I don't like this approach because technically, the NCBI annotation pipeline already did this. Why compute the same thing twice?
  
  user3577: 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
  
  
original_text: 3628: <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>
   3577: <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>
  