getSupplementaryData: Download Supplementary file and get the data using GEO...

View source: R/getSupplementaryData.R

getSupplementaryDataR Documentation

Download Supplementary file and get the data using GEO accession ID

Description

Download Supplementary file and get the data using GEO accession ID

Usage

getSupplementaryData(
  accession = "GSE121213",
  sep = "\t",
  header = TRUE,
  suppFile = NULL
)

Arguments

accession

GEO accession ID, the default is "GSE121213", sep = '\t', header = TRUE, suppFile = NULL

sep

the field separator character. Values on each line of the file are separated by this character. The default is '\t'.

header

a logical value indicating whether the file contains the names of the variables as its first line. If missing, the value is determined from the file format: header is set to TRUE if and only if the first row contains one fewer field than the number of columns. The default is FALSE.

suppFile

supplementary file name. In some of the GEO projects, there are multiple supplementary files provided. In this case, 'getSupplementaryData' function by default reads the first file and shows a warning. If a supplementary file name is specified by this parameter, 'getSupplementaryData' will read the data using this file name without showing a warning. is specified,

Value

a list, comprised of 'data', file 'extension', 'accession', 'filename', and 'url'.

Examples

## Not run: 
# Get the suplementary data for accession ID: GSE121213
x = getSupplementaryData()
x
x$data

# Get the suplementary data for accession ID: GSE121212
x = getSupplementaryData("GSE121212")
x
x$data

# Get the suplementary data for accession ID: GSE130567
# This suplementary file is a .tar file, which contains 24 .txt.gz files.
x = getSupplementaryData("GSE130567", header = FALSE)
x
x$data

# You will get a warning because of multiple supplementary files
x = getSupplementaryData("GSE69626")
x$data
x$filename

# Specify a file name to avoid the warning
x = getSupplementaryData("GSE69626", suppFile = "GSE69626_RPKMGEO.txt.gz")
x$data
x$filename

## End(Not run)

paodan/SRRDownloader documentation built on Aug. 25, 2023, 3:23 a.m.