Description Usage Arguments Value Author(s) References Examples
View source: R/HiCseg_linkC_R.R
This function makes the link between C language and the R software. It consists in a two-dimensional segmentation approach.
1 | HiCseg_linkC_R(size_mat, nb_change_max, distrib, mat_data, model)
|
size_mat |
Size of the data matrix |
nb_change_max |
Maximal number of change-points |
distrib |
Distribution of the data: "B" is for Negative Binomial distribution, "P" is for the Poisson distribution and "G" is for the Gaussian distribution. |
mat_data |
Matrix of data |
model |
Type of model: "D" for block-diagonal and "Dplus" for the extended block-diagonal model. |
Contains three attributes :
t_hat |
Contains the estimated change-points |
J |
Values of the log-likelihood for different number of change-points up to some constants |
t_est_mat |
It gives the matrix of the estimated change-points for different number of change-points: in the first line when there is no change-point, in the second line when there is one change-point, in the third line when there are two change-points.... |
Celine Levy-Leduc
The method developped in this package is described in the paper "Two-dimensional segmentation for analyzing HiC data" by C. Levy-Leduc, M. Delattre, T. Mary-Huard and S. Robin, submitted to ECCB 2014.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## The function is currently defined as
HiCseg_linkC_R <-
function(size_mat,nb_change_max,distrib,mat_data,model)
{
K=nb_change_max^2
tmp=.C("Fonction_HiC_R",as.integer(size_mat),as.integer(nb_change_max),
as.character(distrib),as.double(as.vector(mat_data)),
t_hat=as.integer(rep(0,nb_change_max)),J=as.double(rep(0.0,nb_change_max)),
t_est=as.integer(rep(0,K)),as.character(model))
t_est_mat=matrix(tmp$t_est,ncol=nb_change_max,byrow=T)
return(list(t_hat=tmp$t_hat,J=tmp$J,t_est_mat=t_est_mat))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.