bhts {BHTSpack}R Documentation

Bayesian High-Throughput Screening

Description

This is the package main function.

Usage

bhts(Z, iters, H, K, mu00=NULL, mu10=NULL, a.alpha, b.alpha, a.tau, b.tau, 
pnorm=FALSE, s=NULL, store=FALSE)

Arguments

Z

A list of compounds.

iters

Number of iterations to perform.

H

Number of local DP components.

K

Number of global DP components.

mu00

Activity level (mean) of non-hit compounds

mu10

Activity level (mean) of hit compounds

a.alpha

Gamma shape parameter specifying local DP concentration prior.

b.alpha

Gamma rate parameter specifying local DP concentration prior.

a.tau

Gamma shape parameter specifying global DP concentration prior.

b.tau

Gamma rate parameter specifying global DP concentration prior.

pnorm

Plate normalization. If TRUE, each plate is normalized to zero mean and unit variance, prior to analysis. Default is FALSE.

s

Random seed (for reproducibility purposes). Default is NULL.

store

If TRUE, all samples of certain latent variables are stored in the output object. Default is FALSE.

Value

This function returns a list consisting of the following elements:

hatpai

A list of vectors of posterior probabilities, estimating the probability of a compound being a hit.

dat.store

If store=TRUE (default is FALSE), the output contains a list of iters\timesK matrices of samples. Each matrix contains the samples of a separate latent variable. At each iteration, the following six variables are stored in a different row of their corrpsponding matrix, (\lambda_{1}^{(0)},\ldots,\lambda_{K}^{(0)}), (\lambda_{1}^{(1)},\ldots,\lambda_{K}^{(1)}), (\mu_{01},\ldots,\mu_{0K}), (\mu_{11},\ldots,\mu_{1K}), (\sigma_{01}^2,\ldots,\sigma_{0K}^2) and (\sigma_{11}^2,\ldots,\sigma_{1K}^2).

Examples

  set.seed(1234)
  Nmax = 100
  M = 100
  n = sample(Nmax, M, replace=TRUE)
  Z = lapply(n, function(x){abs(rnorm(x))})
  bhts(Z, iters=100, H=10, K=5, mu00=0, mu10=10, a.alpha=10, b.alpha=5, a.tau=10, b.tau=5)

[Package BHTSpack version 0.6 Index]