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

error saving curated volin plot #875

Closed
carlocolantuoni opened this issue Aug 24, 2024 · 30 comments
Closed

error saving curated volin plot #875

carlocolantuoni opened this issue Aug 24, 2024 · 30 comments

Comments

@carlocolantuoni
Copy link

hi guys,

im getting "Could not create Plotly plot for this dataset and parameters. Please contact the gEAR team."
when trying to save a violin plot for the following dataset

dataset_id=6b3f05b3-0885-4765-8d6b-c449753823b6

image

@carlocolantuoni
Copy link
Author

also happening for dataset:
dataset_id=1cac4125-7083-4754-9aa6-6964c8d9ffec

for both these datsets i have static umap plots create no prob

@adkinsrs
Copy link
Member

What conditions are you trying to plot?

@carlocolantuoni
Copy link
Author

expression on Y-axis, "dev_state" on the X-axis - everything else is default settings
i think it is any violin for these 2 datasets - i have tried a lot of dif meta data on the X axis
there are "_" and "/" characters in some of the meta data, but those arent problem characters are they?
also cant make scatter plots

i all cases, im now getting this error instead of the original one i sent "Something went wrong. Please contact the gEAR team and provide steps to reproduce."

@carlocolantuoni
Copy link
Author

in addition to the different error now, i am not evne getting to the screen where i sent the screen cap above - it gives the erros right when i hit the plot button

@adkinsrs
Copy link
Member

adkinsrs commented Sep 4, 2024

Actually getting a chance to look at this. It's a Javascript error related to a warning that is supposed to show in addition when a data series (in this case "dev_state") has too many groups that could result in a crowded plot. Going to work on fixing this warning

@carlocolantuoni
Copy link
Author

carlocolantuoni commented Sep 4, 2024 via email

adkinsrs added a commit that referenced this issue Sep 4, 2024
@adkinsrs
Copy link
Member

adkinsrs commented Sep 4, 2024

Works now. Closing

@adkinsrs adkinsrs closed this as completed Sep 4, 2024
@carlocolantuoni
Copy link
Author

carlocolantuoni commented Sep 4, 2024 via email

@carlocolantuoni
Copy link
Author

sorry shaun - still having issues. when i try this:

https://nemoanalytics.org/dataset_curator.html?dataset_id=6b3f05b3-0885-4765-8d6b-c449753823b6

or this

https://nemoanalytics.org/dataset_curator.html?dataset_id=1cac4125-7083-4754-9aa6-6964c8d9ffec

and then enter violin plot details i get an eternally loading symbol when i hit the PLOT button:

image
and
image

@carlocolantuoni
Copy link
Author

when i tried to use different meta data for the violin "dev_state" instead of "stage.ord" as before, and hit the PLOT button, it progressed but then i got this error: "Could not create Plotly plot for this dataset and parameters. Please contact the gEAR team."
image

@adkinsrs
Copy link
Member

adkinsrs commented Sep 6, 2024

Seems it's a separate issue with rendering the group series "sortable" component that lets you reorder facets, legends, etc. Pretty sure it's because the "stage.ord" series name has a period in it, which the HTML Sortable component does not like. However, it seems that the groups of sortable lists rendered does not reflect the chosen groups for the plot either (containing more groups than were specified)

@adkinsrs
Copy link
Member

adkinsrs commented Sep 6, 2024

Ok fixed the issue where the plot will now render (forgot to escape a CSS selector ID). However I still need to work on the issue where old sortable series not currently applicable need to be removed.

adkinsrs added a commit that referenced this issue Sep 6, 2024
@adkinsrs
Copy link
Member

adkinsrs commented Sep 6, 2024

Closing ticket as things seem to be in working order now. I also resolved the issue from the previously mentioned comment

@adkinsrs adkinsrs closed this as completed Sep 6, 2024
@carlocolantuoni
Copy link
Author

carlocolantuoni commented Sep 6, 2024 via email

@carlocolantuoni
Copy link
Author

hey shaun - i was able to make a violin plot for both of the datasets, using the "stage.ord" meta data column, but when i try it with "dev_state" i am still getting this error for both datasets: "Could not create Plotly plot for this dataset and parameters. Please contact the gEAR team."

@adkinsrs
Copy link
Member

adkinsrs commented Sep 9, 2024

I'm not able to replicate. The "dev_state" violin plot generates fine for me for both datasets

Screenshot 2024-09-09 at 10 30 09 AM Screenshot 2024-09-09 at 10 33 11 AM

@adkinsrs
Copy link
Member

adkinsrs commented Sep 9, 2024

Fixed some issues in #827 that may (or may not) also resolve your issues @carlocolantuoni

@carlocolantuoni
Copy link
Author

carlocolantuoni commented Sep 10, 2024 via email

@adkinsrs
Copy link
Member

@carlocolantuoni are the issues still persisting?

@carlocolantuoni
Copy link
Author

ya there are still when i try to make a violin plot for
https://nemoanalytics.org/dataset_curator.html?dataset_id=6b3f05b3-0885-4765-8d6b-c449753823b6
using the "dev_state" meta data, i get "Could not create Plotly plot for this dataset and parameters. Please contact the gEAR team."

super weird as it looks exactly like what you are doing without error

image

@carlocolantuoni
Copy link
Author

when i plot by "dev_state" but DO NOT color by that meta data is does work!
image

@carlocolantuoni
Copy link
Author

but if i plot and color by "dev_state" it fails with that error.
so for now its low priority because i can plot it withot color but maybe its becasue it cant pick >20 colors?

@adkinsrs
Copy link
Member

I'd like to get it working though, so I'll tackle that after #886. There's a good chance others would encounter a similar issue under the same conditions (but different dataset and configuration). Thanks for the update.

@carlocolantuoni
Copy link
Author

carlocolantuoni commented Sep 16, 2024 via email

@adkinsrs
Copy link
Member

adkinsrs commented Sep 16, 2024

Seems the issue is that there there is a missing value (nan) present in the color mapping which is causing type incompatibilities. I believe this is because the "NA" present as a "dev_state" category is being converted to "nan" (the pandas missing value indicator).

Reference -> https://stackoverflow.com/questions/33952142/prevent-pandas-from-interpreting-na-as-nan-in-a-string

@adkinsrs
Copy link
Member

Unfortunately it seems like the AnnData reader has no way to remove "NA" as a default missing value, so it automatically gets converted into NaN. Normally I'd just say "ok, let's just turn them back into NA again", but I'm worried about edge cases where someone had both "NA" and missing values in a metadata category and then we may be incorrectly merging two bad properties. Honestly though, if that ever becomes an issue, I would attribute it to being a terrible dataset.

So I think I'm going to try and catch these missing values, and unify them if I can, at least to whatever is found in the color mapping.

@adkinsrs
Copy link
Member

I pushed a fix that makes it work. However, the NA column does not show in the plot, but at least it is not erroring for me now.

@carlocolantuoni
Copy link
Author

carlocolantuoni commented Sep 16, 2024 via email

@adkinsrs
Copy link
Member

@carlocolantuoni I am closing this in favor of #888, since the issue is more focused now.

@carlocolantuoni
Copy link
Author

carlocolantuoni commented Sep 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants