Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

snp_plinkRmSamples

Remove samples


Description

Create new bed/bim/fam files by removing samples with PLINK.

Usage

snp_plinkRmSamples(
  plink.path,
  bedfile.in,
  bedfile.out,
  df.or.files,
  col.family.ID = 1,
  col.sample.ID = 2,
  ...,
  verbose = TRUE
)

Arguments

plink.path

Path to the executable of PLINK 1.9.

bedfile.in

Path to the input bedfile.

bedfile.out

Path to the output bedfile.

df.or.files

Either

  • A data.frame,

  • A character vector of file names where to find at the information you want. You should have one column for family IDs and one for sample IDs.

col.family.ID

Index of the column containing the family IDs to match with those of the study. Default is the second one.

col.sample.ID

Index of the column containing the sample IDs to match with those of the study. Default is the first one.

...

Any additional parameter to pass to bigreadr::fread2(). Particularly, option header = FALSE is sometimes needed.

verbose

Whether to show PLINK log? Default is TRUE.

Value

The path of the new bedfile.

See Also


bigsnpr

Analysis of Massive SNP Arrays

v1.10.8
GPL-3
Authors
Florian Privé [aut, cre], Michael Blum [ths], Hugues Aschard [ths], Bjarni Jóhann Vilhjálmsson [ths]
Initial release
2022-07-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.