calc_pobs_ndepth: Function to calculate the likelihood matrix P(D|G) given a...

Description Usage Arguments Value

Description

This function calculates a likelihood matrix P(D|G) given a vector of error rates and a vector of sequence reads, where D is the sequencing data and G is the true genotype. It uses function calc_psingle to calculate the likelihood for each read given one possible genotype (AA, Aa or aa). It is called from function generate_seqdata.

Usage

1
calc_pobs_ndepth(Error, vect_row_reads, ndepth = 1)

Arguments

Error

vector of sequencing error rates. Similarly as error in the function seq_call, but concatenate all error values over all samples.

vect_row_reads

row vector of sequence reads consisting of 'A','G','T' or 'C', similar as output from function seq_call, but concatenated over all samples in same fashion as Error.

ndepth

integer, read depth, should have value the same as length of error or length of vect_row_reads.

Value

a matrix with 3 columns representing P(read|AA), P(read|Aa) and P(read|aa), where row numbers equal to ndepth.


Struglab/RVS documentation built on May 9, 2019, 3:11 p.m.