extract_samples: Extract samples from PLINK files

Description Usage Arguments

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

1
2
3
4
5
6
7
8
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 Sept. 16, 2020, 5:55 a.m.