phase_mixed_genotypes: Phase mixed genotypes

View source: R/data_manip.R

phase_mixed_genotypesR Documentation

Phase mixed genotypes

Description

mixed genotype phasing based on the number of reads supporting each allele of the heterozygous site. Imputation will be done nsim times and phased data with highest correlation between MAF from raw data and MAF from phased data will be retained

Usage

snpdata = phase_mixed_genotypes(snpdata)

Arguments

snpdata

a SNPdata object

nsim

an integer. the number of simulations to be performed

Details

when both alleles are not supported by any read or the total number of reads supporting both alleles at a given site is < 5, the genotype will be phased based on a bernouli distribition using the MAF as a parameter. Similarly, when the total number of reads is > 5 and the number of reads supporting one of the allele is not 2 times the number of the other allele, the genotype is phased using a bernouli distribution

Value

a SNPdata object with an additional table named as "Phased". this will contain the phased genotypes


FellouMada/rSNPdata documentation built on June 12, 2022, 7:29 p.m.