readPlinkToMatrixByIndex: Read from binary PLINK file and return a genotype matrix

View source: R/seqminer.R

readPlinkToMatrixByIndexR Documentation

Read from binary PLINK file and return a genotype matrix

Description

Read from binary PLINK file and return a genotype matrix

Usage

readPlinkToMatrixByIndex(plinkFilePrefix, sampleIndex, markerIndex)

Arguments

plinkFilePrefix

a PlinkFileObject obtained by openPlink()

sampleIndex

integer, 1-basd, index of samples to be extracted

markerIndex

integer, 1-basd, index of markers to be extracted

Value

genotype matrix, marker by sample

See Also

http://zhanxw.com/seqminer/ for online manual and examples

Examples

## these indice are nonsynonymous markers for 1:196621007-196716634",
## refer to the readVCFToMatrixByRange()
fileName = system.file("plink/all.anno.filtered.extract.bed", package = "seqminer")
fileName = sub(fileName, pattern = ".bed", replacement = "")
sampleIndex = seq(3)
markerIndex =c(14, 36)
cfh <- readPlinkToMatrixByIndex(fileName, sampleIndex, markerIndex)

seqminer documentation built on Sept. 2, 2023, 9:08 a.m.