4
4
# ' \code{\link[TreeSummarizedExperiment:TreeSummarizedExperiment-constructor]{TreeSummarizedExperiment}}
5
5
# ' that are compulsory when using certain panels.
6
6
# '
7
+ # ' @param se a
8
+ # ' \code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}}
9
+ # ' object.
10
+ # '
11
+ # ' @param initial \code{Panel vector}. A list of panel objects to check.
12
+ # '
13
+ # ' @param panel.class \code{Character vector}. A list of panel names
14
+ # ' corresponding to panel objects in \code{initial}.
15
+ # '
16
+ # ' @param panel.fun \code{Function scalar}. The element of \code{se} whose
17
+ # ' existance should be checked.
18
+ # '
19
+ # ' @param wtext \code{Character scalar}. Text of the warning message returned
20
+ # ' if \code{panel.fun} does not exist or is empty.
21
+ # '
7
22
# ' @return
8
23
# ' \code{.check_panel} returns the input \code{initial} list of panels excluding
9
- # ' the checked panel if \code{panel_fun } is \code{NULL} or empty.
24
+ # ' the checked panel if \code{panel.fun } is \code{NULL} or empty.
10
25
# ' \code{.check_all_panels} applies \code{.check_panel} to multiple panels and
11
26
# ' returns the a filtered version of \code{initial}.
12
27
# '
60
75
# ' @export
61
76
# ' @importFrom S4Vectors isEmpty
62
77
# ' @importFrom methods is
63
- .check_panel <- function (se , panel_list , panel_class , panel_fun , wtext ) {
78
+ .check_panel <- function (se , initial , panel.class , panel.fun , wtext ) {
64
79
65
- no_keep <- unlist(lapply(panel_list , function (x ) is(x , panel_class )))
80
+ no_keep <- unlist(lapply(initial , function (x ) is(x , panel.class )))
66
81
67
- if ( any(no_keep ) && (is.null(panel_fun (se )) || isEmpty(panel_fun (se ))) ){
68
- panel_list <- panel_list [! no_keep ]
69
- warning(" no valid " , as.character(substitute(panel_fun )),
70
- " fields for " , panel_class , call. = FALSE )
82
+ if ( any(no_keep ) && (is.null(panel.fun (se )) || isEmpty(panel.fun (se ))) ){
83
+ initial <- initial [! no_keep ]
84
+ warning(" no valid " , as.character(substitute(panel.fun )),
85
+ " fields for " , panel.class , call. = FALSE )
71
86
}
72
87
73
- return (panel_list )
88
+ return (initial )
74
89
}
0 commit comments