Skip to content

Commit bba024c

Browse files
committed
fix: BiocCheck warnings
1 parent 459d585 commit bba024c

44 files changed

Lines changed: 1191 additions & 1045 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.DS_Store‎

10 KB
Binary file not shown.

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
inst/doc
2020
/doc/
2121
/Meta/
22-
docs
22+

‎DESCRIPTION‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Package: consexpressionR
22
Title: Differential Expression Analysis using consensus of 7 methods
3-
Version: 1.0.0.0
3+
Version: 0.99.0
44
Authors@R: c(person("Juliana", "Costa-Silva",
55
email="julianacostasilvati@gmail.com",
6-
role = c("aut", "cre"),
6+
role = c("aut", "cre","fnd"),
77
comment = c(ORCID = "0000-0002-5830-8548")),
88
person("David", "Menotti",
99
email="menottid@gmail.com",
@@ -18,11 +18,12 @@ Description: Comprehensive five-stage workflow for differential expression (DE)
1818
License: MIT + file LICENSE
1919
Encoding: UTF-8
2020
Roxygen: list(markdown = TRUE)
21-
RoxygenNote: 7.3.2
21+
RoxygenNote: 7.3.3
2222
Depends:
2323
R (>= 4.5.0)
2424
Imports:
2525
mclust,
26+
methods,
2627
cqn,
2728
DESeq2 (>= 1.38.3),
2829
EBSeq (>= 2.1.0),
@@ -51,7 +52,6 @@ Config/testthat/edition: 3
5152
File: data/gse95077.csv
5253
VignetteBuilder: knitr
5354
biocViews: Workflow, GeneExpressionWorkflow
54-
Maintainer: Juliana Costa-Silva <julianacostasilvati@gmail.com>
5555
URL: https://costasilvati.github.io/consexpressionR/
5656
BugReports: https://github.com/costasilvati/consexpressionR/issues
57-
LazyData: true
57+
LazyData: false

‎NAMESPACE‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ importFrom(UpSetR,upset)
2727
importFrom(attempt,is_try_error)
2828
importFrom(cqn,cqn)
2929
importFrom(mclust,mclustBIC)
30+
importFrom(methods,new)
31+
importFrom(methods,setClass)
32+
importFrom(methods,setMethod)
33+
importFrom(methods,show)
3034
importFrom(plotly,renderPlotly)
3135
importFrom(shiny,fileInput)
3236
importFrom(shiny,fluidRow)

‎R/.DS_Store‎

6 KB
Binary file not shown.

‎R/Class-ExpressionResultSet.R‎

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
#' @slot parameters A list of parameters used in the analysis
66
#' @slot consensus A list containing consensus DEG results (e.g., from consensusList)
77
#'
8-
#' @export
8+
#' @importFrom methods new setClass setMethod
9+
#' @exportClass ExpressionResultSet
10+
911
setClass("ExpressionResultSet",
1012
slots = list(
11-
results = "list",
12-
methods = "character",
13-
parameters = "list",
14-
consensus = "list"
13+
results = "list",
14+
methods = "character",
15+
parameters = "list",
16+
consensus = "list"
1517
))
1618

1719
#' Constructor for ExpressionResultSet
@@ -23,62 +25,68 @@ setClass("ExpressionResultSet",
2325
#' @return An ExpressionResultSet object
2426
#' @export
2527
createExpressionResultSet <- function(results, methods, parameters = list()) {
26-
# Verifica se todos os elementos são data.frames ou NULL
27-
if (!all(sapply(results, function(x) is.null(x) || inherits(x, "data.frame")))) {
28-
stop("All elements in 'results' must be data.frames or NULL.")
29-
}
28+
# Verifica se todos os elementos são data.frames ou NULL
29+
if (!all(sapply(results, function(x) is.null(x) || inherits(x, "data.frame")))) {
30+
stop("All elements in 'results' must be data.frames or NULL.")
31+
}
3032

31-
if (!is.character(methods)) {
32-
stop("'methods' must be a character vector.")
33-
}
33+
if (!is.character(methods)) {
34+
stop("'methods' must be a character vector.")
35+
}
3436

35-
if (!is.list(parameters)) {
36-
stop("'parameters' must be a list.")
37-
}
37+
if (!is.list(parameters)) {
38+
stop("'parameters' must be a list.")
39+
}
3840

39-
new("ExpressionResultSet",
40-
results = results,
41-
methods = methods,
42-
parameters = parameters)
41+
new("ExpressionResultSet",
42+
results = results,
43+
methods = methods,
44+
parameters = parameters)
4345
}
4446

4547

4648
#' Show method for ExpressionResultSet
4749
#'
4850
#' @param object An ExpressionResultSet object
49-
#' @export
51+
#' @importFrom methods setMethod show
52+
#' @exportMethod show
53+
#' @return Invisibly returns \code{NULL}. This method is called for its
54+
#' side effect of printing a summary of the object to the console.
5055
setMethod("show", "ExpressionResultSet", function(object) {
51-
cat("ExpressionResultSet object\n")
52-
cat("Methods executed:", paste(object@methods, collapse = ", "), "\n")
53-
cat("Results available:", length(object@results), "data.frames\n")
56+
cat("ExpressionResultSet object\n")
57+
cat("Methods executed:", paste(object@methods, collapse = ", "), "\n")
58+
cat("Results available:", length(object@results), "data.frames\n")
5459

55-
if (length(object@consensus) == 0) {
56-
cat("Consensus: not computed or empty.\n")
57-
} else {
58-
cat("Consensus: available (", length(object@consensus), " gene(s) listed)\n")
59-
}
60+
if (length(object@consensus) == 0) {
61+
cat("Consensus: not computed or empty.\n")
62+
} else {
63+
cat("Consensus: available (", length(object@consensus), " gene(s) listed)\n")
64+
}
6065
})
6166

6267
#' Summary method for ExpressionResultSet
6368
#'
6469
#' @param object An ExpressionResultSet object
65-
#' @export
70+
#' @exportMethod summary
71+
#' @param object An ExpressionResultSet object
72+
#' @return Invisibly returns \code{NULL}. This method is used for its
73+
#' side effect of printing a summary to the console.
6674
setMethod("summary", "ExpressionResultSet", function(object) {
67-
cat("Summary of ExpressionResultSet\n")
68-
cat("---------------------------------\n")
69-
cat("Methods used:", paste(object@methods, collapse = ", "), "\n")
75+
cat("Summary of ExpressionResultSet\n")
76+
cat("---------------------------------\n")
77+
cat("Methods used:", paste(object@methods, collapse = ", "), "\n")
7078

71-
nTables <- length(object@results)
72-
cat("Number of result tables:", nTables, "\n")
79+
nTables <- length(object@results)
80+
cat("Number of result tables:", nTables, "\n")
7381

74-
if (nTables > 0) {
75-
sizes <- sapply(object@results, function(x) if (is.null(x)) 0 else nrow(x))
76-
cat("Average number of DEGs per method:", round(mean(sizes), 2), "\n")
77-
}
82+
if (nTables > 0) {
83+
sizes <- sapply(object@results, function(x) if (is.null(x)) 0 else nrow(x))
84+
cat("Average number of DEGs per method:", round(mean(sizes), 2), "\n")
85+
}
7886

79-
if (length(object@consensus) == 0) {
80-
cat("Consensus list is empty or not defined.\n")
81-
} else {
82-
cat("Number of genes in consensus:", length(object@consensus), "\n")
83-
}
87+
if (length(object@consensus) == 0) {
88+
cat("Consensus list is empty or not defined.\n")
89+
} else {
90+
cat("Number of genes in consensus:", length(object@consensus), "\n")
91+
}
8492
})

0 commit comments

Comments
 (0)