classifSNPs: Get similarity scores and probability

Description Usage Arguments Details Value

View source: R/classifSNPs.R

Description

This function computes the similarity scores between the sample SNPs and the haplotype's reference.

Usage

1
2
3
4
5
6
7
8
9
classifSNPs(
  genos,
  R2,
  refs,
  alleletable,
  BPPARAM = BiocParallel::SerialParam()
)

classifSNPsImpute(genos, R2, refs, BPPARAM = BiocParallel::SerialParam())

Arguments

genos

Matrix with the samples genotypes. It is the result of getGenotypesTable

R2

Vector with the R2 between the SNPs and the inversion status.

refs

List of matrices. Each matrix has, for an SNP, the frequencies of each genotype in the different haplotypes.

alleletable

Data frame with the reference alleles computed with getAlleleTable.

BPPARAM

A BiocParallelParam instance. Used to parallelize computation

Details

classifSNPs computes, for each individual, similarity scores for all the present haplotypes. For each SNP, we compute as many similarity scores as haplotypes present in the reference. We have defined the similarity score as the frequency of this genotype in the different haplotype population. To compute the global similarity score, we have computed a mean of the scores by SNP weighted by the R2 between the SNP and the haplotype classification.

classifSNPsImpute is a version of classifSNPs that works with posterior probabilities of imputed genotypes.

Value

List with the results:


isglobal-brge/snpfier documentation built on Feb. 10, 2021, 3:29 a.m.