snpgdsGEN2GDS {SNPRelate} | R Documentation |
Convert an Oxford GEN file (text format) to a GDS file.
snpgdsGEN2GDS(gen.fn, sample.fn, out.fn, chr.code=NULL, call.threshold=0.9, version=c(">=2.0", "<=1.1.5"), snpfirstdim=FALSE, compress.annotation="ZIP_RA.max", compress.geno="", verbose=TRUE)
gen.fn |
the file name of Oxford GEN text file(s), it could be a vector indicate merging all files |
sample.fn |
the file name of sample annotation |
out.fn |
the output GDS file |
chr.code |
a vector of chromosome code according to |
call.threshold |
the threshold to determine missing genotypes |
version |
either |
snpfirstdim |
if TRUE, genotypes are stored in the individual-major mode, (i.e, list all SNPs for the first individual, and then list all SNPs for the second individual, etc) |
compress.annotation |
the compression method for the GDS variables,
except "genotype"; optional values are defined in the function
|
compress.geno |
the compression method for "genotype"; optional
values are defined in the function |
verbose |
if TRUE, show information |
GDS – Genomic Data Structures, the extended file name used for storing genetic data, and the file format is used in the gdsfmt package.
NOTE : the sample file format (sample.fn
) has changed with the
release of SNPTEST v2. Specifically, the way in which covariates and phenotypes
are coded on the second line of the header file has changed. version
has
to be specified, and the function uses ">=2.0" by default.
Return the file name of GDS format with an absolute path.
Xiuwen Zheng
http://www.stats.ox.ac.uk/~marchini/software/gwas/file_format.html
cat("running snpgdsGEN2GDS ...\n") ## Not run: snpgdsGEN2GDS("test.gen", "test.sample", "output.gds", chr.code=1) ## End(Not run)