Skip to content

Commit

Permalink
Merge pull request #16 from ToxPi/ggplot
Browse files Browse the repository at this point in the history
Added ggplot2 capabilities
  • Loading branch information
SkylarMarvel authored Jan 5, 2024
2 parents 36a9fa9 + 252b1fe commit 68b9323
Show file tree
Hide file tree
Showing 24 changed files with 975 additions and 257 deletions.
7 changes: 5 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Authors@R:
comment = c(ORCID = "0000-0001-5447-0129")),
person("Skylar W", "Marvel",
role = "aut"),
person("Jonathon", "Fleming",
role = "aut"),
person("Alison A", "Motsinger-Reif",
role = c("fnd"),
comment = c(ORCID = "0000-0003-1346-2493")),
Expand Down Expand Up @@ -41,10 +43,11 @@ Imports:
BiocGenerics,
pryr,
tidyr,
utils
utils,
ggplot2
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
Depends:
R (>= 4.0)
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ exportMethods(plot)
exportMethods(sort)
exportMethods(txpCalculateScores)
exportMethods(txpIDs)
exportMethods(txpMissing)
exportMethods(txpModel)
exportMethods(txpRanks)
exportMethods(txpResultParam)
Expand All @@ -53,6 +54,7 @@ exportMethods(txpSlices)
exportMethods(txpTransFuncs)
exportMethods(txpValueNames)
exportMethods(txpWeights)
import(ggplot2)
import(grid)
import(methods)
importClassesFrom(S4Vectors,List)
Expand Down
19 changes: 10 additions & 9 deletions R/allClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ setClassUnion("TxpTransFunc_OR_NULL", members = c("TxpTransFunc", "NULL"))
#' @rdname TxpTransFuncList-class
#' @exportClass TxpTransFuncList

setClass("TxpTransFuncList",
contains = "SimpleList",
setClass("TxpTransFuncList",
contains = "SimpleList",
prototype = prototype(elementType = "TxpTransFunc_OR_NULL"))

##----------------------------------------------------------------------------##
Expand All @@ -43,7 +43,7 @@ setClass("TxpTransFuncList",
#' @rdname TxpSlice-class
#' @exportClass TxpSlice

setClass("TxpSlice",
setClass("TxpSlice",
slots = c(txpValueNames = "character",
txpTransFuncs = "TxpTransFuncList"))

Expand All @@ -66,8 +66,8 @@ setClass("TxpSliceList",
#' @rdname TxpModel-class
#' @exportClass TxpModel

setClass("TxpModel",
slots = c(txpSlices = "TxpSliceList",
setClass("TxpModel",
slots = c(txpSlices = "TxpSliceList",
txpWeights = "numeric",
txpTransFuncs = "TxpTransFuncList"))

Expand All @@ -90,8 +90,8 @@ setClass("TxpModelList",
#' @name TxpResultParam-class
#' @exportClass TxpResultParam

setClass("TxpResultParam",
slots = c(rank.ties.method = "character",
setClass("TxpResultParam",
slots = c(rank.ties.method = "character",
negative.value.handling = "character"))

##----------------------------------------------------------------------------##
Expand All @@ -100,10 +100,11 @@ setClass("TxpResultParam",
#' @name TxpResult-class
#' @exportClass TxpResult

setClass("TxpResult",
slots = c(txpScores = "numeric",
setClass("TxpResult",
slots = c(txpScores = "numeric",
txpSliceScores = "matrix",
txpRanks = "numeric",
txpMissing = "numeric",
txpModel = "TxpModel",
txpIDs = "character_OR_NULL",
txpResultParam = "TxpResultParam"))
Expand Down
17 changes: 10 additions & 7 deletions R/allGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

#' @name txpGenerics
#' @title toxpiR package generics
#' @description toxpiR package generics; see class man pages for associated
#' @description toxpiR package generics; see class man pages for associated
#' methods
#' @param x toxpiR S4 object
#' @param value Replacement value
#' @param ... Included for extendability; not currently used
#'
#'
#' @return See specific methods for details.

NULL
Expand All @@ -19,32 +19,32 @@ NULL
setGeneric("txpValueNames", function(x, ...) standardGeneric("txpValueNames"))

#' @rdname txpGenerics
setGeneric("txpValueNames<-",
setGeneric("txpValueNames<-",
function(x, ..., value) standardGeneric("txpValueNames<-"))

#' @rdname txpGenerics
setGeneric("txpTransFuncs", function(x, ...) standardGeneric("txpTransFuncs"))

#' @rdname txpGenerics
setGeneric("txpTransFuncs<-",
setGeneric("txpTransFuncs<-",
function(x, ..., value) standardGeneric("txpTransFuncs<-"))

#' @rdname txpGenerics
setGeneric("txpSlices", function(x, ...) standardGeneric("txpSlices"))

#' @rdname txpGenerics
setGeneric("txpSlices<-",
setGeneric("txpSlices<-",
function(x, ..., value) standardGeneric("txpSlices<-"))

#' @rdname txpGenerics
setGeneric("txpWeights", function(x, ...) standardGeneric("txpWeights"))

#' @rdname txpGenerics
setGeneric("txpWeights<-",
setGeneric("txpWeights<-",
function(x, ..., value) standardGeneric("txpWeights<-"))

#' @rdname txpCalculateScores
setGeneric("txpCalculateScores",
setGeneric("txpCalculateScores",
function(model, input, ...) standardGeneric("txpCalculateScores"))

#' @rdname txpGenerics
Expand All @@ -65,5 +65,8 @@ setGeneric("txpIDs<-", function(x, ..., value) standardGeneric("txpIDs<-"))
#' @rdname txpGenerics
setGeneric("txpRanks", function(x, ...) standardGeneric("txpRanks"))

#' @rdname txpGenerics
setGeneric("txpMissing", function(x, ...) standardGeneric("txpMissing"))

#' @rdname txpGenerics
setGeneric("txpResultParam", function(x, ...) standardGeneric("txpResultParam"))
Loading

1 comment on commit 68b9323

@daynefiler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What necessitated suppressMesages added to .TxpTransFunc.validity?

Please sign in to comment.