Skip to contents

Most of the work is done by GatherSegmentsByRatioMedianHelper. Essentially, we iterate through the rows of bam_ratios_frame, and keep track of adjacent rows that have the same ratio_median and are in the same chromosome arm. Whenever any of these 2 conditions is false, we merge the segments up until that point. More information is in the helper function.

Finally, adds a 'Size' column to bam_ratios_frame.

Usage

GatherSegmentsByRatioMedian(bam_ratios_frame)

Arguments

bam_ratios_frame

A data frame: the cleaned up version of the bam_ratios.txt file. In the pipeline, this segment data has already had its spurious regions removed, and a chromosome arm column has been added/determined.