read.beagle {snpStats} | R Documentation

## Read genotypes imputed by the BEAGLE program

### Description

The BEAGLE program generates, for each SNP and each subject, posterior probabilities for the three genotypes. This function reads such data as a `SnpMatrix` object, storing the posterior probabilities to as much accuracy allowed by a one-byte coding

### Usage

    read.beagle(file, rownames=NULL, nsnp = NULL, header=TRUE)

### Arguments

`file` | The input file name. This file my be gzipped.
`rownames` | The row names (sample identifiers) for the matrix
`nsnp` | The number of SNPs to be read in. This corresponds with the number of lines in the input file. If not supplied, the function does a preliminary pass to determine the number of lines
`header` | Set this `TRUE` if the file contains a header line (it won't for older versions of BEAGLE)

### Details

In later versions of BEAGLE, row names are listed on a header line. However, if the `rownames` argument is supplied, this will take precedence over the header line. If there is no header line and no row names are supplied, names are generated as `Sample1`, `Sample2` etc.

No provision is made for data for the X chromosome. Such data must be first read as a `SnpMatrix` and subsequently coerced to an `XSnpMatrix` object

### Value

an object of class `SnpMatrix`

### Author(s)

David Clayton dc208@cam.ac.uk

### See Also

`SnpMatrix-class`

### Examples

    ##---- No example available yet

[Package snpStats version 1.44.0 Index]