Skip to contents

Estimates the coverage scale factor (covsf) for a specified chromosome or subregion, based on segment mean and probe count.

Usage

EstimateCovSF(chromosome, start, end, seg)

Arguments

chromosome

Character. Chromosome name (e.g., "1", "X").

start

Numeric or NULL. Start coordinate of the region. If NULL, uses the first segment start in the chromosome.

end

Numeric or NULL. End coordinate of the region. If NULL, uses the last segment end in the chromosome.

seg

Data frame or tibble. Segment data, must include columns Chromosome, Start, End, Segment_Mean, and Num_Probes.

Value

Numeric. The estimated coverage scale factor (covsf) for the specified region.

Details

The function calculates a weighted mean coverage based on the segment means and probe counts within the specified region. If start or end are not provided, the entire chromosome is used for estimation.

Examples

# EstimateCovSF("3", start = NULL, end = NULL, seg = seg_df)
# EstimateCovSF("7", start = 100000, end = 500000, seg = seg_df)