Skip to content

Commit

Permalink
fix: limits in differential expression plots
Browse files Browse the repository at this point in the history
  • Loading branch information
aviezerl committed Dec 20, 2023
1 parent 9b3f30d commit b0084a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: MCView
Title: A Shiny App for Metacell Analysis
Version: 0.2.22
Version: 0.2.23
Authors@R:
person(given = "Aviezer",
family = "Lifshitz",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# MCView 0.2.23

* Fix: plot limits were sometimes too low in differential expression plots.

# MCView 0.2.22

* Added an option to sort gene heatmaps by metadata within each cell type.
Expand Down
4 changes: 2 additions & 2 deletions R/plot_mc_mc_gene.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
plot_mc_mc_gene <- function(df, metacell1, metacell2, highlight = NULL, label_prefix = "MC #", x_label_suffix = "") {
xylims <- expr_breaks

xmax <- min(c(1:length(xylims))[xylims >= max(df[, metacell1])] - 1e-10)
xmax <- min(c(1:length(xylims))[xylims >= max(df[, metacell1]) - 1e-10])
xmin <- max(c(1:length(xylims))[xylims <= min(df[, metacell1]) + 1e-10])
ymax <- min(c(1:length(xylims))[xylims >= max(df[, metacell2])] - 1e-10)
ymax <- min(c(1:length(xylims))[xylims >= max(df[, metacell2]) - 1e-10])
ymin <- max(c(1:length(xylims))[xylims <= min(df[, metacell2]) + 1e-10])

if (!is.null(highlight)) {
Expand Down

0 comments on commit b0084a2

Please sign in to comment.