Genotype-call for single-sample next generation sequencing data using empirical Bayes method

Description

Genotype-call tool for single-sample next generation sequencing data using empirical Bayes method.

Usage

1
ebSNP(dat, T1 = 0.5, T2 = 0.5, eps = 0.001, maxstep = 30)

Arguments

dat

A data matrix with two rows, containing the number of major and minor alleles at each position. Each column corresponds to one position.

T1

Lower threshold for genotyping.

T2

Upper threshold for genotyping.

eps

Stopping criteria of EM algorithm.

maxstep

Maximum number of EM iterations.

Value

A list,

pi0.hat

Estimate for pi0, the probability of a position bearing a homozygous genotype.

alpha.hat

Estimate for alpha.

beta.hat

Estimate for beta.

delta

1-g_i.

G

Estimated genotypes.

Author(s)

Na You

References

Single-sample SNP Detection By Empirical Bayes Method Using Next Generation Sequencing Data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
N <- 100
cvg <- 40
pi0 <- 0.95
a <- 1
b <- 10
pi1 <- 1-pi0
z <- rbinom(N,1,pi1)
n.homo <- N-sum(z)
p <- rep(0,N)
p[which(z==0)] <- rbeta(n.homo,a,b)
p[which(z==1)] <- 1/2
nc <- sapply(1-p,function(x) rbinom(1,cvg,x)) 
dat <- rbind(nc,cvg-nc)
ebSNP(dat)
ebSNP(dat,0.1,0.9)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.