Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit a11e5a1f authored by Louis Duchemin's avatar Louis Duchemin
Browse files

RERconverge : enrichment analysis script

parent 346dfbcf
library(tidyverse)
library(RERconverge)
result_table = read_tsv("<<<dep results_table>>>") %>%
column_to_rownames("gene_id")
annotation_file = "<<<dep annotations>>>"
# Minimum number of genes required to be present to run the enrichment
n_min_genes = <<<n_min_genes>>>
stats = getStat(result_table)
annotations = read.gmt(annotation_file) %>% list()
names(annotations) = "MSigDBpathways"
enrichment = fastwilcoxGMTall(stats, annotations, outputGeneVals=T, num.g=n_min_genes)
write_tsv(enrichment$MSigDBpathways, "<<<dest>>>")
\ No newline at end of file
......@@ -63,4 +63,8 @@ res <- if (<<<template_bool continuous>>>) {
)
}
res <- res %>%
mutate(gene_id=names(gene_trees$trees)) %>%
select(gene_id, everything())
write_tsv(res, "<<<dest>>>")
\ No newline at end of file
......@@ -164,6 +164,12 @@ let match_species_tree_position ~gene_tree ~clipped_species_tree =
let best_candidate_summary ?(n_genes = 10) ~gene_tree_set ~master_tree ~results_table ~phenotypes =
let n_genes = int (n_genes) in
let n_genes = int n_genes in
let script = [%include_script "lib/R/best_candidate_summary.R"] in
Bistro_utils.R_script.workflow ~img ~descr:"RER_converge.best_candidate_summary" script
\ No newline at end of file
Bistro_utils.R_script.workflow ~img ~descr:"RER_converge.best_candidate_summary" script
let enrichment_analysis ?(n_min_genes = 0) ~results_table ~annotations =
let n_min_genes = int n_min_genes in
let script = [%include_script "lib/R/enrichment_analysis.R"] in
Bistro_utils.R_script.workflow ~img ~descr:"RER_converge.enrichment_analysis" script
\ No newline at end of file
......@@ -29,3 +29,9 @@ val best_candidate_summary :
results_table:tsv file ->
phenotypes: tsv file ->
pdf file
val enrichment_analysis :
?n_min_genes:int ->
results_table:tsv file ->
annotations: tsv file ->
tsv file
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment