read.plink {snpMatrix} | R Documentation

## Read a PLINK binary data file as a snp.matrix

### Description

The package PLINK saves genome-wide association data in groups of three files, with the extensions `.bed`, `.bim`, and `.fam`. This function reads these files and creates an object of class `"snp.matrix"`

### Usage

    read.plink(bed, bim, fam)

### Arguments

`bed` | The name of the file containing the packed binary SNP genotype data
`bim` | The file containing the SNP descriptions
`fam` | The file containing subject (and, possibly, family) identifiers. This is basically a tab-delimited "pedfile"

### Details

If the `bed` argument does not contain a filename with the file extension `.bed`, then this extension is appended to the argument. The remaining two arguments are optional; their default values are obtained by replacing the `.bed` filename extension by `.bim` and `.fam` respectively

### Value

An object of class `"snp.matrix"`. The column names are the SNP names as listed in the `bim` file. If the subject identifiers in the `fam` file are not duplicated, these are used for the row names of the output object. But, if there are duplicated subject identifiers, the row names are generated by concatenating the family and subject identifiers (separated by the character `:`)

### Author(s)

David Clayton david.clayton@cimr.cam.ac.uk

### References

~put references to the literature/web site here ~

### See Also

`read.HapMap.data` `read.snps.pedfile`, `read.snps.chiamo`,`read.snps.long`, `snp.matrix-class`, `X.snp.matrix-class`

[Package snpMatrix version 1.8.0 Index]