Skip to content

Commit

Permalink
Merge pull request #314 from stemangiola/DE-get-action-return-tibble
Browse files Browse the repository at this point in the history
return tibble with get action
  • Loading branch information
stemangiola committed May 16, 2024
2 parents 70c90ae + 074456c commit 5f16b45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: tidybulk
Title: Brings transcriptomics to the tidyverse
Version: 1.17.1
Version: 1.17.2
Authors@R: c(person("Stefano", "Mangiola", email = "[email protected]",
role = c("aut", "cre")),
person("Maria", "Doyle", email = "[email protected]",
Expand Down
19 changes: 9 additions & 10 deletions R/methods_SE.R
Original file line number Diff line number Diff line change
Expand Up @@ -1479,22 +1479,21 @@ such as batch effects (if applicable) in the formula.
else
stop("tidybulk says: the only methods supported at the moment are \"edgeR_quasi_likelihood\" (i.e., QLF), \"edgeR_likelihood_ratio\" (i.e., LRT), \"limma_voom\", \"limma_voom_sample_weights\", \"DESeq2\", \"glmmseq_lme4\", \"glmmseq_glmmTMB\"")


statistics =
my_differential_abundance$result %>%
as_matrix(rownames = "transcript") %>%
.[match(rownames(rowData(.data)), rownames(.)),,drop=FALSE]

# If action is get just return the statistics
if(action == "get") return(statistics)

if(action == "get") return(my_differential_abundance$result)
# Add results
rowData(.data) = rowData(.data) %>% cbind(statistics)
rowData(.data) = rowData(.data) %>% cbind(

# Parse the statistics
my_differential_abundance$result %>%
as_matrix(rownames = "transcript") %>%
.[match(rownames(rowData(.data)), rownames(.)),,drop=FALSE]
)


.data %>%


# Add bibliography
when(
tolower(method) == "edger_likelihood_ratio" ~ (.) %>% memorise_methods_used(c("edger", "edgeR_likelihood_ratio")),
Expand Down

0 comments on commit 5f16b45

Please sign in to comment.