BIMSBbioinfo/janggu

Problem with plotGenomeTrack

Closed this issue · 2 comments

I want to use the tool, so I have started with the tutorials and the examples provided.
When I try to run the "Input attribution" code I get an error in the plotGenomeTrack:
"Coverage tracks seems not represent biological sequences. " ValueError: Coverage tracks seems not represent biological sequences. The last dimension must be divisible by the alphabetsize.
In this case the alphabet size should be 64 (as the order=3) and the last dimension has a proper size:
attr_oct[0].shape Out: (1, 200, 1, 64)
I think the problem arises because:
len(attr_oct[0]) Out[14]: 1

wkopp commented

Thank you @martynakgajos for pointing out the issue.

Could you provide a minimal example of code that leads to this issue? Also, which version of janggu were you using?
I have tried to run ´python src/examples/example_input_importance.py -order 3`, but I couldn't reproduce the error.

OK, I thing the problem is on my side:
when I run the code from the command line, it works,
when I copy the code to spyder and try to run it, I get to the line with plotting and get the "ValueError: Coverage tracks seems not represent biological sequences. The last dimension must be divisible by the alphabetsize." error.