cleanup.gds {gdsfmt} | R Documentation

## Clean up fragments

### Description

Clean up the fragments of a CoreArray Genomic Data Structure (GDS) file.

### Usage

    cleanup.gds(filename, verbose=TRUE)

### Arguments

`filename` | the file name of a GDS file to be opened
`verbose` | if `TRUE`, show information

### Value

None.

### Author(s)

Xiuwen Zheng

### References

http://github.com/zhengxwen/gdsfmt

### See Also

`openfn.gds`, `createfn.gds`, `closefn.gds`

### Examples

    # cteate a GDS file
    f <- createfn.gds("test.gds")

    # commom types
    add.gdsn(f, "int", val=1:10000)
    L <- -2500:2499
    add.gdsn(f, "int.matrix", val=matrix(L, nrow=100, ncol=50))

    # save a .RData object
    obj <- list(X=1:10, Y=seq(1, 10, 0.1))
    save(obj, file="tmp.RData")
    addfile.gdsn(f, "tmp.RData", filename="tmp.RData")

    f

    # close the GDS file
    closefn.gds(f)

    # clean up fragments
    cleanup.gds("test.gds")

    # open ...
    (f <- openfn.gds("test.gds"))
    closefn.gds(f)

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

[Package gdsfmt version 1.26.1 Index]