Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 | write.beagle(gp, wdir = getwd(), prefix)
|
gp |
|
wdir |
|
prefix |
|
The Beagle software must be used chromosomewise. Consequently, gp
should contain only data from one chromosome (use discard.markers, see Examples
).
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.
Valentin Wimmer
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
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.