| gsynth.cell_merge | R Documentation |
Unlike gsynth.bin_map, which merges bins independently along
each dimension, gsynth.cell_merge resolves per-joint-cell
redirects: each entry redirects one specific training cell (identified by
its per-dimension values) to another specific training cell. This lets
callers redirect arbitrary cells whose Cartesian position cannot be
expressed via per-axis merges (e.g., “cell (GC=0.725, CG=0.05) –>
cell (GC=0.70, CG=0.08)”).
gsynth.cell_merge(model, cell_merge, bin_merge = NULL)
model |
A |
cell_merge |
A list of redirect specifications. Each entry is a named list with:
A single data frame with columns |
bin_merge |
Optional sampling-time bin merge specification (same format
as in |
This function is primarily a utility for inspecting / debugging what
gsynth.sample will do when invoked with the cell_merge
argument. It returns a data frame describing, for every entry, the resolved
source and target cells in both per-dimension-bin and flat-bin space.
A data frame with one row per cell_merge entry and columns:
from_<d>, to_<d> for each dimension d:
1-based bin index after any bin_merge remapping.
source_flat, target_flat: 1-based flat bin index
into model$model_data$cdf.
gsynth.bin_map, gsynth.sample
## Not run:
# Resolve a redirect table before handing it to gsynth.sample:
redirects <- list(
list(from = c(0.725, 0.05), to = c(0.70, 0.08)),
list(from = c(0.75, 0.06), to = c(0.70, 0.08))
)
resolved <- gsynth.cell_merge(model, redirects)
print(resolved)
gsynth.sample(model, "out.fa",
output_format = "fasta",
cell_merge = redirects
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.