View source: R/makeGRangesListFromExonFiles.R
makeGRangesListFromExonFiles | R Documentation |
GRangesList
This function serves to read exon-level expression data. It works for exon quantification (raw counts and RPKM) and junction quantification (raw counts) file paths and represents such data as a GRangesList. The data files can be downloaded via the Genomic Data Commons (GDC) Legacy Archive.
makeGRangesListFromExonFiles(
filepaths,
sampleNames = NULL,
fileNames = basename(filepaths),
getBarcodes = TRUE,
rangesColumn = "exon",
nrows = Inf
)
filepaths |
character() vector of file paths containing TCGA exon data usually obtained from the GDC |
sampleNames |
character() vector of TCGA barcodes to be used as
names for the |
fileNames |
character() vector of file names as downloaded from
the Genomic Data Commons Legacy archive (default |
getBarcodes |
logical(1). Whether to query the GDC API with the
|
rangesColumn |
character(1). The name of the column in the data containing the ranges information (default "exon"); see details. |
nrows |
numeric(1). The number of rows to return from each of the files read in (all rows by default; default Inf) |
The rangesColumn
name in the GDC data files is usually "exon"
but can be changed with the rangesColumn
argument, if different.
To avoid programmatically obtaining TCGA barcodes from the GDC
API, set the getBarcodes
to FALSE
. When getBarcodes
is set to
FALSE
, the file names are used to name the elements of the GRangesList
output.
A GRangesList object
M. Ramos
## 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.