ITBE-Lab / MA

The Modular Aligner and The Modular SV Caller
MIT License
45 stars 3 forks source link

test_aligner.py class issue? #12

Closed evolgenomics closed 2 years ago

evolgenomics commented 2 years ago

Hi,

I'm testing out some basic functions and trying to understand how to play with the ExecutionContext. I tried running the setupaligner.py code, but ran into the following issue:

$ python -c "from MA import *; test_aligner(); exit(0)"
seed set (q,r,l):
49 999999 2
0 100 25
26 126 24
51 151 24
76 176 24
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/MA/build/MA/setupaligner.py", line 37, in test_aligner
    for i, seeds in enumerate(harm_seeds):
TypeError: 'libMS.containers.Container' object is not iterable

It looks like there were some issues with this line: harm_seeds = harm_module.execute(socs, query, reference_index)

Maybe it's something obvious I'm missing. Thanks.

MarkusRainerSchmidt commented 2 years ago

Hi,

this is definitely a bug in my code! The execute function returns some child-class of Container. In this case, vector<vector<seeds>> and python is supposed to auto down-cast to this subclass, but fails to do so.

It should be fixed in the newest version, so please pull the latest commit and recompile.

Cheers,

Markus