States which replicate suffixes and marker flags mean "these files are one unit" and which mean "these files are different units". Getting this wrong is silent in both directions, so each rule is explicit.
Usage
cr_merge_rules(
merge_suffix = "\\.1$",
merge_marker = "merge_unit",
keep_separate = "\\.2$",
reacquisition = "reacquisition",
merge_reacquisition = TRUE,
separate_suffix = "re"
)
# S3 method for class 'cr_merge_rules'
print(x, ...)Arguments
- merge_suffix
Regular expression matched against the replicate index, marking a second acquisition pass.
NULLdisables.- merge_marker
Name of a logical column that must be
TRUEfor amerge_suffixmatch to merge, orNULLto merge on the suffix alone. When the column is absent no suffix merging happens.- keep_separate
Regular expression matched against the replicate index, marking indices that must never merge.
NULLdisables.- reacquisition
Name of a logical column marking repeated reads, or
NULL.- merge_reacquisition
Logical. Fold repeated reads into their plain sibling. Default
TRUE.- separate_suffix
Suffix appended to the replicate index of a repeated read when
merge_reacquisition = FALSE. Default"re".- x
A
cr_merge_rules.- ...
Ignored.
Details
merge_suffixmatches the replicate index of a file that is the second pass over a unit that already exists. Left unmerged, such a unit draws a full cell allocation twice and is double-weighted in its own batch.merge_markernames a logical column (typically produced bycr_extract_markers()) that must also beTRUEbefore a suffix match is merged. Requiring the marker is the conservative default: a suffix on its own is not evidence.keep_separatematches replicate indices that look mergeable but are a different physical unit. It always wins overmerge_suffix.cr_centroid_overlap()is the evidence test for deciding which of the two a given suffix is.reacquisitionnames the logical column marking a repeated read. Withmerge_reacquisition = TRUEsuch a file folds into its plain sibling; otherwiseseparate_suffixis appended so it stays a unit of its own.
See also
cr_assign_units(), cr_extract_markers(),
cr_centroid_overlap().
Other import:
cr_assign_units(),
cr_centroid_overlap(),
cr_column_map(),
cr_extract_markers(),
cr_filename_grammar(),
cr_marker_rules(),
cr_parse_paths(),
cr_path_spec(),
cr_read_cellprofiler(),
cr_read_cells(),
cr_read_design(),
cr_read_export(),
cr_read_exports(),
cr_read_qupath(),
cr_read_segmantr(),
cr_unit_map()
Examples
cr_merge_rules()
#> <cr_merge_rules>
#> • merge suffix: "\\.1$"
#> • gated on marker: "merge_unit"
#> • kept separate: "\\.2$"
#> • merge repeated reads: TRUE
cr_merge_rules(merge_marker = NULL, keep_separate = NULL)
#> <cr_merge_rules>
#> • merge suffix: "\\.1$"
#> • gated on marker: "no"
#> • kept separate: "disabled"
#> • merge repeated reads: TRUE