I just run into a bug that I wanted to write about. I haven't looked into the code, so please feel free to WONTFIX it if it is too complicated.
You can reproduce the bug like this:
$ cd tests/mini_test/test-output
$ anvi-interactive -p 204-MERGED/PROFILE.db -a ANNOTATION.db
save the state from the interface. kill the server, then run this:
$ anvi-interactive -p 204-MERGED/PROFILE.db -a ANNOTATION.db --state 204-MERGED/SAVED_STATE
runs perfectly. kill the server, then run this:
$ anvi-interactive -p 204-MERGED/PROFILE.db -a ANNOTATION.db -A anvio_concoct_clusters.txt
runs perfectly. kill the server, then run this:
$ anvi-interactive -p 204-MERGED/PROFILE.db -a ANNOTATION.db -A anvio_concoct_clusters.txt --state 204-MERGED/SAVED_STATE
treelib.js dies (because it finds the layer, but it is undefined, for obvious reasons).
Of course now there is an extra layer that was not in the state file. The other way around is possible too. I mean, you may run the interface first with a layer of additional metadata, save the state, and now you can't use that state without using the additional metadata again.
I have no suggestions, just wanted to let you know and see where would you like to go with this :) As I said, WONTFIX is an option, too (in that case I would write a small check to show an error message that says "your state file says X layers, you have just given me Y, that state is garbage yo").
Hmm this bug is obvious, maybe we should store layer/view settings using layer name instead of layer id ( i mean column order on metadata table ), it's doable, i will look into this.
Hi Özcan,
I just run into a bug that I wanted to write about. I haven't looked into the code, so please feel free to WONTFIX it if it is too complicated.
You can reproduce the bug like this:
save the state from the interface. kill the server, then run this:
runs perfectly. kill the server, then run this:
runs perfectly. kill the server, then run this:
treelib.js dies (because it finds the layer, but it is
undefined
, for obvious reasons).Of course now there is an extra layer that was not in the state file. The other way around is possible too. I mean, you may run the interface first with a layer of additional metadata, save the state, and now you can't use that state without using the additional metadata again.
I have no suggestions, just wanted to let you know and see where would you like to go with this :) As I said, WONTFIX is an option, too (in that case I would write a small check to show an error message that says "your state file says X layers, you have just given me Y, that state is garbage yo").
Best,