seqTranspose {SeqArray} | R Documentation

## Transpose Data Array

### Description

Transpose data array or matrix for possibly higher-speed access.

### Usage

    seqTranspose(gdsfile, var.name, compress=NULL, verbose=TRUE)

### Arguments

`gdsfile` | a `SeqVarGDSClass` object
`var.name` | the variable name with '/' as a separator
`compress` | the compression option used in `add.gdsn`; or determine automatically if `NULL`
`verbose` | if `TRUE`, show information

### Details

It is designed for possibly higher-speed access. More details will be provided in the future version.

### Value

None.

### Author(s)

Xiuwen Zheng

### See Also

`seqGetData`, `seqApply`

### Examples

    # the VCF file
    (vcf.fn <- seqExampleFileName("vcf"))

    # convert
    seqVCF2GDS(vcf.fn, "tmp.gds", storage.option="ZIP_RA")

    # list the structure of GDS variables
    f <- seqOpen("tmp.gds", FALSE)
    f

    seqTranspose(f, "genotype/data")
    f

    # the original array
    index.gdsn(f, "genotype/data")
    # the transposed array
    index.gdsn(f, "genotype/~data")

    # close
    seqClose(f)

    # delete the temporary file
    unlink("tmp.gds")

[Package SeqArray version 1.20.2 Index]