Skip to content

Commit

Permalink
fix: Fix missing output in spia.R when no significant genes are found (
Browse files Browse the repository at this point in the history
  • Loading branch information
fxwiegand authored Jun 25, 2024
1 parent 0fbb930 commit bc0d017
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions workflow/scripts/spia.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ if (nrow(sig_genes) == 0) {
# the best hack for an empty tibble from a column specification I could find
res <- read_csv("\n", col_names = columns)
write_tsv(res, snakemake@output[["table"]])
# Create empty plot
pdf(snakemake@output[["plots"]])
plot.new()
text(0.5, 0.5, "No significant genes found", cex = 1.5)
dev.off()
} else {
# get logFC equivalent (the sum of beta scores of covariates of interest)

Expand Down

0 comments on commit bc0d017

Please sign in to comment.