write.beagle: Prepare genotypic data for Beagle

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Create input file for Beagle software (Browning and Browning 2009) from an object of class gpData. This function is created for usage within function codeGeno to impute missing values.

Usage

1
write.beagle(gp, wdir = getwd(), prefix)

Arguments

gp

gpData object with elements geno and map

wdir

character. Directory for Beagle input files

prefix

character. Prefix for Beagle input files.

Details

The Beagle software must be used chromosomewise. Consequently, gp should contain only data from one chromosome (use discard.markers, see Examples).

Value

No value is returned. Function creates files [prefix]ingput.bgl with genotypic data in Beagle input format and [prefix]marker.txt with marker information used by Beagle.

Author(s)

Valentin Wimmer

References

B L Browning and S R Browning (2009) A unified approach to genotype imputation and haplotype phase inference for large data sets of trios and unrelated individuals. Am J Hum Genet 84:210-22

See Also

codeGeno

Examples

1
2
3
4
5
6
7
8
map <- data.frame(chr=c(1,1,1,1,1,2,2,2,2),pos=1:9)
geno <-  matrix(sample(c(0,1,2,NA),size=10*9,replace=TRUE),nrow=10,ncol=9)
colnames(geno) <- rownames(map) <- paste("SNP",1:9,sep="")
rownames(geno) <- paste("ID",1:10+100,sep="")

gp <- create.gpData(geno=geno,map=map)
gp1 <- discard.markers(gp,rownames(map[map$chr!=1,]))
## Not run: write.beagle(gp1,prefix="test")

Example output



synbreed documentation built on May 2, 2019, 3:23 a.m.