
Deals with merging large segment to small segment.
MergeSegmentsFiveLargeSmall.Rd
Procedure is overall similar to the previous cases. For case five, we have two options when merging:
Merge large and small
Merge small and next large This helper deals with the first option. Note that there is no 'below_thr' parameter for these two helpers, since we already know we're going to merge when they're called in FinalizeSmallSegments.
Arguments
- granges_obj
A GRanges object: is used as reference to obtain true genomic data from specified regions.
- small_segment
An array: the given small segment that might be merged into the
large_segments
frame.- large_segments
A data frame: segment data. Initially contains only segments with size >= 3Mb, but as we merge small segments into it, smaller segments are progressively added.
- j
An integer/index: the position of the large segment we're comparing with small_segment, within
large_segments
.- end_of_file
A boolean: whether there's any large segments after
j
.