sub-.PlinkFile: Read from binary PLINK file and return a genotype matrix

Description Usage Arguments Value See Also Examples

Description

Read from binary PLINK file and return a genotype matrix

Usage

1
2
## S3 method for class 'PlinkFile'
plinkFileObject[sampleIndex, markerIndex]

Arguments

plinkFileObject

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

1
2
3
4
5
6
7
8
## these indice are nonsynonymous markers for 1:196621007-196716634",
## refer to the readVCFToMatrixByRange()
fileName = system.file("plink/all.anno.filtered.extract.bed", package = "seqminer")
filePrefix = sub(fileName, pattern = ".bed", replacement = "")
plinkObj = openPlink(filePrefix)
sampleIndex = seq(3)
markerIndex =c(14, 36)
cfh <- plinkObj[sampleIndex, markerIndex]

seqminer documentation built on March 26, 2020, 5:31 p.m.