Skip to contents

Essentially deals with the FIRST large segment. We add small segments from small_segments segments to large_segments that:

  1. End before the first large segment and

  2. Overlap with the first large segment We stop the process whenever we've changed chromosome arms between the small segment and the large segment

Usage

InitalizeSmallSegments(large_segments, small_segments, threshold, granges_obj)

Arguments

large_segments

A data frame. Segments with size >= Mb.

small_segments

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

threshold

A float: the estimated threshold for ratio_median difference via KDE. Used to determine whether we insert the small segment or not.

granges_obj

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