freq_estimate: Estimation of frequencies of clones identified by 'alphabetr'

Description Usage Arguments Value Examples

View source: R/freq_estimate.R

Description

freq_estimate() estimates the frequencies of clones with confidence intervals by using a maximum likelihood approach. The function looks at the wells that a chains of a clone appear in and determines the most likely frequency that explains the data.

Usage

1
freq_estimate(alpha, beta, pair, error = 0.15, numb_cells)

Arguments

alpha

Matrix recording which alpha chains appear in each well of the data. See create_data.

beta

Matrix recording which beta chains appear in the each well of the data. See create_data.

pair

A matrix where each row is a beta/alpha pair, column 1 and 2 are the beta indices, and column 3 and 4 are the alpha indices, and column 5 is the proportion of replicates the clone was found in (or equal to -1 if the clone is dual)

error

The mean error "dropped" chain rate due to PCR or sequencing errors.

numb_cells

The number of cells per well in each column of the plates. Should be a vector of 12 elements.

Value

A data frame with frequency estimates and confidence intervals

Examples

1
2
3
4
5
6
7
8
9
 ## Not run: 
 # obtained from the output of bagpipe()
 pairs <- pairs[pairs[, 5] > 0.3, ]
 freq  <- freq_estimate(alpha = dat$alpha,
                        beta = dat$beta,
                        pair = pairs,
                        numb_cells = matrix(c(50, 480), ncol = 2))
 
## End(Not run)

edwardslee/alphabetr documentation built on May 13, 2017, 2:04 p.m.