text: user4868: Some background
  Similar to the OP of https://www.biostars.org/p/377840/, I would like to programmatically BLAST a sequence to a local database of all WGS assemblies.
  Since this isn't feasible for the average biology lab server (correct me if I am wrong), I plan to use ncbi-acc-download to download all WGS assemblies of the species of interest (not a popular species like E. coli, so it should be feasible). Then, I will create a BLAST database for the downloaded assemblies and BLAST the sequence to it.
  My question
  How can I find all WGS assemblies accessions of a species?
  
  
  My current plan is to search the NCBI Assembly database using Entrez and a search term such as "wgs"[Properties] AND txid1337[orgn:exp].
  EDIT: IIUC, this approach might miss some WGS assemblies. See my answer.
  I am worried (and thus ask for your help) this isn't the right approach because there seem to be at least 3 other places in which assemblies can be found:
  
  The assembly_summary.txt files that are described in https://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt.
  https://www.ncbi.nlm.nih.gov/Traces/wgs/. This is the one I am most worried about. Both because it seems to have much more entries, and also because https://www.ncbi.nlm.nih.gov/genbank/wgs/ says: "The public WGS projects are at the list of WGS projects ."
  taxid2wgs.pl. (As mentioned in https://www.biostars.org/p/377840/#471535, this one seems to miss some assemblies.)
  
  
  user4868: There seem to be WGS assemblies that can't be found in NCBI Assembly database, e.g.: https://www.ncbi.nlm.nih.gov/nuccore/1779902990. I guess that such assemblies also cannot be found in The assembly_summary.txt files that are described in https://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt.
  My current best guess is that each WGS assembly has a "WGS master record" in NCBI Nuccore database. To find all WGS assemblies of a taxon whose uid in NCBI Taxonomy database is 1337, search NCBI Nuccore database using Entrez and the search term "wgs master"[Properties] AND txid1337[orgn:exp].
  
original_text: 4868: <h3>Some background</h3>
  <p>Similar to the OP of <a href="https://www.biostars.org/p/377840/" rel="nofollow noreferrer">https://www.biostars.org/p/377840/</a>, I would like to programmatically BLAST a sequence to a local database of all WGS assemblies.<br/>
  Since this isn't feasible for the average biology lab server (correct me if I am wrong), I plan to use <a href="https://github.com/kblin/ncbi-acc-download" rel="nofollow noreferrer">ncbi-acc-download</a> to download all WGS assemblies of the species of interest (not a popular species like E. coli, so it should be feasible). Then, I will create a BLAST database for the downloaded assemblies and BLAST the sequence to it.</p>
  <h3>My question</h3>
  <p>How can I find all WGS assemblies accessions of a species?<br/></p>
  <hr />
  <br/>
  <p>My current plan is to search the <a href="https://www.ncbi.nlm.nih.gov/assembly" rel="nofollow noreferrer">NCBI Assembly database</a> using <a href="https://biopython.org/docs/latest/api/Bio.Entrez.html" rel="nofollow noreferrer">Entrez</a> and a search term such as <code>&quot;wgs&quot;[Properties] AND txid1337[orgn:exp]</code>.<br/>
  <strong>EDIT: IIUC, this approach might miss some WGS assemblies.</strong> See <a href="https://bioinformatics.stackexchange.com/a/14749/4868">my answer</a>.</p>
  <p>I am worried (and thus ask for your help) this isn't the right approach because there seem to be at least 3 other places in which assemblies can be found:</p>
  <ul>
  <li>The assembly_summary.txt files that are described in <a href="https://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt" rel="nofollow noreferrer">https://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt</a>.</li>
  <li><a href="https://www.ncbi.nlm.nih.gov/Traces/wgs/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/Traces/wgs/</a>. <strong>This is the one I am most worried about.</strong> Both because it seems to have much more entries, and also because <a href="https://www.ncbi.nlm.nih.gov/genbank/wgs/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/genbank/wgs/</a> says: &quot;The public WGS projects are at the <a href="https://www.ncbi.nlm.nih.gov/Traces/wgs/" rel="nofollow noreferrer">list of WGS projects</a> .&quot;</li>
  <li><a href="ftp://ftp.ncbi.nih.gov/blast/WGS_TOOLS/" rel="nofollow noreferrer">taxid2wgs.pl</a>. (As mentioned in <a href="https://www.biostars.org/p/377840/#471535" rel="nofollow noreferrer">https://www.biostars.org/p/377840/#471535</a>, this one seems to miss some assemblies.)</li>
  </ul>
   4868: <p>There seem to be WGS assemblies that can't be found in <a href="https://www.ncbi.nlm.nih.gov/assembly" rel="nofollow noreferrer">NCBI Assembly database</a>, e.g.: <a href="https://www.ncbi.nlm.nih.gov/nuccore/1779902990" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/nuccore/1779902990</a>. I guess that such assemblies also cannot be found in The assembly_summary.txt files that are described in <a href="https://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt" rel="nofollow noreferrer">https://ftp.ncbi.nlm.nih.gov/genomes/README_assembly_summary.txt</a>.</p>
  <p>My current best guess is that each WGS assembly has a &quot;WGS master record&quot; in <a href="https://www.ncbi.nlm.nih.gov/nuccore" rel="nofollow noreferrer">NCBI Nuccore database</a>. To find all WGS assemblies of a taxon whose uid in <a href="https://www.ncbi.nlm.nih.gov/taxonomy" rel="nofollow noreferrer">NCBI Taxonomy database</a> is <code>1337</code>, search <a href="https://www.ncbi.nlm.nih.gov/nuccore" rel="nofollow noreferrer">NCBI Nuccore database</a> using <a href="https://biopython.org/docs/latest/api/Bio.Entrez.html" rel="nofollow noreferrer">Entrez</a> and the search term <code>&quot;wgs master&quot;[Properties] AND txid1337[orgn:exp]</code>.</p>
  