# 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]
)
)
Run the code above in your browser using DataLab