gctx2h5: Convert GCTX to HDF5 File

View source: R/utilities.R

gctx2h5R Documentation

Convert GCTX to HDF5 File

Description

Read matrix-like data from large gctx file in chunks and write result back to an HDF5 file.

Usage

gctx2h5(gctx, cid, new_cid = cid, h5file, by_ncol = 5000, overwrite = TRUE)

Arguments

gctx

character(1), path to gctx file from LINCS

cid

character or integer vector referencing the columns of the matrix to include

new_cid

character vector of the same length as cid, assigning new column names to matrix

h5file

character(1), path of the hdf5 destination file

by_ncol

number of columns to import in each iteration to limit memory usage

overwrite

TRUE or FALSE, whether to overwrite or to append to existing 'h5file'

Value

HDF5 file

Examples

gctx <- system.file("extdata", "test_sample_n2x12328.gctx", 
        package="signatureSearch")
h5file <- tempfile(fileext=".h5")
gctx2h5(gctx, cid=1:2, 
        new_cid=c('sirolimus__MCF7__trt_cp', 'vorinostat__SKB__trt_cp'), 
        h5file=h5file, overwrite=TRUE)

yduan004/signatureSearch documentation built on Feb. 19, 2024, 9:30 a.m.