Skip to content

Commit

Permalink
load diseaseCodes from TCGAutils
Browse files Browse the repository at this point in the history
  • Loading branch information
LiNk-NY committed Jan 6, 2025
1 parent 0f275d2 commit 5fd77ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions R/setup_subtype_clonality.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
#
############################################################

## DATA LOAD
dataenv <- new.env(parent = emptyenv())
data("diseaseCodes", package = "TCGAutils", envir = dataenv)
diseaseCodes <- dataenv[["diseaseCodes"]]

## SETUP
ctypes <- TCGAutils::diseaseCodes[,"Study.Abbreviation"]
ctypes <- diseaseCodes[,"Study.Abbreviation"]

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

## GISTIC
# @returns: a RangedSummarizedExperiment
gistic2RSE <- function(ctype=TCGAutils::diseaseCodes[,"Study.Abbreviation"],
gistic2RSE <- function(ctype=ctypes,
peak=c("wide", "narrow", "full"), cache=TRUE)
{
ctype <- match.arg(ctype)
Expand Down Expand Up @@ -141,7 +146,7 @@ gistic2RSE <- function(ctype=TCGAutils::diseaseCodes[,"Study.Abbreviation"],

## Broad subtypes
# @returns: a matrix with sample IDs as rownames and at least a column "cluster"
getBroadSubtypes <- function(ctype=TCGAutils::diseaseCodes[,"Study.Abbreviation"],
getBroadSubtypes <- function(ctype=ctypes,
clust.alg=c("CNMF", "Consensus_Plus"), cache=TRUE)
{
ctype <- match.arg(ctype)
Expand Down
3 changes: 2 additions & 1 deletion vignettes/subtypeHeterogeneity.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ names(stcols) <- SUBTYPES

## Cancer types
```{r ctypes}
TCGAutils::diseaseCodes[,c("Study.Abbreviation", "Study.Name")]
data("diseaseCodes", package = "TCGAutils")
diseaseCodes[,c("Study.Abbreviation", "Study.Name")]
```

## ABSOLUTE
Expand Down

0 comments on commit 5fd77ce

Please sign in to comment.