text: user856: I have following accession numbers of the 10 chromosomes of Theobroma cacao genome.
  NC_030850.1
  NC_030851.1
  NC_030852.1
  NC_030853.1
  NC_030854.1
  NC_030855.1
  NC_030856.1
  NC_030857.1
  NC_030858.1
  NC_030859.1
  
  I need to download these FASTA files using the terminal because I'm working on a server. I'll be grateful if someone can help me.
  Thank you.
  
  user3577: Downloading entire genomes
  The best way to download FASTA sequences for an entire genome is to search for the genome, for example Theobroma cacao genome in the NCBI Assembly portal and use the big blue Download button. 
  
  Downloading individual chromosomes
  For a given assembly, if you want to download the FASTA sequences for a bunch of chromosomes, you can do that by going to the Genomes FTP path highlighted in the screenshot:
  
  Once you are in the Genomes FTP path, you can navigate to the FASTA folder as follows: 
  Theobroma FTP directory >> Assembly Structure >> Primary Assembly >> Assembled Chromosomes >> FASTA. 
  Downloading a few sequences
  For this, you can use Entrez Direct as mentioned by @dc37. Why not always use Entrez Direct? While it is fine for a small number of sequences, it can be slow to download a large number of sequences. Entrez Direct by default will download uncompressed data so you will end up spending more time downloading a larger file instead of downloading a smaller, compressed file from FTP more quickly. 
  If you were to use Entrez Direct for this purpose, I'd not bother with a bash script and use epost to first post the entire list of accessions and then pipe it to efetch as shown below: 
  epost -db nuccore -input <file_with_accs> -format acc \
    | efetch -format fasta > sequences.fasta
  
  
  user7279: 
  Go to the main FASTA sequence page, view source, and get the "ncbi_uidlist" value.  In this case, it's 1061361601
  Use the ID in the query string to download directly:
  https://www.ncbi.nlm.nih.gov/sviewer/viewer.fcgi?id=1061361601&db=nuccore&report=fasta&retmode=text&withmarkup=on&tool=portal&log$=seqview&maxdownloadsize=100000000
  
  You can also get this link directly, by using Chrome's developer tools (F12), viewing the Network tab, then loading the page in (1).
  
  user6322: Just wget or curl each as https://www.ncbi.nlm.nih.gov/nuccore/NC_030853.1?report=fasta&log$=seqview&format=text...
  
  user6437: Alternatively, you can use the NCBI Entrez Direct UNIX E-utilities
  Basically, you have to download the install file here: https://www.ncbi.nlm.nih.gov/books/NBK179288/bin/install-edirect.sh
  In the terminal, install it using: source ./install-edirect.sh
  Then, you can download your sequence by doing:
  esearch -db nucleotide -query "NC_030850.1" | efetch -format fasta > NC_030850.1.fasta
  And you should find your fasta sequence downloaded. 
  As you have several sequences to download, I think it will be quite easy to add this command into a little bash script to process all of them.
  More readings about that: http://bioinformatics.cvr.ac.uk/blog/ncbi-entrez-direct-unix-e-utilities/ and https://www.ncbi.nlm.nih.gov/books/NBK179288/
  
