Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load diseaseCodes from TCGAutils, closes #3 #5

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: subtypeHeterogeneity
Version: 1.0.5
Date: 2020-09-20
Version: 1.0.6
Date: 2025-01-07
Title: Tumor subclonality of expression-based cancer subtypes
Author: Ludwig Geistlinger, Seyhun Oh, Markus Riester, Levi Waldron
Maintainer: Ludwig Geistlinger <[email protected]>
Expand Down
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
Loading