parse_gctx: Parse a GCTX file into the workspace as a GCT object

Description Usage Arguments Details Value See Also Examples

View source: R/io.R

Description

Parse a GCTX file into the workspace as a GCT object

Usage

1
2
3
parse.gctx(...)

parse_gctx(fname, rid = NULL, cid = NULL, matrix_only = FALSE)

Arguments

...

arguments passed on to parse_gctx

fname

path to the GCTX file on disk

rid

either a vector of character or integer row indices or a path to a grp file containing character row indices. Only these indicies will be parsed from the file.

cid

either a vector of character or integer column indices or a path to a grp file containing character column indices. Only these indicies will be parsed from the file.

matrix_only

boolean indicating whether to parse only the matrix (ignoring row and column annotations)

Details

parse_gctx also supports parsing of plain text GCT files, so this function can be used as a general GCT parser.

Value

a GCT object

See Also

Other GCTX parsing functions: GCT, append.dim(), fix.datatypes(), process_ids(), read.gctx.ids(), read.gctx.meta(), write.gctx.meta(), write.gctx(), write.gct()

Examples

1
2
3
4
5
6
7
8
gct_file <- system.file("extdata", "modzs_n25x50.gctx", package="cmapR")
(ds <- parse_gctx(gct_file))

# matrix only
(ds <- parse_gctx(gct_file, matrix_only=TRUE))

# only the first 10 rows and columns
(ds <- parse_gctx(gct_file, rid=1:10, cid=1:10))

cmapR documentation built on Dec. 12, 2020, 2 a.m.