Skip to content

Commit

Permalink
perf: bump datavzrd wrapper to 2.6.0 and general bug fixes (#80)
Browse files Browse the repository at this point in the history
Created a new and separate pull request previously was merged with
3-prime-rna branch

---------

Co-authored-by: David Laehnemann <david.laehnemann@hhu.de>
  • Loading branch information
manuelphilip and dlaehnemann authored Sep 1, 2023
1 parent 0fe7948 commit 657c465
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions workflow/rules/datavzrd.smk
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ rule spia_datavzrd:
log:
"logs/datavzrd-report/spia-{model}/spia-{model}.log",
wrapper:
"v1.29.0/utils/datavzrd"
"v2.6.0/utils/datavzrd"


rule diffexp_datavzrd:
Expand All @@ -92,7 +92,7 @@ rule diffexp_datavzrd:
log:
"logs/datavzrd-report/diffexp.{model}/diffexp.{model}.log",
wrapper:
"v1.29.0/utils/datavzrd"
"v2.6.0/utils/datavzrd"


rule go_enrichment_datavzrd:
Expand All @@ -119,4 +119,4 @@ rule go_enrichment_datavzrd:
log:
"logs/datavzrd-report/go_enrichment-{model}/go_enrichment-{model}_{gene_fdr}.go_term_fdr_{go_term_fdr}.log",
wrapper:
"v1.29.0/utils/datavzrd"
"v2.6.0/utils/datavzrd"
1 change: 0 additions & 1 deletion workflow/rules/trim_3prime.smk
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
if is_3prime_experiment and three_prime_vendor == "lexogen":

# Rule cutadapt1 checks and removes poly-A tails and sequence qualilty score <20.
# reasoning behind parameters:
# * `-m 20`:
Expand Down
4 changes: 2 additions & 2 deletions workflow/scripts/plot_diffexp_heatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (all(selectedgenes == 0)) {
# If number of transcripts is more than 100,
# Since for RNA-seq multiple transcripts may present for a single gene.
} else if (nrow(selectedgenes) > 100) {
pdf_height <- round(nrow(selectedgenes) / 7)
pdf_height <- round(nrow(selectedgenes) / 5)
pdf(snakemake@output[["diffexp_heatmap"]],
height = pdf_height, width = ncol(selectedgenes) * 2
)
Expand All @@ -63,7 +63,7 @@ if (all(selectedgenes == 0)) {
)
dev.off()
} else {
pdf_height <- round(nrow(selectedgenes) / 7)
pdf_height <- round(nrow(selectedgenes) / 5)
pdf(
file = snakemake@output[["diffexp_heatmap"]],
height = pdf_height, width = ncol(selectedgenes) * 2
Expand Down
3 changes: 1 addition & 2 deletions workflow/scripts/spia.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ diffexp <- read_tsv(snakemake@input[["diffexp"]]) %>%
mutate(ens_gene = str_c("ENSEMBL:", ens_gene))
universe <- diffexp %>% pull(var = ens_gene)
sig_genes <- diffexp %>% filter(qval <= 0.05)

if (nrow(sig_genes) == 0) {
cols <- c(
"Name", "Status", "Combined FDR",
Expand All @@ -30,7 +29,7 @@ if (nrow(sig_genes) == 0) {
"Combined Bonferroni p-values",
"p-value to observe a total accumulation", "Combined p-value", "Ids"
)
res <- data.frame(matrix(ncol = 7, nrow = 0, dimnames = list(NULL, cols)))
res <- data.frame(matrix(ncol = 11, nrow = 0, dimnames = list(NULL, cols)))
# create empty perturbation plots
pdf(file = snakemake@output[["plots"]])
write_tsv(res, snakemake@output[["table"]])
Expand Down

0 comments on commit 657c465

Please sign in to comment.