Migrating from Julia¶
The C++ implementation uses the same Baysor method but ships as a native binary. CLI syntax and some output formats differ; results are not promised to be identical to Julia. The old documentation is archived at 0.7.1 (Julia).
Installation¶
Use a release binary or Docker; Julia is not required. If you need the last Julia implementation instead, pin its revision:
using Pkg
Pkg.add(PackageSpec(url="https://github.com/kharchenkolab/Baysor.git", rev="v0.7.1"))
Pkg.build("Baysor")
Follow the archived installation guide for Julia requirements. The default branch is C++, so an unpinned Julia package install is no longer appropriate.
CLI changes¶
The subcommands remain baysor run, baysor preview and baysor segfree.
Start with Cell segmentation for a working command.
- Set a positive
-mon the CLI or in a config; there is no fallback value. - For segmentation, supply
-s/--scaleor a usable prior. Scale is not inferred from-malone. - Replace dotted Julia-era overrides such as
--config.data.exclude-genes='Blank*'with flat flags such as--exclude-genes 'Blank*', or edit the TOML config passed with-c. - Use
--threadsorOMP_NUM_THREADS, notJULIA_NUM_THREADS. - TIFF masks and
:column_namepriors remain supported; MATLAB.matmasks are not. CSV / Parquet boundary tables are also accepted. - Compartment options (
--nuclei-genes/--cyto-genes) are not implemented in C++; setting either makesrunexit with an error.
New controls include Parquet output, molecule-clustering alternatives, quality filtering, coordinate crops and convergence tolerance. See the CLI reference rather than translating old commands flag by flag.
Config files¶
Most existing configs can be reused, but check the C++ key reference for behavior:
[data]is an alias for[molecules].- Prefer
[prior]for prior settings. The old[segmentation].unassigned_prior_labeland[segmentation].estimate_scale_from_centersremain accepted. ncv_methodandmin_pixels_per_cellare accepted but do not affect the C++ pipeline.max_plot_sizecontrols molecule-image size in HTML reports.max_z_slices(default10) controls the layer count for 3D polygons.
CLI flags still override config values. Output-directory and format choices are CLI-only, not config keys.
Outputs¶
-o now names a directory (default segmentation), not a Julia-era file
prefix. Other changes:
- HTML reports are named
diagnostic_report.htmlandsegmentation_plot.html(Julia:segmentation_diagnostics.htmlandsegmentation_borders.html). - In
segmentation.csv, noise has cell name0, not an empty string.is_noiseistrue/falsewhen transcript IDs are retained, and1/0otherwise. - Loom count matrices use genes × cells orientation.
--output-style parquetwrites Parquet / GeoParquet tables and a 10x-style HDF5 matrix. Use legacy output for Xenium Ranger.
See Outputs for the file list and Output file formats for exact schemas.