2
$\begingroup$

I'm trying to get ALL Proteins for a Taxonomic ID from Entrez using Esearch/Efetch and the following command:

esearch -db "protein" -query "txid374666[Organism]" | efetch -format fasta > txid_374666.fasta

Can somebody tell if this command will get ALL proteins or not? Besides, this appears to be a bit slow.

Can somebody point out any Biopython workflow, particularly how to get ALL Proteins

Thanks

$\endgroup$
6
  • 1
    $\begingroup$ That would work - except for the precise search term used. The issue is the NCBI server may time out, certainly if this was Blast it would do. Doing a single command line would prevent checking. Personally I would use a script to check what was downloaded with the esearch output (which will certainly work). If I get chance I will provide a full answer, e.g. search term stuff. $\endgroup$
    – M__
    Commented Nov 1, 2023 at 15:38
  • $\begingroup$ Thanks for your response. I'll await your answer $\endgroup$
    – The August
    Commented Nov 1, 2023 at 16:06
  • $\begingroup$ I've to download a huge lot of sequences for hundreds of bacterial genus (not species) for a metaproteomics study. Which method will work best for me? esearch/efetch, python scripting , anything else? $\endgroup$
    – The August
    Commented Nov 1, 2023 at 16:30
  • $\begingroup$ If I've time I will answer in detail about how I'd do this. In general further details would help (even if not me answering), i.e. how many different species are needed? This sounds like a script more than a one liner. $\endgroup$
    – M__
    Commented Nov 1, 2023 at 16:44
  • 1
    $\begingroup$ Hi there, not sure if it can help but I asked a similar question some times ago here : stackoverflow.com/questions/74727918/…. I am using R however. General idea was that it was taking too long so I had to deal with server errors using a try/catch/sleep function. $\endgroup$ Commented Nov 3, 2023 at 8:16

1 Answer 1

3
$\begingroup$

As suggested by somebody, the datasets tools from NCBI is blazing fast:

datasets download genome taxon 187492  --include protein

NCBI Datasets Tool

$\endgroup$
2
  • $\begingroup$ Thanks for sharing this, its really useful. $\endgroup$
    – M__
    Commented Nov 3, 2023 at 17:58
  • $\begingroup$ If you do get chance @TheAugust please mark your answer as "accepted" (helps with site stats). I recommend upvoting the answer because its efficiency allows local blast (and other methods) to interrogate data when remote NCBI blast is inefficient. NCBI servers do have a restricted access policy for some of their services. $\endgroup$
    – M__
    Commented Nov 3, 2023 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.