Skip to content

Impossibility to add email and tool in NCBIWWW qblast queries #2865

Closed

Description

@koko256

Setup

I am reporting a problem with Biopython version, Python version, and operating
system as follows:

import sys; print(sys.version)
import platform; print(platform.python_implementation()); print(platform.platform())
import Bio; print(Bio.__version__)

Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import sys; print(sys.version)
3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0]
import platform; print(platform.python_implementation()); print(platform.platform())
CPython
Linux-4.19.98-08076-g24ab33fb8e14-x86_64-with-debian-10.3
import Bio; print(Bio.version)
1.73

Expected behaviour

Documentation of NCBIWWW recall NCBI guidelines among which one reads :
3/ Use the URL parameter email and tool, so that the NCBI can contact you if there is a problem.

These two parameters should be set

Actual behaviour

email and tool are not sent to NCBI server

Steps to reproduce

any qblast query

Activity

  1. peterjc commented on May 7, 2020

    @peterjc
    Member

    Confirming with current version of https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=DeveloperInfo

    We definitely do this in Bio.Entrez, but it does seem to be missing in Bio.Blast.NCBIWWW

    https://github.com/biopython/biopython/blob/master/Bio/Entrez/__init__.py
    https://github.com/biopython/biopython/blob/master/Bio/Blast/NCBIWWW.py

    It looks like I missed this while working on #1684 back in 2018, but this oversight is even older.

    Probably the simplest route would be the same module level attribute approach used in our Entrez code?

    @koko256 would you be interested in implementing this?

  2. koko256 commented on May 7, 2020

    @koko256
    Author

    It depends, I'm rather new to biopython.
    If it is just adding an email field to NCBIWWW and adding it to urlencode, it is OK. Are there other dependancies I am missing ?

  3. peterjc commented on May 7, 2020

    @peterjc
    Member
  4. koko256 commented on May 7, 2020

    @koko256
    Author

    OK. I'll do that.

  5. koko256 commented on May 7, 2020

    @koko256
    Author

    I wrote it and submitted a pull request. Yet I cannot run the online test it since I cannot get an answer from NCBI blast server. It seems they are really busy, probably with covid19.

  6. MarkusPiotrowski commented on May 7, 2020

    @MarkusPiotrowski
    Contributor

    The "new" Common URL API (https://ncbi.github.io/blast-cloud/dev/api.html) doesn't have these parameters, so their documentation is slightly outdated. However, I'm sure these parameters will still be valid (as it seems for all parameters of the old qblast API which are not part of the Common URL API )

  7. peterjc commented on May 7, 2020

    @peterjc
    Member

    Maybe we should double check with the NCBI before applying the changes (especially if live testing is proving difficult right now)?

  8. koko256 commented on May 11, 2020

    @koko256
    Author

    To answer Makus's comment, I could add a test and add the TOOL et EMAIL parameters only if the query is to be sent to the ncbi servers.

  9. koko256 commented on May 11, 2020

    @koko256
    Author

    I manage to have a successfull blast with the new code, but only once. I modified the code to allow a callback function to print the RID and it seems our request are not treated at the moment (taking the RID at page https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=GetSaved&RECENT_RESULTS=on display the status "searching" until being remove after 40mn). Unfortunately, putting the email field (I even tried Entrez's api_key) changes nothing.

    Edit: I have 47mn old queries. I don't know what is the policy then.

  10. MarkusPiotrowski commented on May 11, 2020

    @MarkusPiotrowski
    Contributor

    Let me say that is not unusual with qblast nowadays. Single queries go sometimes fast, but sometimes take tens of minutes. The whole qblast unittest can take 2 hours.

  11. koko256 commented on May 12, 2020

    @koko256
    Author

    The new code passed the online tests tonight. I modified the code to conform to flake8.

  12. peterjc commented on Nov 18, 2022

    @peterjc
    Member

    Original issue should be resolved by #4149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions