internals: tryNA

Description Usage Arguments Value

Description

silently get what you can out of an expression

silently get what you can out of an expression

Pull the GT (maximum likelihood genotype) from a vcf file snp row.

Pull the DS (alternate allele dosage) from a vcf file snp row.

Pull the GP (genotype probabilities) from a vcf file snp row.

Usage

1
2
3
4
5
6
7
8
9
tryNA(expr)

tryNULL(expr)

pull_GT(snp_row, min_gt_count)

pull_DS(snp_row)

pull_GP(snp_row)

Arguments

expr

the expression to try to evaluate

snp_row

the snp row from the VCF file (first cell is FORMAT)

min_gt_count

minimum number of observations required to keep a genotype group in the study. Five is the default, but I advocate a slightly higher value for research (10 or 20 maybe).

Value

If the expression evaluates without error, the evaluated expression. If there is an error in evaluating the expression, NA. Warnings are suppresssed.

If the expression evaluates without error, the evaluated expression. If there is an error in evaluating the expression, NULL. Warnings are suppresssed.

a data.frame where the first column is the ID and the second column is the genotype

a data.frame where the first column is the ID and the second column is the genotype

a data.frame where the first column is the ID and the second and third columns are genotype probabilities


rcorty/mvGWAS documentation built on May 31, 2019, 1:58 p.m.