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

Return nicer error message when all ranked abundance ranking values are 0 #14

Open
2 tasks
d-callan opened this issue Feb 28, 2024 · 6 comments
Open
2 tasks
Labels
bug Something isn't working microbiome

Comments

@d-callan
Copy link
Contributor

From microbiomeComputations created by asizemore: VEuPathDB/microbiomeComputations#22

Found when qa-ing the beta site. HMP WGS, ranked abundance box, ranking method median, data Normalized number of ...

Screen Shot 2022-08-29 at 9 06 35 AM

The abundances are so low in this collection that i think all of the medians = 0. We need to return a nicer error message to pass to the client, and include a suggestion of what to do (rank by max, for example)

Edit

This will also require

  • mockups
  • web-eda work to display the message wherever we decide to put it
@d-callan d-callan added bug Something isn't working microbiome labels Feb 28, 2024
@d-callan
Copy link
Contributor Author

Update. The error is different now. The user sees that the compute fails, and the rserve log reveals that it's the validObject call that errs because invalid class “VariableMetadata” object: Members must be non-empty for collection variables..

We could add a check on if all median=0 somewhere above, even before the ranking occurs, and then return the message and display that for the user.

@d-callan
Copy link
Contributor Author

So each compute can return a computeMessage. This could display the crucial points like "kicked out 80 samples because we didn't like them" or for the situation here "all medians are 0, nothing to rank".

The question becomes, where does this information go in the viz?? We'd ideally keep it brief, but it's possible it could get longer....

Maybe an element only appears when there is a message? Some little warning thing like "hey the compute sent you a message, please read!"

@d-callan
Copy link
Contributor Author

i agree we need a nicer error, but idk if the R package is the place to generate it? Typically, data gets streamed from R when a compute succeeds. I dont think in this case we want to return a 200. so this might have to be the job of the compute plugin somehow. we should talk to @ryanrdoherty and @Foxcapades about it, maybe @dmfalke as well.

(side note: we should double check there isnt a duplicate issue somewhere, i feel like i saw this somewhere else as well

edit: i remember it bc i made the dup lol VEuPathDB/EdaNewIssues#441)

@d-callan
Copy link
Contributor Author

@d-callan why wouldn't we want to return a 200? Nothing failed, just no data will come back

@d-callan
Copy link
Contributor Author

Bc the request didn't succeed?

@d-callan
Copy link
Contributor Author

I feel like if this is a possibility for a particular compute, then that compute plugin should produce a JSON stats file that contains something like:

{
     "status": "no-data",
     "message": "The computation did not produce any usable data.  Please try with different parameters."
}

The visualizations that depend on that compute can hit the stats endpoint up front, check the status, and return whatever response is appropriate to the client (400? 422?) along with the compute message or a custom message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working microbiome
Projects
None yet
Development

No branches or pull requests

1 participant