Learn R Programming

MultiCNVDetect (version 0.1-1)

MultiCNVDetect: Multiple Copy number variation Detection

Description

Detects copy number variation regions with fused lasso and group lasso regression,solved by BCGD algorithm.

Arguments

Details

Package:
MultiCNVDetect
Type:
Package
Version:
0.1.0
Date:
2012-10-07
License:
GPL(>=2.0)
The most important function is las_bycgd that detects CNV regions.

Examples

Run this code
sigma<-0.4;a<-0.5;i<-matrix(1:980,980,1);n<-15
J<-matrix(1:n,ncol=1)
g<-function(i) 0.25*sigma*sin(a*pi*i)
err<-function(i){
  set.seed(i);
  return(rnorm(980,0,sigma))
}
y<-matrix(,n,980);set.seed(123)
a1<-matrix(rnorm(n,0,1),n,300);
a2<-matrix(rnorm(n,0,1),n,380);
y[,1:300]<--0.2
y[,301:480]<-0.8
y[,481:980]<--0.2
y15<-y+t(apply(J,1,err))+apply(J,1,g)
rm(J,i,a,n,sigma,err,g,a1,a2,y)
beta15<-las_bycgd(y15);
plot(y15[1,],col=2,xlab="genome order",ylab="log2 ratio",
     main="n=15(the first sample)",ylim=c(-1.5,2))
lines(beta15[1,],col=4)

Run the code above in your browser using DataLab