rel2abs: rel2abs

rel2absR Documentation

rel2abs

Description

rescales CN values from relative to "absolute" (i.e. per cancer cell copy) scale given purity and ploidy

Usage

rel2abs(
  gr,
  purity = NA,
  ploidy = NA,
  gamma = NA,
  beta = NA,
  field = "ratio",
  field.ncn = "ncn",
  data_mean = NA,
  ncn.gr = NA,
  allele = FALSE,
  return.params = FALSE
)

Arguments

gr

GRanges input with meta data field corresponding to mean relative copy "mean" in that interval

purity

purity of sample

ploidy

ploidy of sample

gamma

gamma fit of solution (over-rides purity and ploidy)

beta

beta fit of solution (over-rides purity and ploidy)

field

meta data field in "gr" variable from which to extract signal, default "ratio"

field.ncn

meta data field in "gr" variable from which to extract germline integer copy number, default "ncn", if doesn't exist, germline copy number is assumed to be zero

data_mean

optionally provide a mean value to use in the transformation. Usually a mean value is computed from the input data, but in unique cases, where the input data does not represent the full set of data, then this value could be provided. For example, this is usefull when transforming SNV read counts, you can provide the ALT read count as the input that you want transformed, and provide the average count of ALT + REF as the data_mean

ncn.gr

GRanges with the copy number values for normal samples (if the field.ncn is found in the input gr then the ncn.gr parameter is ignored). Notice the the input ncn.gr must contain the field specified by field.ncn

allele

(logical) whether to return allelic CNs. If TRUE, assumes that the GRanges is "melted" and there are two identical ranges per SNP. Default FALSE.

Details

takes in gr with signal field "field"

Value

numeric vector of integer copy numbers


mskilab/skitools documentation built on Aug. 31, 2023, 1:13 p.m.