<p>1 and 2 —&gt; Yes, but you need to have the query ID in order to do so: having the description would be a bonus, but not required.  If you go to 8.1.1  Query Result of the Biopython manual, it will tell you how to get a query id, if you don’t already have it!  Go to section 7.1 as a reminder of how to run  BLAST via the internet.  Go to section 7.2 to. Run BLAST locally.   Weigh your options out with running via Internet or locally.  Running BLAST locally is faster usually and gives you more user freedom to create your own database with your own parameters, etcetera., but certain tools will need to be downloaded via the command line/terminal.  Follow this link for the BLAST command line user manual:
<a href="https://www.ncbi.nlm.nih.gov/books/NBK279690/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/books/NBK279690/</a>
I will paste the link to the Biopython user manual if you do not already have it:
<a href="http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec123" rel="nofollow noreferrer">http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec123</a></p>
<p>3 —&gt; Try the Protein Data Bank (PDB) instead of UniProt or you can combine both UniProt and PDB (I recommend this route as it’s a combination of the 2 databases).  You can use these two databases to process a BLAST result!  I have found in my experience, combining data from more than 1 database has been beneficial in my case!</p>

CC BY-SA 4.0
2023-11-13T14:46:30.227Z
2023-11-13T14:46:30.227Z
Rachel Sweeney
<ol>
<li>is there any way to retrieve a BLAST request made using the Biopython library using the request's query_id?</li>
<li>Alternatively is it possible to retrieve a query_id before the blast result is complete, and checking on it later?</li>
<li>(bit off-topic) I seem to only retrieve 60 results even at higher <code> hitlist_size</code> although i get much more results when blasting the same entry on uniprot</li>
</ol>
<p>I'm working on a script which processes a BLAST result and having to re-request the search every time is quite temporally cumbersome since i'm still learning the library. currently i'm using: <code>   blastResult = NCBIWWW.qblast(&quot;blastp&quot;, &quot;swissprot&quot;, targetAminoAcids,format_type=&quot;Tabular&quot;, hitlist_size=200)</code></p>

CC BY-SA 4.0
2023-11-01T15:07:52.280Z
Welcome to the site. This sounds like you just want to add some cache, is that right? Thats fairly easy via Python. Setting up a cache database is more complicated however - but absolutely doable - details about when you are running the different requests and how would help here.
M__
CC BY-SA 4.0
2023-11-02T09:23:19.677Z
Please [edit] your question and give us i) a script that we can run locally to reproduce your issue and ii) an example input so we can test it.
terdon
<python><blast><biopython>
retrieving past BLAST requests in bioPython
# retrieving past BLAST requests in bioPython

(Asked by: username_0 on 2023-10-31)

1. is there any way to retrieve a BLAST request made using the Biopython library using the request's query\_id?
2. Alternatively is it possible to retrieve a query\_id before the blast result is complete, and checking on it later?
3. (bit off-topic) I seem to only retrieve 60 results even at higher  `hitlist_size` although i get much more results when blasting the same entry on uniprot

I'm working on a script which processes a BLAST result and having to re-request the search every time is quite temporally cumbersome since i'm still learning the library. currently i'm using:  `blastResult = NCBIWWW.qblast("blastp", "swissprot", targetAminoAcids,format_type="Tabular", hitlist_size=200)`

**Tags:** python, blast, biopython
> **Comments:**
> **username_1**: Welcome to the site. This sounds like you just want to add some cache, is that right? Thats fairly easy via Python. Setting up a cache database is more complicated however - but absolutely doable - details about when you are running the different requests and how would help here.  
> **username_2**: Please [edit] your question and give us i) a script that we can run locally to reproduce your issue and ii) an example input so we can test it.  

---

## 1 answers

### Answer by username_3 on 2023-11-13. Score: 1

1 and 2 —> Yes, but you need to have the query ID in order to do so: having the description would be a bonus, but not required. If you go to 8.1.1 Query Result of the Biopython manual, it will tell you how to get a query id, if you don’t already have it! Go to section 7.1 as a reminder of how to run BLAST via the internet. Go to section 7.2 to. Run BLAST locally. Weigh your options out with running via Internet or locally. Running BLAST locally is faster usually and gives you more user freedom to create your own database with your own parameters, etcetera., but certain tools will need to be downloaded via the command line/terminal. Follow this link for the BLAST command line user manual:
<https://www.ncbi.nlm.nih.gov/books/NBK279690/>
I will paste the link to the Biopython user manual if you do not already have it:
<http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec123>

3 —> Try the Protein Data Bank (PDB) instead of UniProt or you can combine both UniProt and PDB (I recommend this route as it’s a combination of the 2 databases). You can use these two databases to process a BLAST result! I have found in my experience, combining data from more than 1 database has been beneficial in my case!


---

