scoreInvHap: scoreInvHap: package to get inversion status of predefined...

Description Usage Arguments Value Examples

View source: R/scoreInvHap.R

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 21 inversions.

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. The list of available inversions is included in a GenomicRanges called 'inversionGR'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
scoreInvHap(
  SNPlist,
  inv = NULL,
  SNPsR2,
  hetRefs,
  Refs,
  R2 = 0,
  probs = FALSE,
  BPPARAM = BiocParallel::SerialParam(),
  verbose = FALSE
)

Arguments

SNPlist

List with SNPs data from plink or VCF-class.

inv

Character with the name of the inversion to genotype. The available inversions are included in a table in the main vignette.

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

probs

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

1
2
3
4
5
6
7
8
9
# See list of inversions
data(inversionGR)
inversionGR

## Run method
if(require(VariantAnnotation)){
    vcf <- readVcf(system.file("extdata", "example.vcf", package = "scoreInvHap"), "hg19")
    res <- scoreInvHap(vcf, inv = "inv7_005")
}

isglobal-brge/scoreInvHap documentation built on Feb. 7, 2021, 8:43 a.m.