Description Usage Arguments Details Value See Also Examples
Fit a mixture model to estimate mosaicism and XCI-escape.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
genic_dt |
A |
model |
A |
plot |
A |
hist |
A |
flag |
A |
xciGenes |
A |
a0 |
A |
optimizer |
A |
method |
A |
limits |
A |
keep_params |
A |
debug |
A |
The model determines the number of components used in the mixture model. By default, "AUTO" tries all combinations of mixtures and the best estimate is kept using backward selection based on AIC. M0 is a simple beta-binomial. M1 adds a binomial component to model the sequencing errors. M2 jointly models the probability of misclasification in the training set. MF include all 3 components.
Flags in the output reports issues in convergence. If flag
is set to 0,
nothing is done. If set to 1, the model selection will avoid flagged models
(will favor parcimonious models).
If set to 2, calls for which the best selected model had convergence issue
will be removed.
A data.table
with an entry per sample and per gene.
getGenicDP readXCI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(data.table)
# Simulated data
dtf <- system.file("extdata/data2_vignette.tsv", package = "XCIR")
dt <- fread(dtf)
xcigf <- system.file("extdata/xcig_vignette.txt", package = "XCIR")
xcig <- readLines(xcigf)
# Run all models on the data
all <- betaBinomXI(dt, xciGenes = xcig)
# Simple BetaBinomial model and show histogram of skewing ~~A~~~
bb <- betaBinomXI(dt, xciGenes = xcig, model = "M0", hist = TRUE)
# Plotting fits
stoshow <- paste0("sample", c(31, 33, 35, 40)) #interesting samples
plotQC(all[sample %in% stoshow], xcig = xcig)
# Summarizing results
# Sample information
samps <- sample_clean(all)
# Gene-level predictions
xcistates <- getXCIstate(all)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.