Closed jpintar closed 1 year ago
Hi @jpintar,
a PR would be most welcome!
PR submitted. Looking at the code again, I realised you'd already fixed chromosome_heatmap
with PR #72. I just applied the same fix to chromosome_heatmap_summary
and removed a test in both that is rendered moot by the fix.
I also explicitly set the index type of tmp_obs
to str
, which will avoid AnnData issuing ImplicitModificationWarning: Transforming to str index
when tmp_adata
is created.
Thanks for the quick response!
Closed via #110
Report
When
infercnvpy.pl.chromosome_heatmap
andinfercnvpy.pl.chromosome_heatmap_summary
are called withdendrogram=True
after a dendrogram has been computed withscanpy.tl.dendrogram
, Scanpy issues adendrogram data not found
warning, and re-runsscanpy.tl.dendrogram
with default settings (which, in turn, results inscanpy.tl.pca
being run).This is because Scanpy is, by default, looking for
adata.uns[f"dendrogram_{groupby}"]
, but this has not been copied totmp_adata
whichinfercnvpy.pl.chromosome_heatmap
andinfercnvpy.pl.chromosome_heatmap_summary
pass toscanpy.pl.heatmap
.The problem can be fixed by simply copying
adata.uns[f"dendrogram_{groupby}"]
, if it exists, totmp_adata.uns
, as is already the case withadata.uns[f"{groupby}_colors"]
. I'd be happy to make a pull request if that's helpful.Version information
anndata 0.9.2 scanpy 1.9.4 infercnvpy 0.4.2