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

Added ggplot2 capabilities #15

Closed
wants to merge 14 commits into from
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: toxpiR
Type: Package
Title: Create ToxPi Prioritization Models
Version: 1.2.1
Version: 1.3.0
Authors@R:
c(person("Dayne L", "Filer",
role = c("aut", "cre", "fnd"),
Expand All @@ -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
Loading