Skip to content

Commit

Permalink
plot error when there is no dep for heatmap
Browse files Browse the repository at this point in the history
  • Loading branch information
hsiaoyi0504 committed Oct 28, 2022
1 parent c888c90 commit 776442e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ get_cluster_heatmap <- function(dep, type = c("contrast", "centered"),
# Filter for significant proteins only
filtered <- dep[replace_na(row_data$significant, FALSE), ]

if (nrow(filtered) == 0){
return(ggplot() +
annotate("text", x = 4, y = 25, size=8, label = "No differential expressed genes for the heatmap") +
theme_void())
}

# Check for missing values
if(any(is.na(assay(filtered)))) {
warning("Missing values in '", deparse(substitute(dep)), "'. ",
Expand Down
4 changes: 2 additions & 2 deletions ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,10 @@ ui <- function(request){shinyUI(
title = "User Guide",
h3("FragPipe-Analyst Documentation"),
div(p(HTML(paste0('Learn more about our FragPipe',
a(href = 'https://monashbioinformaticsplatform.github.io/LFQ-Analyst/', target='_blank', 'here'))))),
a(href = 'https://monashbioinformaticsplatform.github.io/LFQ-Analyst/', target='_blank', tags$b('here')))))),
div(p(HTML(paste0("The user manual of original LFQ-Analyst can be accessed",
a(href = 'https://bioinformatics.erc.monash.edu/apps/LFQ-Analyst/LFQ-Analyst_manual.pdf',
target='_blank', tags$b("here.")))))),
target='_blank', tags$b("here")))))),
h4("Contact Us"),
p("For any feedback or question regarding FragPipe-Analyst, please contact the
Proteomics & Integrative Bioinformatics Lab, University of Michigan:"),
Expand Down

0 comments on commit 776442e

Please sign in to comment.