gmt2h5: Convert GMT to HDF5 File

View source: R/utilities.R

gmt2h5R Documentation

Convert GMT to HDF5 File

Description

Read gene sets from large gmt file in batches, convert the gene sets to 01 matrix and write the result to an HDF5 file.

Usage

gmt2h5(gmtfile, dest_h5, by_nset = 5000, overwrite = FALSE)

Arguments

gmtfile

character(1), path to gmt file containing gene sets

dest_h5

character(1), path of the hdf5 destination file

by_nset

number of gene sets 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

gmt <- system.file("extdata", "test_gene_sets_n4.gmt", 
        package="signatureSearch")
h5file <- tempfile(fileext=".h5")
gmt2h5(gmtfile=gmt, dest_h5=h5file, overwrite=TRUE)

girke-lab/signatureSearch documentation built on Feb. 21, 2024, 8:32 a.m.