benchmark_imputation: Benchmark mice imputation

Description Usage Arguments Value

View source: R/metawas.r

Description

Hide a percent of the observations and compare the results of imputation via mice with the original observations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
benchmark_imputation(
  geno,
  snp,
  outdir,
  p = 0.1,
  m = 5,
  verbose = FALSE,
  seed = NA,
  block_size = 100
)

Arguments

geno

A data table in BIMBAM format. Must contain one row per SNP, the first three columns must be site_id, minor_allele and major allele, followed by one column per sample. Missing values must be encoded as NA.

snp

A data table with snp information in BIMBAM format. Must contain columns ID, pos and chr in that order. Column ID must correspond to column site_id in geno.

outdir

Output directory to write the results.

p

Fraction of observations to hide.

m

Number of imputations performed. See mice documentation.

verbose

Whether to print progress on imputation.

seed

Seed for random sambling of data and for imputation if needed.

block_size

Number of markers to use to impute each marker.

Value

A list with elements r, p.imputed, res, and imputed_geno_file.


surh/HMVAR documentation built on Aug. 18, 2021, 1:21 a.m.