[BioPython] problems indexing a FASTA file
Mattias de Hollander
mdehollander at gmail.com
Mon Sep 19 15:22:51 EDT 2005
I am trying to index a FASTA file with the following commands (found in the
Cookbook):
>>>from Bio import Fasta
>>>dict_file = "sequences.fasta"
>>>index_file = "sequences.idx"
>>>Fasta.index_file(dict_file, index_file, rec2key=None)
But i get the following error:
Traceback (most recent call last):
File "fasta_database.py", line 27, in ?
main()
File "fasta_database.py", line 21, in main
Fasta.index_file(dict_file, index_file, rec2key=None)
File "/usr/lib/python2.3/site-packages/Bio/Fasta/__init__.py", line 243, in
index_file SimpleSeqRecord.create_flatdb([filename], indexname, indexer)
File "/usr/lib/python2.3/site-packages/Bio/Mindy/SimpleSeqRecord.py", line
111, in create_flatdb
creator = FlatDB.create(db_name, unique_name, alias_names)
File "/usr/lib/python2.3/site-packages/Bio/Mindy/FlatDB.py", line 297, in
create
return open(dbname, "rw")
File "/usr/lib/python2.3/site-packages/Bio/Mindy/FlatDB.py", line 304, in
open
return MemoryFlatDB(dbname)
File "/usr/lib/python2.3/site-packages/Bio/Mindy/FlatDB.py", line 130, in
__init__
BaseFlatDB.__init__(self, dbname, INDEX_TYPE)
TypeError: __init__() takes exactly 2 arguments (3 given)
What am i doing wrong?
Thanks,
Mattias de Hollander
More information about the BioPython
mailing list