| baymap {BayMAP} | R Documentation |
The baymap function runs BayMAP on PAR-CLIP data to detect PAR-CLIP induced T-to-C substitution positions on binding sites.
baymap(data, count = "count", coverage = "coverage",
mutation = "mutation", mutation.type = "TC",
covariates = NULL, dist = c("truncated", "binomial"),
dep = TRUE, n.chains = 1, n.iter = 1500, thin = 1,
sd.mu = c(1e-04, 1e-04, 1e-04), inits.z = NULL,
inits.q = NULL, inits.mu = NULL, inits.beta = NULL,
ran = FALSE, cluster = "cluster", inits.tau = NULL,
print.i = NULL, save_log = FALSE,
save_file = "./results_tmp.RData")
data |
a data frame with at least the count for mutations per genomic position, the number of reads/coverage and the mutation type (e.g., T-to-C). |
count |
the name of the variable that counts the number of mutations. |
coverage |
the name of the variable that contains the number of reads. |
mutation |
the name of the variable that contains the different types of mutations. |
mutation.type |
the name of the mutation type that is induced by the PAR-CLIP method. |
covariates |
a vector containing the names for the covariates for the regression model, e.g., c("tpUTR", "cds", "fpUTR"). Intercept is automatically added as first variable. |
dist |
the distribution for the number of mutations. Possible entries are "truncated" (default) and "binomial. |
dep |
a logical value for defining if dependencies between mismatches and SNPs are considered (default) or not. |
n.chains |
number of Markov chains (default: 1). |
n.iter |
number of total iterations per chain (including burn in; default 1500). |
thin |
thinning rate. Must be a positive integer. Set |
sd.mu |
a vector containing three values of standard deviations for the sampling of |
inits.z |
a vector containing as inits an allocation for each position, where 1 stands for an experimental induced substitution position, 2 for a SNP and 3 for a mismatch. |
inits.q |
a numerical value between 0 and 1 containing as init the conditional probability for a mismatch position given the subsitions are not experimentally induced. |
inits.mu |
a numerical vector containing as inits three values between 0 and 1 for the substitution probability due to the PAR-CLIP method, due to SNPs and due to mismatches. |
inits.beta |
a numerical vector containing as inits the parameter vector for the covariates. Only necessary if the vector |
ran |
a logical value indicating if neighborhood dependencies should be included via a random effect (default) or not. |
cluster |
the name of the varialbe indicating to which cluster a position belongs. Only necessary if |
inits.tau |
a numerical value containing as inits the standard deviation of the random effect if |
print.i |
a positive integer indicating if every ith iteration step should be printed. |
save_log |
a logical value indicating if temporary results should be saved or not (default). |
save_file |
file name where temporary results should be stored if |
The returned object is a list with sampled MCMC chains for each parameter as entries and an entry with acceptance values for each sampled value for the parameter mu.
Eva-Maria Huessler, eva-maria.huessler@uni-duesseldorf.de
Huessler, E., Schaefer, M. Schwender, H., Landgraf, P. (2019): BayMAP: A Bayesian hierarchical model for the analysis of PAR-CLIP data. Bioinformatics, 35(12), 1992-2000.
## Not run:
data(data_test)
res <- baymap(data = data_test,
inits.mu = c(0.05, 0.85, 0.2), n.iter = 4500)
## End(Not run)