Description Usage Arguments Value Author(s) Examples
A pdf file containing EM fitting results and plots is generated.
1 2 | plot_EM_fit(Y_qc, gc_qc, norm_index, T, ploidyInt, beta0,
minCountQC = 20, filename)
|
Y_qc |
read depth matrix across all cells after quality control |
gc_qc |
vector of GC content for each bin after quality control |
norm_index |
indices of normal/diploid cells |
T |
a vector of integers indicating number of CNV groups.
Use BIC to select optimal number of CNV groups.
If |
ploidyInt |
a vector of initialized ploidy return from
|
beta0 |
a vector of initialized bin-specific biases returned from CODEX2 without latent factors |
minCountQC |
the minimum read coverage required for EM fitting.
Defalut is |
filename |
the name of output pdf file |
pdf file with EM fitting results and two plots: log likelihood, and BIC versus the number of CNV groups.
Rujin Wang rujin@email.unc.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | Gini <- get_gini(Y_sim)
# first-pass CODEX2 run with no latent factors
normObj.sim <- normalize_codex2_ns_noK(Y_qc = Y_sim,
gc_qc = ref_sim$gc,
norm_index = which(Gini<=0.12))
Yhat.noK.sim <- normObj.sim$Yhat
beta.hat.noK.sim <- normObj.sim$beta.hat
fGC.hat.noK.sim <- normObj.sim$fGC.hat
N.sim <- normObj.sim$N
# Ploidy initialization
ploidy.sim <- initialize_ploidy(Y = Y_sim,
Yhat = Yhat.noK.sim,
ref = ref_sim)
ploidy.sim
plot_EM_fit(Y_qc = Y_sim, gc_qc = ref_sim$gc,
norm_index = which(Gini<=0.12), T = 1:7,
ploidyInt = ploidy.sim,
beta0 = beta.hat.noK.sim,
filename = 'plot_EM_fit_demo.pdf')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.