lilab-bcb / cirrocumulus

Bring your single-cell data to life
https://cirrocumulus.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
74 stars 16 forks source link

display multiple Visium datasets on top of H&E images #181

Closed zglu closed 1 year ago

zglu commented 1 year ago

Hello Cirro team, Does Cirro currently support displaying multiple Visium datasets (from different sections), each on top of an H&E image? (such as below an example from cellxgene)

Screenshot 2023-04-18 at 14 08 25

Thanks, Zhigang

joshua-gould commented 1 year ago

Please see https://cirrocumulus.readthedocs.io/en/latest/commands.html#concatenate

zglu commented 1 year ago

Thanks for the rapid development of the function. I tried with the following command but got an error: cirro concat --output MouseBrain_concat/ V1_Adult_Mouse_Brain/V1_Adult_Mouse_Brain.h5ad V1_Mouse_Brain_Sagittal_Posterior/V1_Mouse_Brain_post_sct.h5ad

Traceback (most recent call last): File "/Users/zlu/miniconda3/bin/cirro", line 5, in from cirrocumulus.main import main File "/Users/zlu/miniconda3/lib/python3.7/site-packages/cirrocumulus/main.py", line 6, in from cirrocumulus import concat, launch, prepare_data, serve File "/Users/zlu/miniconda3/lib/python3.7/site-packages/cirrocumulus/concat.py", line 12, in def concat_spatial(paths: list[str], output_dir: str, ncols: int = 2): TypeError: 'type' object is not subscriptable

What can be the problem please?

joshua-gould commented 1 year ago

There was a bug parsing the command line arguments. Can you please update to the latest version and try again? Also, can you please use Python 3.9 or later too? Thanks.

zglu commented 1 year ago

Hi Joshua,

I've updated Python to 3.10 and installed the latest version of Cirro. Now the concat function works. But it seems that the row and col values in the data were swapped while the images were unchanged. For a single dataset it works in the same way. Maybe need to fix something..

Many thanks, Zhigang

Screenshot 2023-04-21 at 19 16 29
joshua-gould commented 1 year ago

Thanks for your reply. I'm not sure what you mean that "row and col values in the data were swapped" Are you using version 1.1.52.post1? Thanks.

zglu commented 1 year ago

Hi Joshua, Yes, I installed 1.1.52.post1 fresh today. It looks like the data was rotated and doesn't overlay with the image correctly.

Screenshot 2023-04-21 at 20 28 10
joshua-gould commented 1 year ago

Thanks. I can reproduce the error now. The row and column pixel spot coordinates are swapped for Space Ranger output prior to version 2.0. Will fix shortly.

joshua-gould commented 1 year ago

Fixed in latest release. Thanks.

zglu commented 1 year ago

Fantastic. Now works beautifully. Thanks again for your prompt support, much appreciated! Have a pleasant weekend :)

Screenshot 2023-04-21 at 21 24 24