Skip to content

[release/v2-stable] Seg2Explorer not working #26

@jpark27

Description

@jpark27

Dear @EliHei2

Hi, Elias! Hope you been well.
Related to discussion we had on segger v1 (EliHei2/segger_dev#134), I successfully run "v2-stable" on my small dataset and run Seg2Explorer as follows:

#############################################################
xenium_data_dir = "/project/simmons_hts/shared/04_12_2023_xenium_trial_1/S2"

from segger.validation.xenium_explorer import seg2explorer
import dask.dataframe as dd
from shapely.geometry import Polygon

ddf = dd.read_parquet('/project/IBD_CD4/jpark/0_tools/segger/IBD_CD4/04_12_2023_xenium_trial_1/S2/transcripts_segmented.parquet').compute()
ddf = ddf.dropna()
ddf = ddf[ddf.segger_cell_id != "None"]
ddf = ddf.sort_values("segger_cell_id")

ddf = ddf.rename(columns={
'x': 'x_location',
'y': 'y_location',
'z': 'z_location'
})
ddf['overlaps_nucleus'] = 0 # no nucleus info available, set to 0

seg2explorer(
seg_df=ddf,
source_path=xenium_data_dir,
output_dir="/project/IBD_CD4/jpark/0_tools/segger/IBD_CD4/04_12_2023_xenium_trial_1/S2/",
cells_filename="seg_cells",
analysis_filename="seg_analysis",
xenium_filename="seg_experiment.xenium",
analysis_df=None,
cell_id_columns="segger_cell_id",
area_low=10,
area_high=100,
)
#############################################################

But even with these new outputs from v2, I still can't open segmentation result on Xenium explorer (v4.1.1). Any piece of advice on this?

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions