fit_bb {bbmix} | R Documentation |
Fit beta binomial distribution to allelic counts for homozygous reference, heterozygous, homozygous alternative
Description
Fit beta binomial distribution to allelic counts for homozygous reference, heterozygous, homozygous alternative
Usage
fit_bb(
counts_f,
depth = 10,
N = 1000,
prefix = NULL,
k = 3,
alpha_p = c(1, 10, 499),
beta_p = c(499, 10, 1),
out,
mc.cores = NULL
)
Arguments
counts_f |
file name with allele counts for SNPs |
depth |
depth cut-off to use to select SNPs to fit distributions |
N |
number of SNPs to use for fitting |
prefix |
charcter with prefix to add for saving files, defaults to NULL |
k |
number of components for mixture model, defaults to 3 |
alpha_p |
alpha parameter for the k components of alpha parameter |
beta_p |
beta paramenter for the k components of Beta parameter |
out |
character with dir name to save output |
mc.cores |
number of cores to use, defaults to parallel detected cores |
Value
saves stan object to file
Examples
## Not run:
## Retrive input files for running call_gt
counts_f <- system.file("extdata/input", "NA12878.chr22.Q20.allelicCounts.txt",
package = "bbmix",
mustWork = TRUE)
out <- tempdir()
fit_bb(counts_f = counts_f, N=10,
out = out, mc.cores=1)
unlink(out)
## End(Not run)
[Package bbmix version 1.0.0 Index]