quadbio / VoxHunt

VoxHunt: Resolving human brain organoid heterogeneity through single-cell genomic comparison to spatial brain maps
https://quadbio.github.io/VoxHunt/
MIT License
41 stars 5 forks source link

Fixed scale bars #10

Closed RijndertAriese closed 2 years ago

RijndertAriese commented 2 years ago

Hello!

I am trying to plot similarity plots at different stages in our brain organoid protocol. I can make this work using the plot_map function, but the correlation scale bar is different for each plot. I've tried fixing by adding the scale = FALSE argument, but this doesn't appear to have an effect on the plot. Neither does the show_legend or show_coordinates arguments by the way.

Am I not seeing something or is this argument somehow overruled by the plot_map function?

Thanks in advance!

Cheers, Rijndert

joschif commented 2 years ago

Hey @RijndertAriese, which mapping function are you using? voxel_map()? Cheers, Jonas

RijndertAriese commented 2 years ago

Hi Jonas,

Thanks for your quick response! I am indeed using the voxel_map() function. This is the function I call:

ps_map_18 <- voxel_map(norm_data, stage='E18', genes_use = genes_use_18, groups = filt_metadata$Timepoint, pseudobulk_groups = FALSE)

Hope that helps!

Cheers, Rijndert

joschif commented 2 years ago

Hi @RijndertAriese, you are very correct in that show_legend and show_coordinates don't have an effect currently as they are deprecated. In current versions, it should simply show the scale bars by default. Currently, there is unfortunately no way in VoxHunt to give the plots from plot_map() a common scale bar. You can however use plot_structure_similarity() which should return a heatmap that lets you compare correlations more easily across conditions. Hope that helps, let me know if you have any further questions. Cheers, Jonas

RijndertAriese commented 2 years ago

Hi @joschif, thanks for your response! In the meantime I've found a way to modify the plot. Simply adding scale_fill_gradientn() solved the problem for us. It will overwrite the native scale and allows for control of min and max. Cheers, Rijndert

joschif commented 2 years ago

Ah yes true, that seems like a great solution! I'm happy this solved it for you, I'll close this one :)