par_lasso: Prepare Parameters for Post-processing

Description Usage Arguments Details Value Examples

View source: R/par_lasso.R

Description

Prepare all the parameters used in lasso problem.

Usage

1
2
par_lasso(N, K, g, par_a = 1, mean_X = c(0, -0.5), a = c(1, 1), b = c(0,
  -1))

Arguments

N

Number of loci

K

Number of samples

g

Integer-valued ploidy

par_a

The constant indicating how ploidy infecting the final copy number profile

mean_X

A vector containing mean values of all the recurrent CNV

a

A vector containing the coeffient of the effect of the recurrent CNV with respect to the ploidy value

b

A vector containing the coeffient of the effect of the recurrent CNV with respect to the constant value

Details

In this function, we allow users to change the type of CNV happenning before and after WGD, but these changes should be the same for minor and major copies, for this makes interpretation of these changes much easier.

The default one is set to changes before WGD affecting all samples and changes after WGD only affecting samples without WGD. The mean for these changes are set to 0 and -0.5 respectively, for in most samples with WGD are likely to lose one copy after WGD. These should be the best settings for most datasets (if minor and major copies are not considered seperately), adding or changing the types will usually make interpretation much harder.

This function also calculate a multiplicative matrix and step length used in optimization.

Value

a list containing all the parameters used in solving lasso problem

Examples

1
2
3
4
5
par<-par_lasso(wkdata$nloci,wkdata$nsample,g_int)

##Add CNV that only affct samples without WGD to the model.

par<-par_lasso(wkdata$nloci,wkdata$nsample,g_int,mean_X=c(0,-0.5,0),a=c(1,1,-1),b=c(0,-1,2))

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