scoreInvHap {scoreInvHap}R Documentation

scoreInvHap: package to get inversion status of predefined regions.

Description

scoreInvHap can get the samples' inversion status of known inversions. scoreInvHap uses SNP data as input and requires the following information about the inversion: genotype frequencies in the different inversion groups, R2 between the region SNPs and inversion status, heterozygote genotypes in the reference, allele frequencies in the reference population and inversion frequencies. The package include this data for two well known inversions (8p23 and 17q21.31) and for two additional validated regions.

This is the main function of 'scoreInvHap' package. This function accepts SNPs data in a plink or a VCF format and compute the inversion prediction.

Usage

scoreInvHap(SNPlist, SNPsR2, hetRefs, Refs, R2 = 0, imputed = FALSE,
  BPPARAM = BiocParallel::bpparam(), verbose = FALSE)

Arguments

SNPlist

List with SNPs data. It should contain genotypes (a SNPmatrix) and map (a data.frame with the annotation)

SNPsR2

Vector with the R2 of the SNPs of the region

hetRefs

Vector with the heterozygote form of the SNP in the inversion

Refs

List with the allele frequencies in the references

R2

Vector with the R2 between the SNPs and the inversion status

imputed

Logical. If TRUE, scores are computed using posterior probabilities. If FALSE, scores are computed using best guess. Only applied when SNPlist is a VCF.

BPPARAM

A BiocParallelParam instance. Used to parallelize computation

verbose

Should message be shown?

Value

A scoreInvHap object

Examples

if(require(VariantAnnotation)){
    vcf <- readVcf(system.file("extdata", "example.vcf", package = "scoreInvHap"), "hg19")
    res <- scoreInvHap(vcf, SNPsR2$inv7p11.2, hetRefs = hetRefs$inv7p11.2,
        Refs$inv7p11.2)
}

[Package scoreInvHap version 1.8.0 Index]