Skip to content
Snippets Groups Projects
Commit 3931f500 authored by nfontrod's avatar nfontrod
Browse files

fix pvalue correction

parent 3b74ba3b
No related branches found
No related tags found
No related merge requests found
...@@ -104,8 +104,10 @@ cli_run_topgo <- function() { ...@@ -104,8 +104,10 @@ cli_run_topgo <- function() {
name_list <- NULL name_list <- NULL
} else { } else {
input_data <- load_files(cli$genes, cli$background) input_data <- load_files(cli$genes, cli$background)
name_list <- sub(pattern = "(.*)\\..*$", name_list <- sub(
replacement = "\\1", basename(cli$genes)) pattern = "(.*)\\..*$",
replacement = "\\1", basename(cli$genes)
)
} }
run_topgo( run_topgo(
input_data, cli$output, cli$id, cli$top, cli$alpha, input_data, cli$output, cli$id, cli$top, cli$alpha,
......
...@@ -92,8 +92,8 @@ top_go_analysis <- function(de_table, kind, id_kind, go_term_type, regulation, ...@@ -92,8 +92,8 @@ top_go_analysis <- function(de_table, kind, id_kind, go_term_type, regulation,
df <- as.data.frame(sort(score(results.f))) df <- as.data.frame(sort(score(results.f)))
colnames(df) <- c("pvalue") colnames(df) <- c("pvalue")
df$padj <- p.adjust(df$pvalue, method = "fdr") df$padj <- p.adjust(df$pvalue, method = "fdr")
df$GO.ID <- rownames(head(df, n=top)) df$GO.ID <- rownames(df)
res <- res %>% left_join(df) res <- res %>% left_join(head(df, n = top))
return(list( return(list(
res = res, nb_gene = considered_genes, nb_go_gene = nb_go_gene, res = res, nb_gene = considered_genes, nb_go_gene = nb_go_gene,
all_go_gene = all_go_gene, all_genes = length(gene_list) all_go_gene = all_go_gene, all_genes = length(gene_list)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment