[Biopython] Biopython error
Peter Cock
p.j.a.cock at googlemail.com
Tue Aug 23 10:27:29 UTC 2016
If anyone has any bright ideas, Damian filed this on GitHub, so please
comment there:
https://github.com/biopython/biopython/issues/915
Peter
On Mon, Aug 22, 2016 at 10:07 PM, Damian Menning <dmenning at mail.usf.edu> wrote:
> Hello everyone,
>
> I am running a Python 2.7 script that has worked in the past but now is
> throwing an error. I am wondering if there has been a change recently that
> may be causing the problem.
>
> My script searches NCBI using each Genus species name for a list
> (species), a general category like bony fish (cat), and a search term like
> 16S (add_term) and returns a list of non-replicated ids. The script is
> below:
>
> def ncbi_search(species_list):
> global full_gi_list
> print "\nSearching NCBI for"+str(species)+' and '+str(add_term)+' and
> '+str(cat)+'\n'
> search_handle=Entrez.esearch(db="nucleotide", term=cat + ' AND ' +
> add_term + ' AND ' + species, usehistory="y", RetMax=9999)
> search_results=Entrez.read(search_handle)
> search_handle.close()
> gi_list=search_results["IdList"]
> full_gi_list.extend(gi_list)
> return full_gi_list
>
> for species in species_list:
> ncbi_search(species_list)
>
> The error I am getting is:
>
> Traceback (most recent call last):
> File "D:\Python27\0
> eDNA\02_GenBank_get_fasta_or_gb_no_repeats_1_search_criter
> ia.py", line 98, in <module>
> ncbi_search(species_list)
> File "D:\Python27\0
> eDNA\02_GenBank_get_fasta_or_gb_no_repeats_1_search_criter
> ia.py", line 49, in ncbi_search
> search_results = Entrez.read(search_handle)
> File "C:\Python27\lib\site-packages\Bio\Entrez\__init__.py", line 376, in
> read
>
> record = handler.read(handle)
> File "C:\Python27\lib\site-packages\Bio\Entrez\Parser.py", line 205, in
> read
> self.parser.ParseFile(handle)
> File "C:\Python27\lib\site-packages\Bio\Entrez\Parser.py", line 343, in
> endEle
> mentHandler
> raise RuntimeError(value)
> RuntimeError: Invalid db name specified: nuccore
>
> Any ideas on what is going wrong?
>
> Thanks for the help
>
> Damian
>
> --
> Damian Menning, Ph.D.
>
> "There are two types of academics. Those who use the Oxford comma, those who
> don't and those who should."
>
> Standard comma - You know Bob, Sue and Greg? They came to my house.
> Oxford comma - You know Bob, Sue, and Greg? They came to my house.
> Walken Comma - You know, Bob, Sue, and Greg? They came, to my house.
> Shatner comma - You, know, Bob, Sue, and Greg? They, came, to my house.
>
> _______________________________________________
> Biopython mailing list - Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython
More information about the Biopython
mailing list