This function reads a BED file and writes a subset of it based on a list of SNP (rsids) identifiers to output BED, BIM, and FAM files.
writeBED(
bedRead = NULL,
bimRead = NULL,
famRead = NULL,
bedWrite = NULL,
bimWrite = NULL,
famWrite = NULL,
rsids = NULL,
endian = .Platform$endian,
useBytes = TRUE
)
No return value. Files are written to the specified output paths.
The full path to the input BED file to read.
The full path to the input BIM file to read.
The full path to the input FAM file to read.
The full path to the output BED file to write.
The full path to the output BIM file to write.
The full path to the output FAM file to write.
A character vector containing SNP rsids to select from the BIM file.