← Về thư mục
skills/bioskills/bio-imaging-mass-cytometry-cell-segmentation/scripts/segment_cells.py
- build_membrane · function · L18-L21 — def build_membrane(stack, ids): # sum pan-membrane markers so no cell type is dark in channel 2; a cell-type-specific # sum systematically under-segments the types lacking a marker
- segment_mesmer · function · L23-L29 — def segment_mesmer(stack, mpp=1.0)
- nuclear_fallback · function · L31-L36 — def nuclear_fallback(nuclear_masks, distance=3): # exclusive expansion (stops at the midline between labels) -- a partition, not free # dilation; ~3 px at 1 um. Report the radius; accept the macrophage-undercapture bias.
- impossible_coexpression_rate · function · L38-L46 — def impossible_coexpression_rate(stack, masks, marker_a, marker_b, pct=75): # fraction of cells positive for both members of a mutually-exclusive pair; positivity # is per-cell mean above the cohort's pct-th percentile (a sanity gate, not a real call)