Reads imputed genotypes and SNP information from FImpute output, builds a SnpMatrix and a corresponding map, and returns an SNPDataLong object.

read.fimpute(file, method = c("R", "Rcpp"))

Arguments

file

Character. Path to the FImpute output directory (usually "output_fimpute").

method

Character. "R" (default) for vectorized R implementation, or "Rcpp" for compiled C++ implementation.

Value

An object of class SNPDataLong with three slots: geno (a SnpMatrix with individuals as rows and SNPs as columns), map (a data.frame with columns Name, Chromosome, and Position), and path (the input directory).

Examples

if (FALSE) { # \dontrun{
# Requires a directory containing FImpute output files
# (genotypes_imp.txt and snp_info.txt).
snp_long <- read.fimpute("output_fimpute", method = "R")
} # }