Skip to contents

Adjusts the log2 copy ratio and computes the copy number fraction (CNF) for each region, given sample purity and scale factor.

Usage

CRCorrectPurity(cr, gender, purity, sf)

Arguments

cr

Data frame or tibble. Coverage data, must include columns CONTIG and LOG2_COPY_RATIO.

gender

Character. Sample gender ("male" or "female").

purity

Numeric. Tumor purity (fraction between 0 and 1).

sf

Numeric. Scale factor for diploid coverage.

Value

The coverage data frame or tibble with additional columns Segcov, updated LOG2_COPY_RATIO, and CNF.

Details

  • Adjusts the log2 copy ratio using the scale factor.

  • Calculates CNF based on purity and scale factor.

Examples

# CRCorrectPurity(cr, gender = "female", purity = 0.7, sf = 1)