parse.gctx {cmapR} | R Documentation

## Parse a GCTX file into the workspace as a GCT object

### Description

Parse a GCTX file into the workspace as a GCT object

### Usage

    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

    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))

[Package cmapR version 1.2.1 Index]