Skip to content

Commit

Permalink
new data generation
Browse files Browse the repository at this point in the history
  • Loading branch information
pcastellanoescuder committed Apr 13, 2024
1 parent 4eca971 commit b9eb969
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ddh
Type: Package
Title: Utility Functions and Data Sets for Data-driven Hypothesis
Version: 0.3.37
Version: 0.3.38
Authors@R: c(
person(given = "Matthew",
family = "Hirschey",
Expand Down
22 changes: 16 additions & 6 deletions R/tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -743,12 +743,22 @@ make_censor_table <- function(input = list(),
#' \dontrun{
#' make_gene_dependency_enrichment_table(input = list(type = 'gene', content = 'ROCK1'))
#' }
make_gene_dependency_enrichment_table <- function(input = list()) {
make_gene_dependency_enrichment_table <- function(input = list(), top = TRUE) {
make_gene_dependency_enrichment_table_raw <- function() {
if (top) {
gene_dependency_enrichment <-
ddh::get_data_object(object_names = input$content,
dataset_name = "gene_dependency_enrichment_top",
pivotwider = TRUE)
} else {
gene_dependency_enrichment <-
ddh::get_data_object(object_names = input$content,
dataset_name = "gene_dependency_enrichment_bottom",
pivotwider = TRUE)
}

gene_dependency_enrichment <-
ddh::get_data_object(object_names = input$content,
dataset_name = "gene_dependency_enrichment",
pivotwider = TRUE) %>%
gene_dependency_enrichment %>%
dplyr::mutate(Pval = as.numeric(Pval), adjPval = as.numeric(adjPval)) %>%
dplyr::mutate_if(is.numeric, ~ signif(., digits = 3)) %>%
dplyr::select(-data_set) %>%
Expand Down Expand Up @@ -828,7 +838,7 @@ make_molecular_features_table <- function(input = list(),
gene_summaries <- ddh::get_content("universal_gene_summary", dataset = TRUE)[,1:2]
gene_molecular_features_hits <-
ddh::get_data_object(object_names = input$content,
dataset_name = "gene_molecular_features_top",
dataset_name = "gene_molecular_features",
pivotwider = TRUE) %>%
dplyr::mutate(dplyr::across(dplyr::contains(c("logFC", "pval", "adjPval")), as.numeric)) %>%
dplyr::mutate_if(is.numeric, ~ signif(., digits = 3)) %>%
Expand Down Expand Up @@ -869,7 +879,7 @@ make_molecular_features_pathways_table <- function(input = list(),
make_molecular_features_pathways_table_raw <- function() {
gene_molecular_features_hits <-
ddh::get_data_object(object_names = input$content,
dataset_name = "gene_molecular_features_pathways_top",
dataset_name = "gene_molecular_features_pathways",
pivotwider = TRUE) %>%
dplyr::mutate(pval = as.numeric(pval), adjPval = as.numeric(adjPval)) %>%
dplyr::mutate_if(is.numeric, ~ signif(., digits = 3)) %>%
Expand Down
2 changes: 1 addition & 1 deletion man/make_gene_dependency_enrichment_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b9eb969

Please sign in to comment.