Skip to content

Commit

Permalink
Merge pull request #58 from omnideconv/app_finalize
Browse files Browse the repository at this point in the history
App finalize
  • Loading branch information
alex-d13 authored May 27, 2024
2 parents 583b813 + 9f31edb commit ee42c4f
Show file tree
Hide file tree
Showing 25 changed files with 721 additions and 410 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
fail-fast: false
matrix:
config:
- { os: macOS-latest, r: "release" }
- { os: windows-latest, r: "release" }
- { os: ubuntu-latest, r: "devel", http-user-agent: "release" }
- { os: ubuntu-latest, r: "release" }
- { os: ubuntu-latest, r: "oldrel-1" }
#- { os: ubuntu-latest, r: "oldrel-1" }

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand Down
8 changes: 7 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Depends:
Imports:
shiny,
shinydashboard,
shinyBS,
omnideconv,
plotly,
ggplot2,
Expand All @@ -49,7 +50,7 @@ Imports:
stats,
circlize,
BioQC
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Encoding: UTF-8
Remotes:
github::omnideconv/omnideconv
Expand All @@ -59,5 +60,10 @@ Suggests:
bookdown,
testthat (>= 3.0.0),
markdown
biocViews:
Software, GeneExpression, ImmunoOncology, Sequencing, Transcription,
Classification, Transcriptomics, Visualization
URL: https://github.com/omnideconv/DeconvExplorer/
BugReports: https://github.com/omnideconv/DeconvExplorer/issues
VignetteBuilder: knitr
Config/testthat/edition: 3
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

export(DeconvExplorer)
export(download_signatureUpset)
export(errorModal)
export(plot_benchmark_correlation)
export(plot_benchmark_rmse)
export(plot_benchmark_scatter)
Expand All @@ -14,10 +15,10 @@ export(removePercentZeros)
export(removeUnspecificGenes)
export(renameCellType)
export(returnSelectedDeconvolutions)
export(scoreEntropy)
export(selectGenesByScore)
import(omnideconv)
import(shiny, except = c(renderDataTable, dataTableOutput))
import(shinyBS)
importFrom(ComplexHeatmap,Heatmap)
importFrom(ComplexHeatmap,UpSet)
importFrom(ComplexHeatmap,comb_size)
Expand Down Expand Up @@ -50,6 +51,7 @@ importFrom(ggplot2,geom_col)
importFrom(ggplot2,geom_hline)
importFrom(ggplot2,geom_jitter)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_rect)
importFrom(ggplot2,geom_text)
importFrom(ggplot2,geom_tile)
importFrom(ggplot2,ggplot)
Expand Down
18 changes: 7 additions & 11 deletions R/BenchmarkingPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,20 @@ plot_benchmark_scatter <- function(gtruth_df,

# merge
merged.df <- merge(df, ref, all.x = TRUE) # keep all deconvolution results
merged.df <- merged.df[complete.cases(merged.df), ]

# build plot
plot <- ggplot(merged.df, aes(x = .data$truth, y = .data$estimate, color = .data$cell_type)) +
geom_point(show.legend = FALSE) +
ggpubr::stat_cor(label.sep = "\n", size = 3, color = "black", label.x.npc = 0.01) +
geom_point(show.legend = FALSE, size = 3, alpha = .8) +
ggpubr::stat_cor(label.sep = "\n", size = 3, color = "black", label.x.npc = 0.05, label.y = max(merged.df$estimate) + 0.05, vjust = 1) +
ggforce::facet_grid_paginate(method ~ .data$cell_type,
margins = c("cell_type"), scales = "free"
margins = c("cell_type")
) +
ggplot2::theme_bw() +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
theme(axis.text.x = element_text(angle = 60, hjust = 1), strip.background = element_rect(fill = "white")) +
labs(x = "true cellular fractions", y = "cell type estimates", title = "") +
theme(legend.position = "none", text = element_text(size = 15))

plot <- plot + geom_abline() +
ggforce::facet_grid_paginate(method ~ .data$cell_type,
margins = c("cell_type"), scales = "free"
) +
theme(axis.text.x = element_text(angle = 60, hjust = 1))
theme(legend.position = "none", text = element_text(size = 15)) +
geom_abline(linetype = "dashed")

# get palette
max_colors <- RColorBrewer::brewer.pal.info[color_palette, ]$maxcolors # for brewer.pal()
Expand Down
5 changes: 3 additions & 2 deletions R/DeconvExplorer-pkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @importFrom ggplot2 aes aes_ aes_string coord_cartesian coord_flip element_text
#' facet_wrap geom_abline geom_boxplot geom_col geom_jitter geom_point
#' geom_tile ggplot guide_colorbar guides labs scale_fill_gradient theme geom_text element_blank
#' geom_hline scale_colour_brewer scale_fill_brewer ylim theme_minimal
#' geom_hline scale_colour_brewer scale_fill_brewer ylim theme_minimal geom_rect
#' @importFrom shinycssloaders withSpinner
#' @importFrom waiter Waitress
#' @importFrom rlang .data
Expand All @@ -32,7 +32,8 @@
#' @importFrom ggpubr stat_cor
#' @importFrom corrplot corrplot
#' @importFrom SummarizedExperiment assays
#' @import shinyBS
#'
#' @name DeconvExplorer-pkg
#' @docType package
NULL
"_PACKAGE"
Loading

0 comments on commit ee42c4f

Please sign in to comment.