|
| 1 | +# Input Data |
| 2 | + |
| 3 | +Baysor consumes a molecule table plus an optional prior segmentation input. |
| 4 | + |
| 5 | +## Supported Molecule Inputs |
| 6 | + |
| 7 | +The `coordinates` positional argument may be: |
| 8 | + |
| 9 | +- CSV molecule table |
| 10 | +- Parquet molecule table |
| 11 | +- `experiment.xenium` |
| 12 | + |
| 13 | +When `experiment.xenium` is used, Baysor resolves the adjacent Xenium |
| 14 | +transcript table automatically and keeps enough source context to make the |
| 15 | +legacy outputs compatible with `xeniumranger import-segmentation`. |
| 16 | + |
| 17 | +## Required Molecule Columns |
| 18 | + |
| 19 | +At minimum, Baysor needs: |
| 20 | + |
| 21 | +- `x` |
| 22 | +- `y` |
| 23 | +- `gene` |
| 24 | + |
| 25 | +If the data are 3D, it can also use: |
| 26 | + |
| 27 | +- `z` |
| 28 | + |
| 29 | +Column names are configurable through CLI flags or the config file. |
| 30 | + |
| 31 | +## Common Column Mapping Flags |
| 32 | + |
| 33 | +- `--x-column` |
| 34 | +- `--y-column` |
| 35 | +- `--z-column` |
| 36 | +- `--gene-column` |
| 37 | +- `--qv-column` |
| 38 | + |
| 39 | +For Xenium, [configs/xenium.toml](../configs/xenium.toml) already maps: |
| 40 | + |
| 41 | +- `x_location` |
| 42 | +- `y_location` |
| 43 | +- `z_location` |
| 44 | +- `feature_name` |
| 45 | +- `qv` |
| 46 | + |
| 47 | +## Optional Source Columns |
| 48 | + |
| 49 | +Depending on the workflow, the input table may also carry: |
| 50 | + |
| 51 | +- a transcript-native prior column such as `cell_id` |
| 52 | +- confidence / quality columns |
| 53 | +- Xenium `transcript_id` |
| 54 | + |
| 55 | +For Xenium-origin inputs, Baysor preserves `transcript_id` so it can be written |
| 56 | +back to `legacy` output when appropriate. |
| 57 | + |
| 58 | +## Cropping During Input Load |
| 59 | + |
| 60 | +The C++ branch supports spatial filtering during input loading: |
| 61 | + |
| 62 | +- `--x-min`, `--x-max` |
| 63 | +- `--y-min`, `--y-max` |
| 64 | +- `--z-min`, `--z-max` |
| 65 | + |
| 66 | +This is useful for: |
| 67 | + |
| 68 | +- quick development runs |
| 69 | +- protocol debugging |
| 70 | +- visualization crops |
| 71 | +- testing large datasets without loading the full field of view |
| 72 | + |
| 73 | +## Protocol Notes |
| 74 | + |
| 75 | +### Xenium |
| 76 | + |
| 77 | +Preferred input: |
| 78 | + |
| 79 | +```bash |
| 80 | +./build/baysor run -c configs/xenium.toml data/experiment.xenium :cell_id |
| 81 | +``` |
| 82 | + |
| 83 | +### ISS / osm-FISH / STARmap |
| 84 | + |
| 85 | +These usually use CSV molecule tables plus either: |
| 86 | + |
| 87 | +- no prior, with explicit `--scale` |
| 88 | +- an image mask prior |
| 89 | +- a boundary file prior |
| 90 | + |
| 91 | +See [Examples](examples.md) for runnable commands. |
0 commit comments