Transpose genotypic matrix

Description

Transpose the genotypic matrix if needed.

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# 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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.