Skip to content

Commit

Permalink
Merge branch 'Modelling2R6' of https://github.com/wolski/prolfqua int…
Browse files Browse the repository at this point in the history
…o Modelling2R6
  • Loading branch information
wolski committed Sep 24, 2024
2 parents 73bf9a7 + 019b0b5 commit aa0746a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Suggests:
SummarizedExperiment,
proDA,
vsn
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Roxygen: list(r6 = TRUE)
Depends:
R (>= 4.1)
Expand Down
2 changes: 1 addition & 1 deletion R/AnalysisConfiguration.R
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ table_factors <- function(pdata, configuration){
#'
#'
#' xx <- table_factors_size(istar$data,istar$config )
#' stopifnot(all(xt$n == 4))
#' stopifnot(all(xx$n == 4))
#'
table_factors_size <- function(pdata, configuration){
xx <- table_factors(pdata, configuration)
Expand Down
2 changes: 1 addition & 1 deletion R/LFQDataPlotter.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#' istar$data,
#' istar$config)
#' #LFQDataPlotter$debug("boxplots")
#' LFQDataPlotter$debug("pairs_smooth")
#' lfqplotter <- lfqdata$get_Plotter()
#'
#' stopifnot(class(lfqplotter$heatmap()) == "pheatmap")
#' stopifnot(class(lfqplotter$heatmap_cor()) == "pheatmap")
#' stopifnot("ggplot" %in% class(lfqplotter$pca()))
#' stopifnot("plotly" %in% class(lfqplotter$pca_plotly()))
#'
#' tmp <- lfqplotter$boxplots()
#' stopifnot("ggplot" %in% class(tmp$boxplot[[1]]))
#' stopifnot("ggplot" %in% class(lfqplotter$missigness_histogram()))
Expand Down
7 changes: 3 additions & 4 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,11 @@ panel_cor <- function(x, y, digits = 2, ...)
#' pairs_smooth(tmp,log="xy",main="small data", legend=TRUE)
#' @seealso also \code{\link{pairs}}
pairs_smooth <- function(data, legend = FALSE, ...) {
while (nrow(na.omit(data)) < 100) {
non_na_counts <- apply(data, 2, function(x) sum(!is.na(x)))
min_col <- which.min(non_na_counts)
non_na_counts <- apply(data, 2, function(x) sum(!is.na(x)))
min_col <- which(non_na_counts < 2)
if(length(min_col) >= 1){
data <- data[, -min_col, drop = FALSE]
}

pairs(
data,
upper.panel = function(x, y) {
Expand Down
2 changes: 1 addition & 1 deletion man/LFQDataPlotter.Rd

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

2 changes: 1 addition & 1 deletion man/table_factors_size.Rd

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

0 comments on commit aa0746a

Please sign in to comment.