segger_dev icon indicating copy to clipboard operation
segger_dev copied to clipboard

Question about x_min, x_max in MerscopeSample().load_transcripts()

Open Penguinayee opened this issue 7 months ago • 2 comments

Hello,

I'm following the tutorial to load MERSCOPE data from here: https://elihei2.github.io/segger_dev/user_guide/data_creation/#merscope-data

In the first step:

Set up the file paths

raw_data_dir = Path("ROOT_PATH") processed_data_dir = Path("processed_files") sample_tag = Path("region_X")

Create a MerscopeSample instance for spatial transcriptomics processing

merscope_sample = MerscopeSample()

Load transcripts from a parquet file

merscope_sample.load_transcripts( base_path=raw_data_dir, sample=sample_tag, transcripts_filename="detected_transcripts.parquet", file_format="parquet", )

I encountered the following error: AttributeError: 'MerscopeSample' object has no attribute 'x_min'

Full traceback: File /segger/src/segger/data/io.py:141, in SpatialTranscriptomicsSample.load_transcripts() ... x_min = x_min or self.x_min AttributeError: 'MerscopeSample' object has no attribute 'x_min'

Should I set up the metadata (e.g., call set_metadata()) before calling load_transcripts()? Or is there something missing in the tutorial example?

Thank you for your help!

Penguinayee avatar Jun 11 '25 05:06 Penguinayee

Hi @Penguinayee thanks for reporting the issue. We are still experimenting with MERSCOPE, therefore the branch is not stable yet and is subject to many changes in the coming weeks. in the meantime, we suggest you follow this notebook to preprocess the data in a format which is compatible for segger's use: https://github.com/EliHei2/segger_dev/blob/generic_config/platform_guides/platform_preparation_guide.ipynb

pinging @andrewmoorman to follow up on this thread.

EliHei2 avatar Jun 26 '25 09:06 EliHei2

@EliHei2 Thanks for the great tool! Do you suggest using the workaround for now, or is full MERSCOPE/MERFISH support coming soon?

simonmfr avatar Jul 02 '25 12:07 simonmfr