Closed Nick-Eagles closed 2 years ago
@gaddamshreya Could you also look at this please?
@Nick-Eagles thank you for identifying this issue! Investigating asap
@Nick-Eagles I've removed scale factor's default value for the plotting functions and updated the tutorial; thank you for bringing this to our attention!
Great! I appreciate you looking into this.
Hello,
I've noticed a mismatch between histology pixel coordinates and spots (spatial coordinates) when using the
tg.plot_cell_annotation_sc
function, which went away when I manually supplied thescale_factor
argument. If I understand correctly, whenadata_st.uns['spatial']
exists, the idea is to use that information, which should include scale factor, to accurately overlap the histology and spatial coords. In particular, my spatial AnnData had the scale factor stored inadata_st.uns['spatial'][sample_name]['scalefactors']['tissue_hires_scalef']
, which I believe is a standard location where it should be found (rather than needing to specifyscale_factor
explicitly).I traced the source of the "mismatch" to the default assignment of scale factor as 0.1, which is passed to
sc.pl.spatial
even whenadata_st.uns['spatial']
exists. I imagine the default of 0.1 only makes sense whenadata_st.uns['spatial']
doesn't exist.I believe the same issue exists for the
tg.plot_genes_sc
function, though I haven't explicitly checked this. Apologies if I'm misunderstanding, and I've stored the scale factor in a non-standard location. Note that I'm using tangram 1.0.2 as installed through pip, and am following along the squidpy tutorial.Thanks for providing the Tangram software!
Best,
-Nick