Skip to content

Commit

Permalink
Update do_VolcanoPlot.R
Browse files Browse the repository at this point in the history
Added rbind call to create 'data.label' for the conditions where 'order_tags_by' == "pvalue" or "logfc"
  • Loading branch information
nbpeterson3 authored Jul 18, 2024
1 parent 34ce6dc commit 7234410
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/do_VolcanoPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ do_VolcanoPlot <- function(sample,
dplyr::arrange(dplyr::desc(.data$log_p)) %>%
as.data.frame() %>%
utils::head(n_genes)

data.label <- dplyr::bind_rows(data.up, data.down)
} else if (order_tags_by == "logfc"){
data.up <- data %>%
dplyr::arrange(dplyr::desc(.data$avg_log2FC)) %>%
Expand All @@ -202,6 +204,8 @@ do_VolcanoPlot <- function(sample,
dplyr::arrange(.data$avg_log2FC) %>%
as.data.frame() %>%
utils::head(n_genes)

data.label <- dplyr::bind_rows(data.up, data.down)
}

if (add_tag_side == "positive") {
Expand Down

0 comments on commit 7234410

Please sign in to comment.