sd.bfile: Obtain the SNP-wise standard deviations from the PLINK bfile

View source: R/sd.bfile.R

sd.bfileR Documentation

Obtain the SNP-wise standard deviations from the PLINK bfile

Description

Obtain the SNP-wise standard deviations from the PLINK bfile

Usage

sd.bfile(
  bfile,
  keep = NULL,
  remove = NULL,
  extract = NULL,
  exclude = NULL,
  chr = NULL,
  trace = 0,
  ...
)

Arguments

bfile

plink file stem

keep

samples to keep

remove

samples to remove

extract

SNPs to extract

exclude

SNPs to exclude

chr

a vector of chromosomes

Details

keep, remove could take one of three formats: (1) A logical vector indicating which indivduals to keep/remove, (2) A data.frame with two columns giving the FID and IID of the indivdiuals to keep/remove (matching those in the .fam file), or (3) a character scalar giving the text file with the FID/IID. Likewise extract, exclude can also take one of the three formats, except with the role of the FID/IID data.frame replaced with a character vector of SNP ids (matching those in the .bim file).

Note

Missing genotypes are interpreted as having the homozygous A2 alleles in the PLINK files (same as the --fill-missing-a2 option in PLINK).


SeojinHwang/scadsum documentation built on June 30, 2023, 10:52 p.m.