resegment
Reprocess G4X-output with a new segmentation
Replaces or updates the segmentation mask in a G4X run and regenerates all downstream single-cell data and .bin files.
Usage
Note
Global options --threads/-t & --verbose/-v must be supplied on the main entrypoint before the subcommand:
use g4x-helpers --help for more information
argument descriptions
required
G4X-DATA (argument)
Positional path to a G4X sample output directory.
The folder must follow the expected schema (e.g.,run_meta.json, segmentation masks, panel files, single-cell outputs).
Provide this argument after command-specific options.
--cell-labels: (type: str)
Path to the new segmentation mask file. Supported formats include
.npy,.npz, and.geojson. This file will be used to replace the existing mask for transcript and protein signal assignment.
optional
--labels-key: (type: str default: None)
Specifies the identifier for segmentation labels when loading mask data:
If using a
.npzfile:
Provide the name of the array within the archive that corresponds to the segmentation mask (required if multiple arrays are stored).If using a
.geojsonfile:
By default, cell labels are expected in a column namedlabel.
Use this argument to override and select a different column as the label source.
--in-place: (flag default: False)
By default, outputs are written to
<G4X-DATA>/g4x_helpers/<command>, leaving the source data untouched.
Add--in-placeto write results directly into the providedG4X-DATAfolder (overwriting existing artifacts for that command).
βΈ»