Skip to contents

This function exports all the information of a gen_tibble object into a PLINK bed, ped or raw file (and associated files, i.e. .bim and .fam for .bed; .fam for .ped).

Usage

gt_as_plink(
  x,
  file = NULL,
  type = c("bed", "ped", "raw"),
  overwrite = TRUE,
  chromosomes_as_int = FALSE
)

Arguments

x

a gen_tibble object

file

a character string giving the path to output file. If left to NULL, the output file will have the same path and prefix of the backingfile.

type

one of "bed", "ped" or "raw"

overwrite

boolean whether to overwrite the file.

chromosomes_as_int

boolean whether to use the integer representation of the chromosomes

Value

the path of the saved file

Details

If the gen_tibble has been read in from vcf format, family.ID in the resulting plink files will be the same as sample.ID.