ge_model_microhap1: create matrix C for probability of observed genotypes from...

View source: R/ge_model_microhap1.R

ge_model_microhap1R Documentation

create matrix C for probability of observed genotypes from microhaplotype data

Description

This is intended for the case where the genotypes in question are composed of alleles that are actually the multi-SNP haplotypes obtained from next generation sequence data. In other words, all the SNPs occur on a single read and the phase is known because they are all together on the read. It allows for a per-locus or a per-SNP-specific sequencing error rate. The haplotypes must be named as strings of A, C, G, or T, (though they could be strings of any characters—the function isn't going to check that!) and for now we assume that if the SNPs are multiallelic then genotyping errors to either of the alternate alleles are equally likely. Currently assumes that genotyping errors are equally likely in either direction at a SNP, too.

Usage

ge_model_microhap1(
  L,
  miscall_rate = 0.005,
  dropout_rate = 0.005,
  per_snp_rate = FALSE
)

Arguments

L

an element of the list created by long_markers_to_X_l_list. Such an element basically holds the information at a single locus. The idea here is that every ge_mod_* function takes in an object like L, and then can use any piece of information in it about alleles or genotypes to configure a genotyping error model.

miscall_rate

The rate at which microhaplotype alleles are mis-called. If option per_snp_rate is TRUE, then this is the rate at which each SNPs might get miscalled, such that the pverall miscall rate for microhaplotypes with more SNPs is higher than for microhaplotypes with few SNPs.

dropout_rate

Rate of allelic dropout.

per_snp_rate

Logical. If true, then the overall mis-call rate for the microhaplotype locus is miscall_rate times the number of SNPs in the microhapotype. The default is FALSE, and it this option is not really recommended.

Examples

# here is some example information about a microhap:
example_L_microhap

# now we can feed it in to the function with default parameter values.

eriqande/CKMRsim documentation built on Aug. 2, 2024, 7:23 a.m.