Skip to contents

Does a lot of things. In InitializeSmallSegments, we insert all the small segments that come before the first large segment in large_segments (hence initializing). In FinalizeSmallSegments, we insert all the remaining small segments, according to 6 different cases, which are listed in the FinalizeSmallSegments documentation. In the end, returns the updated large_segments with small segments appropriately re-inserted.

Usage

InsertSmallSegments(large_segments, small_segments, threshold, granges_obj)

Arguments

large_segments

A data frame. Segments with size >= 3Mb.

small_segments

A data frame. Segments with 3Mb > size >= 0.1Mb.

threshold

A float: the estimated threshold for ratio_median difference via KDE.

granges_obj

A GRanges object: is used as reference to check whenever we have an overlap of segments and get the ratio_median of this overlap.