Skip to contents

Resets level to 0 for all segments, except for the first segment which is assigned 1. Then, iterates through the rest: For a segment 'i', if it is in the same chromosome arm as previous segment 'i-1' and their ratio median difference is below the threshold, then segment 'i' gets 'i-1”s level. Otherwise, it is 'i-1”s level + 1.

Usage

GetSegmentID(threshold, segments)

Arguments

threshold

A float: threshold for ratio_median difference previously estimated.

segments

A data frame: segment data.