Skip to contents

Calculates the original coverage for a segment based on its segment mean (log2 ratio), gender, chromosome, and assumed diploid coverage.

Usage

SegmentMeanToOriCov(SM, gender, chromosome, diploid_cov)

Arguments

SM

Numeric. The segment mean (log2 ratio) from CNV analysis.

gender

Character. Sample gender, either "male" or "female".

chromosome

Character or factor. Chromosome name (e.g., "1", "2", ..., "X", "Y").

diploid_cov

Numeric. The expected coverage for a diploid region (e.g., 100).

Value

Numeric. The estimated original coverage for the segment.

Details

For males and sex chromosomes ("X" or "Y"), the diploid coverage is halved. For all other cases, the segment mean is scaled by the full diploid coverage.

Examples

SegmentMeanToOriCov(SM = 0, gender = "male", chromosome = "X", diploid_cov = 100)
#> [1] 50
SegmentMeanToOriCov(SM = 0.5, gender = "female", chromosome = "3", diploid_cov = 100)
#> [1] 141.4214