obiconvert bug
When converting an ecopcr database, there is a problem to read the entries:
obiconvert --ecopcrdb --fasta-output silva_119.1_ssuref_nr_full > silva_119.1_ssuref_nr_full.fasta
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/obiconvert", line 4, in <module>
__import__('pkg_resources').run_script('OBITools==1.1.16', 'obiconvert')
File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 729, in run_script
File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 1642, in run_script
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OBITools-1.1.16-py2.7-macosx-10.6-intel.egg/EGG-INFO/scripts/obiconvert", line 45, in <module>
for entry in entries:
File "obitools/options/_options.pyx", line 96, in allEntryIterator (build/temp.macosx-10.6-intel-2.7/pyrex/obitools/options/_options.c:3241)
AttributeError: Values instance has no attribute 'ecodb'
I can fix it by deleting a condition lines 96 to 98 of obitools/options/_options.pyx
:
Original:
if entryIterator == EcoPCRDBSequenceIterator and options is not None:
if options.ecodb==f:
iterator = entryIterator(f,options.taxonomy)
else:
iterator = entryIterator(f)
options.taxonomy=iterator.taxonomy
options.ecodb=f
Modified:
if entryIterator == EcoPCRDBSequenceIterator and options is not None:
#if options.ecodb==f:
# iterator = entryIterator(f,options.taxonomy)
#else:
iterator = entryIterator(f)
options.taxonomy=iterator.taxonomy
options.ecodb=f
I tested a few things to try and understand what this condition is for, but haven't found any use for it yet, so I'm not committing for now.