Skip to contents

Saves a genotype dataset (as produced by simulate_genotype()) in PLINK format, using the genio and readr packages.

Usage

save_synthetic_genotype(sim_data, file_prefix)

Arguments

sim_data

A list containing genotype data with elements G, BIM, and FAM.

file_prefix

A character string to use as prefix for output files.

Value

Invisible NULL. Files are written to disk with extensions .bed, .bim, and .fam.

Examples

if (FALSE) { # \dontrun{
  sim <- simulate_synthetic_genotype(n_snps = 100, n_individuals = 20, n_causal_snps = 5)
  save_synthetic_genotype(sim, file_prefix = "my_simulated_data")
} # }