[Biopython] index_db problem
natassa
natassa_g_2000 at yahoo.com
Tue Nov 15 12:28:16 UTC 2011
Hi,
I have a problem with a script using the Bio.SeqIO index_db function: I have previously it successfully, but as I had to recently change computers I now tried the same script with no success. I get the error:
AttributeError: 'module' object has no attribute 'index_db'
although I have installed biopython 1.58 (the index_db is apparently from 1.57 and on, and on the pevious computer I had installed the 1.57). I checked if i have sqlite 3 by importing the module, and this seems OK. So now i am kind of stuck why the module SeqIO from 1.58 gets imported, but not the function.
My function using it is something like:
def Sample_RandomHeader(numbRecs, reps, path):
species=os.path.basename(path).split('_')[0].split('.')[0]
newdir=os.path.dirname(path)+'/'+species+str(numbRecs)+'_'+str(reps)+'Randoms/'
speciesdb=SeqIO.index_db(species+'.idx', path, "fasta")
....
and i have python 2.6
Any help would be appreciated!
Thank you,
Anastasia
More information about the Biopython
mailing list