isGctFile: Test a file is a GCT file or not

View source: R/isGctFile.R

isGctFileR Documentation

Test a file is a GCT file or not

Description

Test a file is a GCT file or not

Usage

isGctFile(file, strict.column.names = FALSE)

Arguments

file

Character string, a file name

strict.column.names

Logical, whether the names of the first two columns must be 'NAME(tab)Description'

Details

A file is a valid GCT file if it meets following three rules:

  1. The first line of the file is #1.2

  2. The second line contains number of rows and number of columns, separated by a tab.

  3. The rest of file contain a rectangular matrix, with the first two columns named NAME and Description respectively.

Value

A logical value: TRUE means file is of the GCT format.

References

https://software.broadinstitute.org/cancer/software/genepattern/file-formats-guide

See Also

read_gct_matrix to read in GCT files

Examples

myInFile <- system.file("extdata/test.gct", package="ribiosIO")
isGctFile(myInFile)
myInfileLS <- system.file("extdata/test_lessStrict.gct", package="ribiosIO")
isGctFile(myInfileLS)

ribiosIO documentation built on Feb. 20, 2026, 5:09 p.m.