Calls PLINK to convert .ped and .map files to the .bed format, reducing file size significantly.

convert_geno_file(ped_file, bed_file = ped_file, del = TRUE, plink_path = TRUE)

Arguments

ped_file

path and name of the file to be converted, excluding file extension.

bed_file

path of the .bed file to be written, excluding file extension.

del

if TRUE, deletes the ped_file after conversion.

plink_path

TRUE if user has added PLINK to the system variable "PATH". Otherwise a string specifying the path to the folder containing plink.exe.

Value

Does not return anything, but writes the converted ped_file to disk at the path bed_file.

Details

Both the .map and .ped files generated by the simulation need to be present with the same name in the same directory. The conversion combines the .ped and .map into three new files, being of format .bed, .bim and .fam. The .bed file is the one actually holding genotypes, but all three files are used by PLINK in regressions.
Be aware that while .ped files can be viewed in most text editors (as long as their size allows it), .bed files can not.