ExtractGt: A function to extract a genotype from a vcfR::VCF object.

Description Usage Arguments Value Examples

Description

A function to extract a genotype from a vcfR::VCF object.

Usage

1
2
ExtractGt(vcf, min.depth = NULL, min.sample.qual = NULL,
  min.variant.qual = NULL, include.depth = FALSE, verbose = TRUE)

Arguments

vcf

A vcfR::VCF object

min.depth

Optional. A threshold depth under which the data will be censored (possibly a positive Integer)

min.sample.qual

Optional. A threshold ratio under which the samples with too much missing data will be removed (from 0 to 1)

min.variant.qual

Optional. A threshold ratio under which the variants with too much missing data will be removed (from 0 to 1)

include.depth

If TRUE, will return a list of matrix including the genotype as list$gt and the depth as list$dp

verbose

Logical. If TRUE (default), report status of the process along the execution

Value

A genotype matrix from the vcfR object.

Examples

1
2
3
4
5
6
## Not run: 
ExtractGt(vcf)
ExtractGt(vcf, min.sample.qual = 0.65, min.variant.qual = 0.4)
ExtractGt(vcf, min.depth = 4, verbose = FALSE)

## End(Not run)

laurentlab-mpipz/rsurvival documentation built on May 29, 2019, 9:14 a.m.