readSampleInfoFromGEO {limma}R Documentation

Read Sample Characteristics From GEO Series Matrix File

Description

Read sample annotation from a GEO Series Matrix File into data.frames.

Usage

readSampleInfoFromGEO(file, remove.constant.columns = TRUE)

Arguments

file

file name or path of GEO series matrix file.

remove.constant.columns

logical, if TRUE then columns that have the same entry for every sample are removed.

Details

This function parses a GEO series matrix file. Sample characteristics associated with expression channels 1 and 2 are separated into separate data.frames. The function particularly allows for the fact that not every sample characteristic will have an entry for every sample.

Value

A list with three components:

SampleInfo

character matrix of sample annotation.

CharacteristicsCh1

character matrix of sample characteristics associated with expression channel 1.

CharacteristicsCh2

character matrix of sample characteristics associated with expression channel 2.

Each sample corresponds to one row.

Author(s)

Gordon Smyth

See Also

An overview of LIMMA functions for reading data is given in 03.ReadingData.

Examples

# This example downloads a series matrix file of about 33MB
## Not run: 
url <- "https://ftp.ncbi.nlm.nih.gov/geo/series/GSE40nnn/GSE40115/matrix/GSE40115-GPL15931_series_matrix.txt.gz"
download.file(url, "GSE40115.txt.gz")
a <- readSampleInfoFromGEO("GSE40115.txt.gz")
colnames(a$SampleInfo)
colnames(a$CharacteristicsCh1)
colnames(a$CharacteristicsCh2)

## End(Not run)

[Package limma version 3.50.3 Index]