snpgdsTranspose {SNPRelate}R Documentation

Transpose genotypic matrix

Description

Transpose the genotypic matrix if needed.

Usage

snpgdsTranspose(gds.fn, snpfirstdim=FALSE, compress=NULL, optimize=TRUE,
    verbose=TRUE)

Arguments

gds.fn

the file name of SNP GDS format

snpfirstdim

if TRUE, genotypes are stored in snp-by-sample; if FALSE, sample-by-snp mode; if NA, force to transpose the SNP matrix

compress

the compression mode for SNP genotypes, optional values are defined in the function of add.gdsn; if NULL, to use the compression mode

optimize

if TRUE, call cleanup.gds after transposing

verbose

if TRUE, show information

Value

None.

Author(s)

Xiuwen Zheng

Examples

# the file name of SNP GDS
(fn <- snpgdsExampleFileName())

# copy the file
file.copy(fn, "test.gds", overwrite=TRUE)

# summary
snpgdsSummary("test.gds")

# transpose the SNP matrix
snpgdsTranspose("test.gds", snpfirstdim=TRUE)

# summary
snpgdsSummary("test.gds")


# delete the temporary file
unlink("test.gds", force=TRUE)

[Package SNPRelate version 1.10.2 Index]