set_par: Set Up Parameters for Analysis

Description Usage Arguments Details Value Examples

View source: R/set_par.R

Description

Set up the parameters for the fixed point method.

Usage

1
2
3
set_par(data, r_CNV = c(10, 10), r_ploidy = 5, r_discontinuity = 0.5,
  par_a_m = 1, par_a_p = 1, A_m = c(1, 1), B_m = c(0, -1),
  Mean_m = c(0, -1), A_p = c(1, 1), B_p = c(0, -1), Mean_p = c(0, 0))

Arguments

data

The CNV dataset (see load_data)

r_CNV

Regularizer penalty for all recurrent CNV

r_ploidy

Regularizer penalty for (haplotype) ploiidy

r_discontinuity

Regularizer penalty for the discotinuity between two adjacent loci

par_a_m, par_a_p

The constant indicating how ploidy infecting the final copy number profile for minor and major copy respectively

A_m, A_p

A vector containing the coeffient of the effect of the recurrent CNV with respect to the ploidy value for minor and major copy respectively

B_m, B_p

A vector containing the coeffient of the effect of the recurrent CNV with respect to the constant value for minor and major copy respectively

Mean_m, Mean_p

A vector containing mean values of all the recurrent CNV for minor and major copy respectively

Details

The 2nd and 3rd input are the regularizers for the L2 penalty of CNV before and after WGD, and (haplotype) ploidy from their mean. The 4th input r_discontinuity is a penalty for the difference between two adjacent loci. If this is set to 0, then identity matrix would be used as matrix L in the model.

The following parameters indicate the types of recurrent CNV that should be included into the model. The default setting is the changes before WGD affecting all samples and changes after WGD affecting only samples with WGD. However, for changes after WGD, the mean value is set to 0 for major copy, but -1 to minor copy, because it is common to see 1 copy number loss after WGD on minor copy. A_m,B_m and Mean_m should have the same lenth and so do the ones for major copy. And they should all be smaller or equal to the length of r_CNV.

This function will return all these parameters in a list for fixed-ponit method.

Value

List of parameters used for analysis

Examples

1
CNV_par<-set_par(wkdata)

yun-feng/WGDAP documentation built on Nov. 5, 2019, 1:22 p.m.