| makeGRangesListFromCopyNumber {TCGAutils} | R Documentation |
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).
makeGRangesListFromCopyNumber(df, split.field, names.field = "Hugo_Symbol", ...)
df |
A |
split.field |
A |
names.field |
A |
... |
Additional arguments to pass on to makeGRangesListFromDataFrame |
A GRangesList class object
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), id_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