original_text: 856: <p>I have following accession numbers of the 10 chromosomes of <em>Theobroma cacao</em> genome.</p>
  
  <pre><code>NC_030850.1
  NC_030851.1
  NC_030852.1
  NC_030853.1
  NC_030854.1
  NC_030855.1
  NC_030856.1
  NC_030857.1
  NC_030858.1
  NC_030859.1
  </code></pre>
  
  <p>I need to download these FASTA files using the terminal because I'm working on a server. I'll be grateful if someone can help me.
  Thank you.</p>
   3577: <h2>Downloading entire genomes</h2>
  
  <p>The best way to download FASTA sequences for an entire genome is to search for the genome, for example <code>Theobroma cacao genome</code> in the <a href="https://www.ncbi.nlm.nih.gov/assembly" rel="nofollow noreferrer">NCBI Assembly</a> portal and use the big blue Download button. 
  <a href="https://i.stack.imgur.com/VCa0e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VCa0e.png" alt="enter image description here"></a></p>
  
  <h2>Downloading individual chromosomes</h2>
  
  <p>For a given assembly, if you want to download the FASTA sequences for a bunch of chromosomes, you can do that by going to the Genomes FTP path highlighted in the screenshot:
  <a href="https://i.stack.imgur.com/xWl5Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xWl5Y.png" alt="enter image description here"></a>
  Once you are in the Genomes FTP path, you can navigate to the FASTA folder as follows: 
  <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/403/535/GCA_000403535.1_Theobroma_cacao_20110822" rel="nofollow noreferrer">Theobroma FTP directory</a> >> <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/403/535/GCA_000403535.1_Theobroma_cacao_20110822/GCA_000403535.1_Theobroma_cacao_20110822_assembly_structure/" rel="nofollow noreferrer">Assembly Structure</a> >> <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/403/535/GCA_000403535.1_Theobroma_cacao_20110822/GCA_000403535.1_Theobroma_cacao_20110822_assembly_structure/Primary_Assembly/" rel="nofollow noreferrer">Primary Assembly</a> >> <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/403/535/GCA_000403535.1_Theobroma_cacao_20110822/GCA_000403535.1_Theobroma_cacao_20110822_assembly_structure/Primary_Assembly/assembled_chromosomes/" rel="nofollow noreferrer">Assembled Chromosomes</a> >> <a href="ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/403/535/GCA_000403535.1_Theobroma_cacao_20110822/GCA_000403535.1_Theobroma_cacao_20110822_assembly_structure/Primary_Assembly/assembled_chromosomes/FASTA/" rel="nofollow noreferrer">FASTA</a>. </p>
  
  <h2>Downloading a few sequences</h2>
  
  <p>For this, you can use <a href="https://www.ncbi.nlm.nih.gov/books/NBK179288/" rel="nofollow noreferrer">Entrez Direct</a> as mentioned by @dc37. Why not always use Entrez Direct? While it is fine for a small number of sequences, it can be slow to download a large number of sequences. Entrez Direct by default will download uncompressed data so you will end up spending more time downloading a larger file instead of downloading a smaller, compressed file from FTP more quickly. </p>
  
  <p>If you were to use Entrez Direct for this purpose, I'd not bother with a bash script and use <code>epost</code> to first post the entire list of accessions and then pipe it to <code>efetch</code> as shown below: </p>
  
  <pre><code>epost -db nuccore -input &lt;file_with_accs&gt; -format acc \
    | efetch -format fasta &gt; sequences.fasta
  </code></pre>
   7279: <ol>
  <li>Go to <a href="https://www.ncbi.nlm.nih.gov/nuccore/NC_030853.1?report=fasta&amp;log$=seqview&amp;format=text..." rel="nofollow noreferrer">the main FASTA sequence page</a>, view source, and get the "ncbi_uidlist" value.  In this case, it's <code>1061361601</code></li>
  <li><p>Use the ID in the query string to download directly:</p>
  
  <p><a href="https://www.ncbi.nlm.nih.gov/sviewer/viewer.fcgi?id=" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/sviewer/viewer.fcgi?id=</a><strong>1061361601</strong>&amp;db=nuccore&amp;report=fasta&amp;retmode=text&amp;withmarkup=on&amp;tool=portal&amp;log$=seqview&amp;maxdownloadsize=100000000</p></li>
  </ol>
  
  <p>You can also get this link directly, by using Chrome's developer tools (F12), viewing the Network tab, then loading the page in (1).</p>
   6322: <p>Just <code>wget</code> or <code>curl</code> each as <code>https://www.ncbi.nlm.nih.gov/nuccore/NC_030853.1?report=fasta&amp;log$=seqview&amp;format=text</code>...</p>
   6437: <p>Alternatively, you can use the <strong>NCBI Entrez Direct UNIX E-utilities</strong></p>
  
  <p>Basically, you have to download the install file here: <a href="https://www.ncbi.nlm.nih.gov/books/NBK179288/bin/install-edirect.sh" rel="noreferrer">https://www.ncbi.nlm.nih.gov/books/NBK179288/bin/install-edirect.sh</a></p>
  
  <p>In the terminal, install it using: <code>source ./install-edirect.sh</code></p>
  
  <p>Then, you can download your sequence by doing:</p>
  
  <p><code>esearch -db nucleotide -query "NC_030850.1" | efetch -format fasta &gt; NC_030850.1.fasta</code></p>
  
  <p>And you should find your fasta sequence downloaded. </p>
  
  <p>As you have several sequences to download, I think it will be quite easy to add this command into a little bash script to process all of them.</p>
  
  <p>More readings about that: <a href="http://bioinformatics.cvr.ac.uk/blog/ncbi-entrez-direct-unix-e-utilities/" rel="noreferrer">http://bioinformatics.cvr.ac.uk/blog/ncbi-entrez-direct-unix-e-utilities/</a> and <a href="https://www.ncbi.nlm.nih.gov/books/NBK179288/" rel="noreferrer">https://www.ncbi.nlm.nih.gov/books/NBK179288/</a></p>
  