title: How do I get gene features in FASTA nucleotide format from NCBI using Perl?
body: <p>I am able to download a FASTA file manually that looks like:</p>
  
  <pre><code>&gt;lcl|CR543861.1_gene_1...
  ATGCTTTGGACA...
  &gt;lcl|CR543861.1_gene_2...
  GTGCGACTAAAA...
  </code></pre>
  
  <p>by clicking "Send to" and selecting "Gene Features", FASTA Nucleotide is the only option (which is fine because that's all I want) on <a href="http://www.ncbi.nlm.nih.gov/nuccore/CR543861" rel="nofollow noreferrer">this page</a>.</p>
  
  <p>With a script like this:</p>
  
  <pre><code>#!/usr/bin/env perl
  use strict;
  use warnings;
  use Bio::DB::EUtilities;
  
  my $factory = Bio::DB::EUtilities-&gt;new(-eutil   =&gt; 'efetch',
                                         -db      =&gt; 'nucleotide',
                                         -id      =&gt; 'CR543861',
                                         -rettype =&gt; 'fasta');
  my $file = 'CR543861.fasta';
  $factory-&gt;get_Response(-file =&gt; $file);
  </code></pre>
  
  <p>I get a file that looks like:</p>
  
  <pre><code>&gt;gi|49529273|emb|CR543861.1| Acinetobacter sp. ADP1 complete genome
  GATATTTTATCCACA...
  </code></pre>
  
  <p>with the whole genomic sequence lumped together. <strong>How do I get information like in the first (manually downloaded) file?</strong></p>
  
  <p>I looked at a couple of other posts:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/18461629/how-to-download-complete-genome-sequence-in-biopython-entrez-esearch">how to download complete genome sequence in biopython entrez.esearch</a> (<a href="https://stackoverflow.com/a/20169271/2509933">this answer seemed relevant</a>)</li>
  <li><a href="https://stackoverflow.com/questions/16390739/how-can-i-download-the-entire-genbank-file-with-just-an-accession-number/16404180#16404180">How can I download the entire GenBank file with just an accession number?</a> </li>
  </ul>
  
  <p>As well as <a href="http://www.bioperl.org/wiki/HOWTO:EUtilities_Cookbook#Retrieve_raw_data_records_from_GenBank.2C_save_raw_data_to_file.2C_then_parse_via_Bio::SeqIO" rel="nofollow noreferrer">this section from EUtilities Cookbook</a>.</p>
  
  <p>I tried fetching and saving a GenBank file (since it seems to have separate sequences for each gene in the .gb file I get), but when I go work with it using Bio::SeqIO, I will get only 1 large sequence.</p>