extract_samples: Extract samples from PLINK files

extract_samplesR Documentation

Extract samples from PLINK files

Description

This function reads PLINK files, extracts a subset of samples, and writes new PLINK files using write_plink. It's probably slower than running the equivalent command in PLINK directly, but it can be useful to do this from within R. When inds or pops is provided, only a subset of samples will be extracted.

Usage

extract_samples(
  inpref,
  outpref,
  inds = NULL,
  pops = NULL,
  overwrite = FALSE,
  verbose = TRUE
)

Arguments

inpref

Prefix of the PLINK input files

outpref

Prefix of the PLINK output files

inds

Individuals which should be extracted

pops

Populations which should be extracted. Can not be provided together with inds

overwrite

Set this to TRUE if inpref == outpref and you really want to overwrite the input files.

verbose

Print progress updates


uqrmaie1/admixtools documentation built on Nov. 3, 2024, 12:56 a.m.