-
Notifications
You must be signed in to change notification settings - Fork 3
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
How to adjust the plotting parameters? #180
Comments
That plot should look something like this: We generate this plot as a PDF in our workflow, I would recommend maybe doing this same (i know you cannot display PDF inline in IPython notebooks though sorry). I would also recommend running BayesTME in its docker container, I cannot support installing it directly with pip, its too complex to consider all the factors in your host environment that might cause matplotlib to behave differently. You can install jupyter inside the BayesTME container if you want to use it that way. |
Thanks. The screenshot above is from the pdf format but I'll look into see about getting Docker to run with our server and see if that fixes the issue. |
Oh ok sorry about that, I just updated this plot the other day actually, might want to pull the latest container and try that, but I'm wondering if maybe this is a data issue.. what kind of Visium are you using? Is it 6.5mm Visium, 11mm Visium, or VisiumHD ? We have only really tested this with 6.5mm Visium so far maybe the other kinds break some plot layouts |
Hi Yeah I think its a data issue. I had a few preprocessing steps I did using scanpy. I used their adata.obsm['spatial'] for positions in the data.SpatialExpressionDataset.from_arrays. I think because scanpy sets that to the physical positions but bayesTME expected array its causing the error. I've updated the script to use array_col and array_pos. Not sure how many other differences there are between the anndata objects between bayesTME and scnapy |
Ah yes that would do it. Glad you got it working. As you point out when scanpy reads in the data it uses the physical spot coordinates in the spatial attribute (X,Y points in slide micrometer offset), while the plotting code I wrote expects the logical spot coordinates in the spatial attribute (integer indices into hexagonal grid). A little confusing I agree, we should persist both into the anndata and use them appropriately. |
Hi! I am trying to adjust and make the images clearer from the
plot_bleeding_correction
portion of the workflow. I have tried in both the command line and in a python notebook and the result is this:The command line method looks better than the notebook, but both are hard to see. Any insights on what I am missing would be greatly appreciated!
Packages was installed using the pip method last week. Thanks.
The text was updated successfully, but these errors were encountered: