diff --git a/R/main.R b/R/main.R index 5e8ae1c34639a36493bdaf06e6e9b938156c0909..11db37e28b95c68676091378b1eb00b33a57bd40 100644 --- a/R/main.R +++ b/R/main.R @@ -104,11 +104,13 @@ cli_run_topgo <- function() { name_list <- NULL } else { input_data <- load_files(cli$genes, cli$background) - name_list <- sub(pattern = "(.*)\\..*$", - replacement = "\\1", basename(cli$genes)) + name_list <- sub( + pattern = "(.*)\\..*$", + replacement = "\\1", basename(cli$genes) + ) } run_topgo( - input_data, cli$output, cli$id, cli$top, cli$alpha, - cli$log2fc_threshold, cli$basemean_threshold, name_list - ) + input_data, cli$output, cli$id, cli$top, cli$alpha, + cli$log2fc_threshold, cli$basemean_threshold, name_list + ) } diff --git a/R/topGO_analysis.R b/R/topGO_analysis.R index 8ee7594b264b49c623be98691ea769f1a1c6c86f..303bdd3dd7e2879021e48cbda2162f7b42e8f3fc 100644 --- a/R/topGO_analysis.R +++ b/R/topGO_analysis.R @@ -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))) colnames(df) <- c("pvalue") df$padj <- p.adjust(df$pvalue, method = "fdr") - df$GO.ID <- rownames(head(df, n=top)) - res <- res %>% left_join(df) + df$GO.ID <- rownames(df) + res <- res %>% left_join(head(df, n = top)) return(list( res = res, nb_gene = considered_genes, nb_go_gene = nb_go_gene, all_go_gene = all_go_gene, all_genes = length(gene_list)