makeGRangesListFromExonFiles: Read Exon level files and create a GRangesList

Description Usage Arguments Value Author(s) Examples

View source: R/makeGRangesListFromExonFiles.R

Description

This function serves to read exon-level expression data. It works for exon quantification (raw counts and RPKM) and junction quantification (raw counts) files paths and represent such data as a GRangesList. The data can be downloaded via the TCGA Legacy Archive. File name and structure requirements are as follows: The third position delimited by dots (".") in the file name should be the universally unique identifier (UUID). The column containing the ranged information is labeled "exon."

Usage

1
2
3
4
5
6
7
makeGRangesListFromExonFiles(
  filepaths,
  sampleNames = NULL,
  fileNames = NULL,
  rangesColumn = "exon",
  nrows = Inf
)

Arguments

filepaths

A character vector of valid exon data file paths

sampleNames

A character vector of TCGA barcodes to be applied if not present in the data (default NULL)

fileNames

A character vector of file names as downloaded from the Genomic Data Commons Legacy archive (default NULL)

rangesColumn

(default "exon") A single string indicating the name of the column in the data containing the ranges information

nrows

The number of rows to return from each of the files read in (all rows by default)

Value

A GRangesList object

Author(s)

M. Ramos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Load example file found in package
pkgDir <- system.file("extdata", package = "TCGAutils", mustWork = TRUE)
exonFile <- list.files(pkgDir, pattern = "cation\\.txt$", full.names = TRUE)

filePrefix <- "unc.edu.32741f9a-9fec-441f-96b4-e504e62c5362.1755371."

## Add actual file name manually (due to Windows OS restriction)
makeGRangesListFromExonFiles(exonFile,
    fileNames = paste0(filePrefix, basename(exonFile)),
    sampleNames = "TCGA-AA-3678-01A-01R-0905-07")

TCGAutils documentation built on April 17, 2021, 6:04 p.m.