| gsynth.bin_map | R Documentation |
Converts value-based bin merge specifications into a bin_map named vector
that can be used with gsynth.train. This allows you to
specify merges using actual track values rather than bin indices.
gsynth.bin_map(breaks, merge_ranges = NULL)
breaks |
Numeric vector of bin boundaries (same as used in
|
merge_ranges |
List of merge specifications. Each specification is a named list with:
|
A named vector (bin_map) compatible with bin_map parameter
in gsynth.train. The names are source bin indices
(1-based), and values are target bin indices (1-based).
gsynth.train
# Define breaks for GC content [0, 1] in 0.025 increments
breaks <- seq(0, 1, 0.025)
# Merge all GC content above 70% (0.7) into the bin (0.675, 0.7]
bin_map <- gsynth.bin_map(
breaks = breaks,
merge_ranges = list(
list(from = 0.7, to = c(0.675, 0.7))
)
)
# Multiple merges: merge low GC (< 0.3) and high GC (> 0.7) into middle bins
bin_map2 <- gsynth.bin_map(
breaks = breaks,
merge_ranges = list(
list(from = c(-Inf, 0.3), to = c(0.4, 0.425)), # low GC -> (0.4, 0.425]
list(from = 0.7, to = c(0.675, 0.7)) # high GC -> (0.675, 0.7]
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.