You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Doctor Li,
I'm a fan of this brilliant software, and I've been using the python module without creating the index file, at least so far. When I wanted to test if the indexing was actually faster when creating the index file, I tried to run both the ways (with and without the fn_idx_out option given). But, when the path to an index file was given, I was given this error: index=mappy.Aligner(fn_idx_in=database, preset='map-ont', fn_idx_out=IDXFILE) File "python/mappy.pyx", line 145, in mappy.Aligner.__cinit__ TypeError: expected bytes, str found, where IDXFILE is of the form path/to/file/index.mmi.
Am I misinterpreting the option?
Thank you for your attention,
Alessio.
Ps.
I looked at the code, at the line raising the error (r = cmappy.mm_idx_reader_open(str.encode(fn_idx_in), &self.idx_opt, fn_idx_out)), and I was wondering if a str.encode was necessary also for the fn_idx_out option.
The text was updated successfully, but these errors were encountered:
Hello Doctor Li,
thank you so much for your attention.
I didn't test the new version, but I think it should work, since with a little workaround in my python code, fn_idx_out=bytes('path/name_of_index_file', encode='utf-8'),
which I just tried, it worked well, creating the index file.
Hello Doctor Li,
I'm a fan of this brilliant software, and I've been using the python module without creating the index file, at least so far. When I wanted to test if the indexing was actually faster when creating the index file, I tried to run both the ways (with and without the fn_idx_out option given). But, when the path to an index file was given, I was given this error:
index=mappy.Aligner(fn_idx_in=database, preset='map-ont', fn_idx_out=IDXFILE) File "python/mappy.pyx", line 145, in mappy.Aligner.__cinit__ TypeError: expected bytes, str found
, where IDXFILE is of the form path/to/file/index.mmi.Am I misinterpreting the option?
Thank you for your attention,
Alessio.
Ps.
I looked at the code, at the line raising the error (
r = cmappy.mm_idx_reader_open(str.encode(fn_idx_in), &self.idx_opt, fn_idx_out)
), and I was wondering if a str.encode was necessary also for the fn_idx_out option.The text was updated successfully, but these errors were encountered: