Skip to content

Commit

Permalink
Cran 1.1.2 Version Release (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
cb4ds authored May 19, 2022
1 parent e212c72 commit f225f35
Show file tree
Hide file tree
Showing 50 changed files with 182 additions and 158 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*-Ex.R
/*.Rcheck/
.Rproj.user/
vignettes/*.html
.httr-oauth
/*_cache/
/cache/
Expand All @@ -28,4 +27,7 @@ revdep
vignettes/*.html
vignettes/*.R
vignettes/*.log

!vignettes/precompiled_vignettes.R
!inst/exampleObj.RDS
!inst/miniObj.RDS
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: DGEobj
Type: Package
Title: Differential Gene Expression (DGE) Analysis Results Data Object
Version: 1.1.1
Version: 1.1.2
Description:
Provides a flexible container to manage and annotate Differential Gene
Expression (DGE) analysis results (Smythe et. al (2015) <doi:10.1093/nar/gkv007>).
Expand Down Expand Up @@ -29,15 +29,15 @@ Imports:
stringr,
utils
Suggests:
biomaRt,
conflicted,
dplyr,
edgeR,
GenomicRanges,
glue,
knitr,
rmarkdown,
testthat,
biomaRt,
edgeR,
GenomicRanges
testthat
biocViews:
RoxygenNote: 7.1.2
VignetteBuilder: knitr
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

---

### v1.1.2
* Made all Bioconductor packages optional (suggested)
* Added a new, minimal "mini" example object that has no internal Bioconductor-based features (ie normalization, analysis) to allow
for clean, simple examples that do not depend on suggested packages
* Testing updated so that when Bioconductor suggested packages are unavailable the tests will not be run

### v1.1.1
* Updated tests and examples so that when suggested packages are unavailable the examples and/or tests dependent on them are not run

Expand Down
8 changes: 5 additions & 3 deletions R/addItem.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
#' \dontrun{
#' myFunArgs <- match.call() # Capture calling function and arguments
#'
#' myDGEobj <- addItem(myDGEobj, item = MyCounts,
#' myDGEobj <- addItem(myDGEobj, item = MyCounts,
#' itemName = "counts",
#' itemType = "counts",
#' funArgs = myFunArgs)
#' funArgs = myFunArgs)
#' }
#'
#' @importFrom assertthat assert_that
Expand Down Expand Up @@ -168,7 +168,9 @@ addItem <- function(dgeObj,
#'
#' @examples
#' \dontrun{
#' # Add normalize counts (DGEList) and log2CPM as additional "assay" items in the DGEobj
#' # NOTE: Requires the edgeR package
#'
#' # Add normalized counts and log2CPM as additional "assay" items in the DGEobj
#' dgeObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' dgeList <- edgeR::calcNormFactors(edgeR::DGEList(dgeObj$counts), method="TMM")
#' log2cpm <- edgeR::cpm(dgeList, log = TRUE)
Expand Down
6 changes: 4 additions & 2 deletions R/annotate.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@
#' @return A DGEobj
#'
#' @examples
#' MyDgeObj <- system.file("exampleObj.RDS", package = "DGEobj")
#' MyDgeObj <- system.file("miniObj.RDS", package = "DGEobj")
#'
#' \dontrun{
#' #using a text file file of key=value pairs
#' annotationFile <- "/location/to/myAnnotations.txt"
#' MyDgeObj <- annotateDGEobj(MyDgeObj, annotationFile)
#'}
#' }
#'
#' #using a named list of key/values
#' annotations <- list(Title = "Rat Liver Slices from Bile Duct Ligation animals",
#' Organism = "Rat",
#' GeneModel = "Ensembl.R89")
#' MyDgeObj <- annotateDGEobj(MyDgeObj, annotations)
#'
#'
#' @import magrittr
#' @importFrom stringr str_remove_all str_locate
#' @importFrom utils read.delim
Expand Down
10 changes: 4 additions & 6 deletions R/attributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
#' "dimnames", "rownames", "colnames", "listData", "objDef")
#'
#' @examples
#' \dontrun{
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' showAttributes(exObj)
#'}
#'
#' @export
showAttributes <- function(dgeObj, skipList = c("dim", "dimnames", "rownames", "colnames", "listData", "objDef")) {
Expand Down Expand Up @@ -57,7 +55,7 @@ showAttributes <- function(dgeObj, skipList = c("dim", "dimnames", "rownames", "
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' # Assign attributes to a DGEobj
#' MyAttributes <- list(Platform = "RNA-Seq",
Expand Down Expand Up @@ -107,7 +105,7 @@ setAttributes <- function(dgeObj, attribs){
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' getAttributes(exObj)
#'
Expand All @@ -132,7 +130,7 @@ getAttributes <- function(dgeObj,
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' showMeta(exObj)
#'
Expand Down
9 changes: 4 additions & 5 deletions R/get.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' myList <- getItems(exObj, list("counts", "geneData"))
#' names(myList)
Expand All @@ -17,7 +17,6 @@
#'
#' @export
getItems <- function(dgeObj, itemNames){

assertthat::assert_that(!missing(dgeObj),
!missing(itemNames),
msg = "Specify both a DGEobj and at least one itemName to retrieve.")
Expand Down Expand Up @@ -52,7 +51,7 @@ getItems <- function(dgeObj, itemNames){
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' MyCounts <- getItem(exObj, "counts")
#'
Expand Down Expand Up @@ -85,7 +84,7 @@ getItem <- function(dgeObj, itemName){
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' MyRawData <- getType(exObj, type = list("counts", "design", "geneData"))
#'
Expand Down Expand Up @@ -119,7 +118,7 @@ getType <- function(dgeObj, type, parent){
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' Assays <- getBaseType(exObj, baseType = "assay")
#' AssaysAndMeta <- getBaseType(exObj, c("assay", "meta"))
Expand Down
13 changes: 6 additions & 7 deletions R/init.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@
#' @return A DGEobj
#'
#' @examples
#'
#' dgeObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' dgeObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#' MyCounts <- dgeObj$counts
#' geneinfo <- dgeObj$geneData
#' sampinfo <- dgeObj$design
#'
#' myDgeObj <- initDGEobj(primaryAssayData = MyCounts,
#' rowData = geneinfo,
#' colData = sampinfo,
#' level = "gene",
#' customAttr = list (Genome = "Rat.B6.0",
#' GeneModel = "Ensembl.R89"))
#' rowData = geneinfo,
#' colData = sampinfo,
#' level = "gene",
#' customAttr = list (Genome = "Rat.B6.0",
#' GeneModel = "Ensembl.R89"))
#'
#' @import magrittr
#' @importFrom assertthat assert_that
Expand Down
4 changes: 1 addition & 3 deletions R/reset.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
#' @return A DGEobj
#'
#' @examples
#' \dontrun{
#' #example object
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' # subset to first 10 rows to show reset functionality
#' exObj <- exObj[c(1:10), ]
#'
#' exObj <- resetDGEobj(exObj)
#' dim(exObj)
#'}
#'
#' @importFrom assertthat assert_that
#'
Expand Down
2 changes: 1 addition & 1 deletion R/rmItem.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' exObj <- rmItem(exObj, "design")
#'
Expand Down
4 changes: 1 addition & 3 deletions R/subset.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@
#' @return A DGEobj
#'
#' @examples
#' \dontrun{
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' exObj <- subset(exObj, 1:10, 5:50)
#'}
#'
#' @importFrom assertthat assert_that
#' @importFrom stringr str_c
Expand Down
8 changes: 4 additions & 4 deletions R/types.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' baseType(exObj, type = "DGEList")
#'
Expand Down Expand Up @@ -43,7 +43,7 @@ baseType <- function(dgeObj, type){
#' baseTypes()
#'
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' # Basetypes from a specific DGEobj
#' baseTypes(exObj)
Expand All @@ -65,7 +65,7 @@ baseTypes <- function(dgeObj){
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' showTypes(exObj)
#'
Expand Down Expand Up @@ -98,7 +98,7 @@ showTypes <- function(dgeObj){
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' exObj <- newType(exObj,
#' itemType = "AffyRMA",
Expand Down
10 changes: 3 additions & 7 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ dimnames.DGEobj <- function(x){
#' @return NULL
#'
#' @examples
#' \dontrun{
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' print(exObj)
#'}
#'
#' @export
print.DGEobj <- function(x, ..., verbose = FALSE) {
Expand All @@ -67,12 +65,10 @@ print.DGEobj <- function(x, ..., verbose = FALSE) {
#' @return A data.frame summarizing the data contained in the DGEobj
#'
#' @examples
#' \dontrun{
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' inventory(exObj)
#' }
#'
#' @export
inventory <- function(dgeObj, verbose = FALSE) {
Expand Down Expand Up @@ -122,7 +118,7 @@ inventory <- function(dgeObj, verbose = FALSE) {
#'
#' @examples
#' # example DGEobj
#' exObj <- readRDS(system.file("exampleObj.RDS", package = "DGEobj"))
#' exObj <- readRDS(system.file("miniObj.RDS", package = "DGEobj"))
#'
#' mylist <- as.list(exObj)
#'
Expand Down
19 changes: 15 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
## Comments from Maintainer

* Resolved CRAN check errors
* Skipping examples dependent on suggested packages
* Updated tests so that they do not fail if suggested packages are not available
* There is one outstanding note - we updated this package recently in an attempt to resolve the issues with noSuggests
however unfortunately it uncovered a different package dependency problem that wasn't caught on the 3 standard RHub platform
configurations. We have now combed over the entire package and extensively checked all RHub and local platforms to try to
ensure the suggested packages are just that, suggested! We also made sure we now have a very small example object to use
that was not made using any of the suggested packages as well.

* We appreciate your consideration of this package update, here is what we have done for this release:
* Resolved CRAN check errors, including the noSuggests issues
* Added a new example object so that as many examples can be run as possible without suggested packages
* Bioconductor packages in suggests are required for testing, now we will not run tests if any are missing
* Also updated our process to check ALL available/usable RHub platforms prior to submission

---

Expand All @@ -13,6 +21,7 @@ RStudio Server Pro (ubuntu 18.04.2)
* R 3.6.3
* R 4.0.5
* R 4.1.3
* R 4.2.0

CircleCI

Expand All @@ -28,7 +37,9 @@ WinBuilder
RHub

* devtools::check_rhub(interactive = F,
env_vars = c("_R_CHECK_DEPENDS_ONLY_" = "true"))
platforms = c(rhub::platforms()$name),
env_vars = c("_R_CHECK_DEPENDS_ONLY_" = "true",
"_R_CHECK_FORCE_SUGGESTS_" = "false"))

---

Expand Down
Binary file added inst/miniObj.RDS
Binary file not shown.
4 changes: 2 additions & 2 deletions man/addItem.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/addItems.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f225f35

Please sign in to comment.