willpearse / phyloGenerator

Automated Phylogeny Generation for Ecologists
Other
15 stars 8 forks source link

Server error when checking NCBI for data #39

Closed rossmounce closed 7 years ago

rossmounce commented 7 years ago

I keep getting stuck at this step no matter what I try. My internet was definitely working all the time throughout this:

ross@ross-envy:~/workspace/pearsepg$ ./phyloGenerator-master/phyloGenerator.py 

Welcome to phyloGenerator! Let's make a phylogeny!
---Please go to http://willpearse.github.com/phyloGenerator for help
---Written by Will Pearse (will.pearse@gmail.com)

This program is easier to use with a wider console window
Mac/Linux: Drag the edge of your terminal window with the mouse
PC: Right click the command prompt icon, select properties,
    click the 'layout' tab, and increase 'screen buffer'
    and 'window' widths to at least '160'

When downloading sequence data, you will see warnings relating to
'missing DTD files. Do not be alarmed; this is normal, and will
have no effect on your output.

Please input a 'stem' name to act as a prefix to all output (e.g., 'stemName_phylogeny.tre')

Stem name: dog

Please input an *existing* directory for all your output
    (hit enter to use /home/ross/workspace/pearsepg
Working directory (/home/ross/workspace/pearsepg): 
Please enter the gene(s) you want to use (e.g., 'COI' for cytochrome oxidase one')
Specify 'aliases' (alternate names) by listing them after the main name using '-'
Gene names may contain spaces, or (as with the command line) they can be replaced with '_'
e.g., COI-this_is_an_alis-this is also an alias
If you wish to use the defaults for your taxa, please enter 'plant', 'invertebrate', or 'vertebrate' instead
Each gene on a separate line, and an empty line to continue

plant

DNA INPUT

If you already have DNA sequences in a FASTA file, please enter its location
If you have more than one set of sequences, please separate the file locations with commas
Otherwise, hit enter to continue

File locations: 

No DNA loaded

DNA DOWNLOAD

Please enter the location of the list of species for which you want to build a phylogeny
Each species must be on a new line

/home/ross/workspace/pearsepg/phyloGenerator-master/chinaspp.txt

6098 species loaded.
Please enter a valid email address to download sequence data from GenBank

Email: rcm61@cam.ac.uk

To use the referenceDownload method, enter locations of sequence files (on separate lines), finishing with an empty line.
Just hit enter to perform a standard search (this is probably the option you're looking for).
refDownload: 
Searching for: Acanthus ebracteatus
!!!Server error checking (((Acanthus ebracteatus[Organism]) AND rbcL[Gene]) NOT partial [Title]) NOT genome [Title]  - retrying...
!!!!!!Unreachable. Returning nothing.
Traceback (most recent call last):
  File "./phyloGenerator-master/phyloGenerator.py", line 4122, in <module>
    main()
  File "./phyloGenerator-master/phyloGenerator.py", line 4033, in main
    currentState.loadGenBank()
  File "./phyloGenerator-master/phyloGenerator.py", line 2333, in loadGenBank
    self.sequences, self.genes = findGenes(self.speciesNames, self.genes, seqChoice=self.seqChoice, verbose=True, download=True, thorough=True, targetNoGenes=self.nGenes, spacer=self.spacer, delay=self.delay, taxonIDs=self.taxonIDs)
  File "./phyloGenerator-master/phyloGenerator.py", line 476, in findGenes
    sequence, _ = sequenceDownload(speciesList[i], geneNames[k], noSeqs=noSeqs, includePartial=includePartial, includeGenome=includeGenome, seqChoice=seqChoice, download=download, thorough=thorough, retMax=retMax, taxonID=taxonIDs)
  File "./phyloGenerator-master/phyloGenerator.py", line 339, in sequenceDownload
    seq = dwnSeq(includeGenome=False, includePartial=False, gene=gene)
  File "./phyloGenerator-master/phyloGenerator.py", line 332, in dwnSeq
    if int(firstSearch['Count']):
TypeError: tuple indices must be integers, not str
willpearse commented 7 years ago

Thanks for this Ross. Could you just confirm for me what version of BioPython you've installed? If it was a while ago, would you mind humouring me and re-installing? NCBI had a massive change-over of servers, and this error sounds like it's coming from that.

rossmounce commented 7 years ago
$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Bio
>>> print Bio.__version__
1.65
rossmounce commented 7 years ago

Happy to report after updating to BioPython 1.68 I can get past that step. So this issue is resolved.

Haven't tried a full run through yet though...