write.hap | R Documentation |
This function will write hap result into a txt file.
write.hap(x, file = file, sep = "\t", pheno = pheno, phenoName = phenoName)
x |
objec of hapResult or hapSummary class |
file |
file path, where to save the hap result/summary |
sep |
the field separator string. Values within each row of x are separated by this string.
Default as " |
pheno , phenoName |
the phenotype data.frame, only used for export hapResult object. |
The hap result and hap summary result have common features. The common features of these two types are: First four rows contains extra information: CHR, POS, INFO and ALLELE Hap names were in the first column. The differences are: Hap summary result have a freq column while hap result not. Rows represent haplotypes in hap summary result, while rows represent accessions in hap result. In addtion, the accessions of each haplotype in hap summary result were separated by ";".
No return value
oriDir <- getwd()
temp_dir <- tempdir()
if(! dir.exists(temp_dir))
dir.create(temp_dir)
setwd(temp_dir)
data("geneHapR_test")
write.hap(hapResult, file = "hapResult.txt")
setwd(oriDir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.