baymap {BayMAP}R Documentation

A Bayesian hierarchical model for the Analysis of PAR-CLIP data

Description

The baymap function runs BayMAP on PAR-CLIP data to detect PAR-CLIP induced T-to-C substitution positions on binding sites.

Usage

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")

Arguments

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 n.thin > 1 to save memory and computation time if n.iter is large.

sd.mu

a vector containing three values of standard deviations for the sampling of mu with a normal jumping distribution.

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 covariates is not NULL.

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 ran is set to TRUE.

inits.tau

a numerical value containing as inits the standard deviation of the random effect if ran is set to TRUE.

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 save_log is set to TRUE.

Value

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.

Author(s)

Eva-Maria Huessler, eva-maria.huessler@uni-duesseldorf.de

References

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.

See Also

predict.baymap

Examples

## 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)

[Package BayMAP version 2.0.1 Index]