get_exp_geno: Function to generates the expected probabilities of the...

Description Usage Arguments Value

Description

Using the genotype likelihood for case and controls from VCF file to generates the population frequency by calling function calc_EM and then use it to calculate the expected genotype probabilities E(P(G_ij|D_ij)) by calling function calc_EG. Variants with homozygous call in the whole sample (the std of their E(P(G_ij|D_ij)) <10^4) will be removed and the expected genotype probability will be reorganized so that the top rows are for case and the rest for controls.

Usage

1
get_exp_geno(A0M, A1M, A2M, B0M, B1M, B2M, chr, loc)

Arguments

A0M

Genotype likelihood for major homozygous of the cases, output of filter_VCF_SNPs.

A1M

Genotype likelihood for minor heterozygous of the cases, output of filter_VCF_SNPs.

A2M

Genotype likelihood for minor homozygous of the cases, output of filter_VCF_SNPs.

B0M

Genotype likelihood for major homozygous of the controls, output of filter_VCF_SNPs.

B1M

Genotype likelihood for minor heterozygous of the controls, output of filter_VCF_SNPs.

B2M

Genotype likelihood for minor homozygous of the controls, output of filter_VCF_SNPs.

chr

chromosome of the variant, output from the function filter_VCF_SNPs

loc

location of the variant, output from the function filter_VCF_SNPs.

Value

a list includes a matrix (exp_cond_prob) contains the expected genotype likelihood for each person (row) at each locus (column); a matrix (pop_freq) for genotype frequency in all the sample at each locus (size: number of variant *3); a data frame (SNPs) contains chr and loc of the returned variants and number of variants (nrm_hom) removed because of homozygous calls in the whole sample.


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