Skip to content

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

Open

Description

@Penguinayee

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!

Activity

  1. changed the title [-]x_min, x_max in MerscopeSample().load_transcripts()[/-] [+]Question about x_min, x_max in MerscopeSample().load_transcripts()[/+] on Jun 11, 2025
  2. EliHei2 commented on Jun 26, 2025

    @EliHei2
    Owner

    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.

  3. simonmfr commented on Jul 2, 2025

    @simonmfr

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions