Skip to content

Commit

Permalink
use non-adjusted p-values (openproblems-bio#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
szalata authored May 25, 2024
1 parent f022f27 commit 5934a85
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/task/process_dataset/run_limma/script.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,17 @@ de_df2 <- de_df %>%
# readjust p-values for multiple testing
adj.P.Value = p.adjust(P.Value, method = "BH"),
# compute sign log10 p-values
sign_log10_nonadj_pval = sign(logFC) * -log10(ifelse(P.Value == 0, .Machine$double.eps, P.Value)),
sign_log10_pval = sign(logFC) * -log10(ifelse(adj.P.Value == 0, .Machine$double.eps, adj.P.Value)),
sign_log10_pval = sign(logFC) * -log10(ifelse(P.Value == 0, .Machine$double.eps, P.Value)),
sign_log10_adj_pval = sign(logFC) * -log10(ifelse(adj.P.Value == 0, .Machine$double.eps, adj.P.Value)),
is_de = P.Value < par$de_sig_cutoff,
is_de_adj = adj.P.Val < par$de_sig_cutoff
) %>%
as_tibble()

rownames(new_obs) <- paste0(new_obs$cell_type, ", ", new_obs$sm_name)
new_var <- data.frame(row.names = levels(de_df2$gene))

# create layers from de_df
layer_names <- c("is_de", "is_de_adj", "logFC", "P.Value", "adj.P.Value", "sign_log10_pval", "sign_log10_nonadj_pval")
layer_names <- c("is_de", "is_de_adj", "logFC", "P.Value", "adj.P.Value", "sign_log10_adj_pval", "sign_log10_pval")
layers <- map(setNames(layer_names, layer_names), function(layer_name) {
de_df2 %>%
select(gene, row_i, !!layer_name) %>%
Expand Down

0 comments on commit 5934a85

Please sign in to comment.