Skip to content

Commit 5fd77ce

Browse files
committed
load diseaseCodes from TCGAutils
1 parent 0f275d2 commit 5fd77ce

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

R/setup_subtype_clonality.R

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
#
88
############################################################
99

10+
## DATA LOAD
11+
dataenv <- new.env(parent = emptyenv())
12+
data("diseaseCodes", package = "TCGAutils", envir = dataenv)
13+
diseaseCodes <- dataenv[["diseaseCodes"]]
14+
1015
## SETUP
11-
ctypes <- TCGAutils::diseaseCodes[,"Study.Abbreviation"]
16+
ctypes <- diseaseCodes[,"Study.Abbreviation"]
1217

1318
## cancer types
1419
.isSubClonal <- function(x) as.integer(x$Subclonal_HSCN_a1 | x$Subclonal_HSCN_a2)
@@ -56,7 +61,7 @@ ctypes <- TCGAutils::diseaseCodes[,"Study.Abbreviation"]
5661

5762
## GISTIC
5863
# @returns: a RangedSummarizedExperiment
59-
gistic2RSE <- function(ctype=TCGAutils::diseaseCodes[,"Study.Abbreviation"],
64+
gistic2RSE <- function(ctype=ctypes,
6065
peak=c("wide", "narrow", "full"), cache=TRUE)
6166
{
6267
ctype <- match.arg(ctype)
@@ -141,7 +146,7 @@ gistic2RSE <- function(ctype=TCGAutils::diseaseCodes[,"Study.Abbreviation"],
141146

142147
## Broad subtypes
143148
# @returns: a matrix with sample IDs as rownames and at least a column "cluster"
144-
getBroadSubtypes <- function(ctype=TCGAutils::diseaseCodes[,"Study.Abbreviation"],
149+
getBroadSubtypes <- function(ctype=ctypes,
145150
clust.alg=c("CNMF", "Consensus_Plus"), cache=TRUE)
146151
{
147152
ctype <- match.arg(ctype)

vignettes/subtypeHeterogeneity.Rmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ names(stcols) <- SUBTYPES
6363

6464
## Cancer types
6565
```{r ctypes}
66-
TCGAutils::diseaseCodes[,c("Study.Abbreviation", "Study.Name")]
66+
data("diseaseCodes", package = "TCGAutils")
67+
diseaseCodes[,c("Study.Abbreviation", "Study.Name")]
6768
```
6869

6970
## ABSOLUTE

0 commit comments

Comments
 (0)