<p><em>Answer from @m, converted from <a href="https://bioinformatics.stackexchange.com/help/privileges/comment">comment</a>:</em></p>
<p>Biostars are recommending esearch ... its not the approach I'd have taken but presume will do the job. Its available via SRA, so I'd have gone for the SRA toolkit. Is SRA more appropriate in context? (I liked Biostars BeautifulSoup solution)</p>
<p><em>[Please update or improve this answer if you can]</em></p>

CC BY-SA 4.0
2022-08-27T09:46:32.180Z
2022-08-27T09:46:32.180Z
gringer
<p><em>This question was also asked on <a href="https://www.biostars.org/p/9536359/#9536376" rel="nofollow noreferrer">Biostars</a></em></p>
<p>I'd like to download multiple genome assemblies or proteomes using a set of BioSample IDs from NCBI.</p>
<p>I'm able to find the assemblies belonging to the BioSample IDS in a browser (in the search field of <a href="https://www.ncbi.nlm.nih.gov/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/</a>), but couldn't find a commandline interface solution (CLI).</p>
<p>E.g. for BioSample <code>SAMN09405588</code> the assembly id is <code>PDT000806148.1</code>, and from <a href="https://www.ncbi.nlm.nih.gov/assembly/GCA_014136285.1/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/assembly/GCA_014136285.1/</a> I can download the proteome: <code>GCA_014136285.1_PDT000806148.1_protein.faa.gz</code></p>
<p>Thank you for your help!</p>

CC BY-SA 4.0
2022-08-29T02:57:07.373Z
I think this question is not a duplicate of https://bioinformatics.stackexchange.com/questions/15794/using-entrez-efetch-to-retrive-fasta-file-from-any-ncbi-database - there a gene id is given, here a biosample id.
bmv
<python><phylogenetics><identifiers>
CLI access to genomes/proteomes by BioSample ID
# CLI access to genomes/proteomes by BioSample ID

(Asked by: username_0 on 2022-08-26)

*This question was also asked on [Biostars](https://www.biostars.org/p/9536359/#9536376)*

I'd like to download multiple genome assemblies or proteomes using a set of BioSample IDs from NCBI.

I'm able to find the assemblies belonging to the BioSample IDS in a browser (in the search field of <https://www.ncbi.nlm.nih.gov/>), but couldn't find a commandline interface solution (CLI).

E.g. for BioSample `SAMN09405588` the assembly id is `PDT000806148.1`, and from <https://www.ncbi.nlm.nih.gov/assembly/GCA_014136285.1/> I can download the proteome: `GCA_014136285.1_PDT000806148.1_protein.faa.gz`

Thank you for your help!

**Tags:** python, phylogenetics, identifiers
> **Comments:**
> **username_0**: I think this question is not a duplicate of https://bioinformatics.stackexchange.com/questions/15794/using-entrez-efetch-to-retrive-fasta-file-from-any-ncbi-database - there a gene id is given, here a biosample id.  

---

## 1 answers

### Answer by username_1 on 2022-08-27. Score: 0

*Answer from @m, converted from [comment](https://bioinformatics.stackexchange.com/help/privileges/comment):*

Biostars are recommending esearch ... its not the approach I'd have taken but presume will do the job. Its available via SRA, so I'd have gone for the SRA toolkit. Is SRA more appropriate in context? (I liked Biostars BeautifulSoup solution)

*[Please update or improve this answer if you can]*


---

