segment {CODEX} | R Documentation |
Recursive segmentation algorithm for CNV detection and genotyping, using normalized read depth from whole exome sequencing.
segment(Y_qc, Yhat, optK, K, sampname_qc, ref_qc, chr, lmax, mode)
Y_qc |
Raw read depth matrix after quality control procedure returned from
|
Yhat |
Normalized read depth matrix returned from
|
optK |
Optimal value |
K |
Number of latent Poisson factors. Can be an integer if optimal solution has been chosen or a vector of integers so that AIC, BIC, and RSS are computed for choice of optimal k. |
sampname_qc |
Vector of sample names after quality control procedure returned from
|
ref_qc |
IRanges object of genomic positions of each exon after quality control
procedure returned from |
chr |
Chromosome number returned from |
lmax |
Maximum CNV length in number of exons returned. |
mode |
Can be either "integer" or "fraction", which respectively correspond to format of the returned copy numbers. |
Final callset of CNVs with genotyping results.
Yuchao Jiang yuchaoj@wharton.upenn.edu
Y_qc <- qcObjDemo$Y_qc Yhat <- normObjDemo$Yhat BIC <- normObjDemo$BIC K <- normObjDemo$K sampname_qc <- qcObjDemo$sampname_qc ref_qc <- qcObjDemo$ref_qc chr <- bambedObjDemo$chr finalcall <- segment(Y_qc, Yhat, optK = K[which.max(BIC)], K = K, sampname_qc, ref_qc, chr, lmax = 200, mode = "integer") finalcall