Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default state for anvi-interactive #211

Closed
meren opened this issue Oct 14, 2015 · 8 comments
Closed

Default state for anvi-interactive #211

meren opened this issue Oct 14, 2015 · 8 comments

Comments

@meren
Copy link
Member

meren commented Oct 14, 2015

There must be an option to load a default state while calling anvi-interactive.

If it is not there, it shouldn't load anything, if it is there, it should load the state and call draw immediately (since there is a state, the user will unlikely change anything before clicking 'draw', so let's do it as well).

Best,

@meren meren unassigned ozcan Oct 28, 2015
ozcan referenced this issue Oct 28, 2015
ozcan referenced this issue Oct 28, 2015
…nterface calls drawTree() after everything loaded.
@ozcan ozcan closed this as completed Oct 28, 2015
@meren
Copy link
Member Author

meren commented Oct 28, 2015

This is awesome, Ozcan. However, there is one thing I would like us to do something about. Here is what I do:

  • run mini test
  • click draw
  • save the state as "test"
  • close tab. kill server.
  • cd sandbox/test-output/204-MERGED
  • anvi-interactive -p PROFILE.db -c ../CONTIGS.db --state test

this results in this error:

image

the reason to that is because the initial run where the state was saved was run with this command:

`anvi-interactive -p PROFILE.db -c ../CONTIGS.db --state test --split-hmm-layers`

where --split-hmm-layers changes the number of layers.

One way to deal with this could be a more flexible way of matching state info to available layers. Alternatively, we can check whether state is compatible with available layers, and show a small info on the top right saying "the state is not compatible with the current layers", and fall back to the default plan (as of --state has not been used).

What do you think?

@meren meren reopened this Oct 28, 2015
@ozcan
Copy link
Contributor

ozcan commented Oct 30, 2015

Hey Meren,
Load state function already works like that, so number of layers does not really matter. Load state function skips extra layers in state file also uses default values for missing layers.

I followed the steps but could not reproduce the problem, here is a screencast: https://www.youtube.com/watch?v=WOojJKIK_aY

@meren
Copy link
Member Author

meren commented Oct 30, 2015

This is very weird.....

I did the exact same thing, and had the same problem again. What software did you use for that screencast?

So I can do the same and show it to you :)

@ozcan
Copy link
Contributor

ozcan commented Oct 30, 2015

I have used built in quicktime for screencast.

Can you send me test-output directory maybe i can reproduce the error that way?

@meren
Copy link
Member Author

meren commented Oct 30, 2015

Thanks for looking into this Ozcan :/ The test directory is attached.

When I simply run it like this:

anvi-interactive -p PROFILE.db -c CONTIGS.db

And load the test state, it crashes. But if I run it like this, the test state loads.

anvi-interactive -p PROFILE.db -c CONTIGS.db --split-hmm

PS: Clearly the newly added parameter --state works beautifully, and this seems to be another glitch...

@meren
Copy link
Member Author

meren commented Oct 30, 2015

"attached".

Lies...

Here:

https://www.dropbox.com/s/j6sibe242aoefqf/204-MERGED.tar

ozcan added a commit that referenced this issue Oct 30, 2015
@ozcan
Copy link
Contributor

ozcan commented Oct 30, 2015

Hey Meren, can you try again?

btw this code part overwrites state variables, i think they should only modify default values not the state. what do you think about it?
screen shot 2015-10-31 at 12 52 59 am

@meren
Copy link
Member Author

meren commented Oct 30, 2015

Awesome, Ozcan! 217146b resolves this completely.

And you are correct, those ad-hoc stuff only modify default values, and not the state. If you don't want to fix that I can correct this.

Thank you!

@meren meren closed this as completed Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants