makeGRangesListFromCopyNumber: Make a GRangesList from TCGA Copy Number data

Description Usage Arguments Value Examples

View source: R/makeGRangesListFromCopyNumber.R

Description

makeGRangesListFromCopyNumber allows the user to convert objects of class data.frame or DataFrame to a GRangesList. It includes additional features specific to TCGA data such as, hugo symbols, probe numbers, segment means, and ucsc build (if available).

Usage

1
2
3
4
5
6
makeGRangesListFromCopyNumber(
  df,
  split.field,
  names.field = "Hugo_Symbol",
  ...
)

Arguments

df

A data.frame or DataFrame class object. list class objects are coerced to data.frame or DataFrame.

split.field

A character vector of length one indicating the column to be used as sample identifiers

names.field

A character vector of length one indicating the column to be used as names for each of the ranges in the data

...

Additional arguments to pass on to makeGRangesListFromDataFrame

Value

A GRangesList class object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
library(GenomicDataCommons)
library(magrittr)

manif <- files() %>%
    filter(~ cases.project.project_id == "TCGA-COAD" &
        data_type == "Copy Number Segment") %>%
    manifest(size = 1)

fname <- gdcdata(manif$id)

barcode <- UUIDtoBarcode(names(fname), from_type = "file_id")$cases.submitter_id

cndata <- read.delim(fname[[1L]], nrows = 10L)

cngrl <- makeGRangesListFromCopyNumber(cndata, split.field = "GDC_Aliquot",
    keep.extra.columns = TRUE)

names(cngrl) <- barcode
GenomeInfoDb::genome(cngrl) <- extractBuild(fname[[1L]])
cngrl

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