My functions to perform the various overrepresentation/enrichment analyses generally assume the result of extract_significant_genes() as the input. Sadly, I do not want to save those data structures to disk because they can be quite monstrously large when serialized (because I keep a reference to the input in them which gets dereferenced on save()). As a result, it is far simpler/safer to just read the xlsx outputs produced by combine_de_tables and extract_significant_genes. Ergo the following two little functions.
table_reader <- function(xlsx, sheet = "outcome") {
input_df <- openxlsx::readWorkbook(xlsx, sheet = sheet, startRow = 2)
rownames(input_df) <- input_df[["row.names"]]
input_df[["row.names"]] <- NULL
print(dim(input_df))
if (nrow(input_df) < 5000) {
warning("Something appears wrong with the de table: ", input_xlsx)
}
return(input_df)
}
sig_reader <- function(xlsx, sheet = "outcome", direction = "up") {
this_sheet <- paste0(direction, "_deseq_", sheet)
input_df <- openxlsx::readWorkbook(xlsx, sheet = this_sheet, startRow = 2)
rownames(input_df) <- input_df[["row.names"]]
input_df[["row.names"]] <- NULL
dim(input_df)
if (nrow(input_df) < 20) {
message("There are less than 20 rows in this significance table, it is unlikely to be interesting.")
}
return(input_df)
}I have been having some difficulties getting the treeplot fonts to match our readability goals. The set of things I have tried so far are:
With that in mind, the following two parameters are going to set the width and height of the output pdf documents which will be sent to Maria Adelaida in order to arrange into the final figures via inkscape.
treeplot_height <- 6
treeplot_width <- 12
wrap_width <- 24
desired_go_ont <- "BP"I once again moved the ontology analyses to their own document. This is primarily because I want a fresh notebook to play around with these and get some of the resulting clutter out of the DE notebooks.
The con of doing this is that some of my enrichment methods are smart enough to directly take the output from combine_de_tables()/extract_significant_genes(). I guess I can dispatch a method to take the xlsx file as input…
Thus, for each enrichment analysis that was in the differential expression documents, there will now be a few stanzas here, one which loads the appropriate xlsx file, one which performs gProfiler, and one which uses clusterProfiler. On occasion there may be another with random stuff like me poking at transcription factors or other side interests…
In addition, I am going to do the Tumaco-only analyses first, because they are what are actually in the paper.
The gene set enrichment will follow each DE analysis during this document. I am adding a series of explicitly GSEA analyses in this most recent iteration, in these I will pass the full DE table and check the distribution of logFC values against the genes in each category as opposed to the simpler over-enrichment of the high/low DE genes.
Most (all?) of the gene set enrichment analyses performed in this document are a combination of gProfiler2 (Kolberg et al. (2020)) and clusterProfiler (Yu et al. (2012)). There are functions available in hpgltools to also perform a few other methods, but for the moment I am sticking to only these two. Oh yeah, I need to wrap clusterProfiler’s tree (taken from topGO) plotter because it spams plots everywhere…
input_xlsx <- glue("analyses/3_cali_and_tumaco/DE_Cure_Fail/Clinical_Samples/tc_clinical_cf_table_sva-v{ver}.xlsx")
all_de_cf_table <- table_reader(input_xlsx, "outcome")## [1] 12162 68
all_de_cf_up <- sig_reader(glue("analyses/3_cali_and_tumaco/DE_Cure_Fail/Clinical_Samples/tc_clinical_cf_sig_sva-v{ver}.xlsx"), "outcome", "up")
all_de_cf_down <- sig_reader(glue("analyses/3_cali_and_tumaco/DE_Cure_Fail/Clinical_Samples/tc_clinical_cf_sig_sva-v{ver}.xlsx"), "outcome", "down")
all_de_cf <- rbind.data.frame(all_de_cf_up, all_de_cf_down)
tumaco_xlsx <- glue("analyses/4_tumaco/DE_Cure_Fail/t_all_visitcf_sig_sva-v{ver}.xlsx")
t_de_cf <- openxlsx::readWorkbook(tumaco_xlsx, sheet = 3, startRow = 2)
rownames(t_de_cf) <- t_de_cf[["row.names"]]
t_de_cf[["row.names"]] <- NULL
t_de_cf_up <- t_de_cf[, c("deseq_logfc", "deseq_adjp", "deseq_basemean", "deseq_lfcse")]
t_de_cf <- openxlsx::readWorkbook(tumaco_xlsx, sheet = 4, startRow = 2)
rownames(t_de_cf) <- t_de_cf[["row.names"]]
t_de_cf[["row.names"]] <- NULL
t_de_cf_down <- t_de_cf[, c("deseq_logfc", "deseq_adjp", "deseq_basemean", "deseq_lfcse")]
t_de_cf <- rbind.data.frame(t_de_cf_up, t_de_cf_down)The following gProfiler searches use the all_gprofiler() function instead of simple_gprofiler(). As a result, the results are separated by {contrast}_{direction}. Thus ‘outcome_down’.
The same plots are available as the previous gProfiler searches, but in many of the following runs, I used the dotplot() function to get a slightly different view of the results.
The xlsx files are:
input_xlsx <- glue("{cf_prefix}/All_Samples/t_clinical_cf_table_sva-v{ver}.xlsx")
t_clinical_cf_table_sva <- table_reader(input_xlsx, "outcome")## [1] 14156 68
input_xlsx <- glue("{cf_prefix}/All_Samples/t_clinical_cf_sig_sva-v{ver}.xlsx")
t_clinical_cf_sig_sva_up <- sig_reader(input_xlsx, "outcome")
t_clinical_cf_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")And without biopsies
input_xlsx <- glue("{cf_prefix}/All_Samples/t_clinical_nobiop_cf_table_sva-v{ver}.xlsx")
t_clinicalnb_cf_table_sva <- table_reader(input_xlsx, "outcome")## [1] 11910 68
input_xlsx <- glue("{cf_prefix}/All_Samples/t_clinical_nobiop_cf_sig_sva-v{ver}.xlsx")
t_clinicalnb_cf_sig_sva_up <- sig_reader(input_xlsx, "outcome")
t_clinicalnb_cf_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")
t_clinicalnb_cf_sig_sva_both <- rbind.data.frame(t_clinicalnb_cf_sig_sva_up,
t_clinicalnb_cf_sig_sva_down)After most of the DE analyses, the set of significantly DE genes gets passed to gProfiler2 and clusterProfiler. One slightly neat thing in my gprofiler (and goseq/topGO/gostats) function(s): it coerces the result into the same datastructure produced by clusterProfiler, thus one may play with the various plotting functions in the enrichplot (Yu (n.d.)) package. This is kind of fun because gProfiler2 provides easy access to a few datasets:
My general sense is that the comparisons of primary interest are reactome and one or more GO. I suspect that if there are lots of transcription factors, that might prove interesting.
t_cf_clinical_gp_up <- simple_gprofiler(
t_clinical_cf_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Overrepresentation/clinical_cure_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_clinical_gp_up## Error in eval(expr, envir, enclos): object 't_cf_clinical_gp_up' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_clinical_gp_up[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinical_gp_up' not found
t_cf_clinical_gp_go_up_tree <- sm(enrichplot::treeplot(go_termsim,
label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = "images/overrepresentation/t_cf_clinical_gp_up_tree.pdf",
width = treeplot_width, height = treeplot_height)## Warning in pp(file = "images/overrepresentation/t_cf_clinical_gp_up_tree.pdf",
## : The directory: images/overrepresentation does not exist, will attempt to
## create it.
t_cf_clinical_gp_go_up_tree## Error in eval(expr, envir, enclos): object 't_cf_clinical_gp_go_up_tree' not found
dev.off()## png
## 2
t_cf_clinical_gp_go_up_tree## Error in eval(expr, envir, enclos): object 't_cf_clinical_gp_go_up_tree' not found
enrichplot::dotplot(t_cf_clinical_gp_up[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinical_gp_up' not found
reactome_termsim <- enrichplot::pairwise_termsim(t_cf_clinical_gp_up[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinical_gp_up' not found
t_cf_clinical_gp_reac_up_tree <- sm(enrichplot::treeplot(reactome_termsim,
label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'reactome_termsim' not found
pp(file = "images/overrepresentation/t_cf_clinical_gp_up_tree.pdf",
width = treeplot_width, height = treeplot_height)
t_cf_clinical_gp_reac_up_tree## Error in eval(expr, envir, enclos): object 't_cf_clinical_gp_reac_up_tree' not found
dev.off()## png
## 2
t_cf_clinical_gp_reac_up_tree## Error in eval(expr, envir, enclos): object 't_cf_clinical_gp_reac_up_tree' not found
pp(file = "images/overrepresentation/t_cf_clinical_gp_up_dot.pdf",
width = treeplot_width, height = treeplot_height)
enrichplot::dotplot(t_cf_clinical_gp_up[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinical_gp_up' not found
dev.off()## png
## 2
enrichplot::dotplot(t_cf_clinical_gp_up[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinical_gp_up' not found
tf_termsim <- enrichplot::pairwise_termsim(t_cf_clinical_gp_up[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinical_gp_up' not found
## The treeplot fails for this for some reason?
##t_cf_clinical_gp_tf_up_tree <- sm(enrichplot::treeplot(tf_termsim))
enrichplot::dotplot(t_cf_clinical_gp_up[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinical_gp_up' not found
enrichplot::dotplot(t_cf_clinical_gp_up[["WP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinical_gp_up' not found
No biopsies!
t_cf_clinicalnb_gp_up <- simple_gprofiler(
t_clinicalnb_cf_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Overrepresentation/clinicalnb_cure_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_clinicalnb_gp_up## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_up' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_clinicalnb_gp_up[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinicalnb_gp_up' not found
t_cf_clinicalnb_gp_go_up_tree <- sm(enrichplot::treeplot(go_termsim,
label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = "figures/t_cf_clinicalnb_gp_up_tree.svg",
width = treeplot_width, height = treeplot_height)
t_cf_clinicalnb_gp_go_up_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_go_up_tree' not found
dev.off()## png
## 2
t_cf_clinicalnb_gp_go_up_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_go_up_tree' not found
enrichplot::dotplot(t_cf_clinicalnb_gp_up[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinicalnb_gp_up' not found
reactome_termsim <- enrichplot::pairwise_termsim(t_cf_clinicalnb_gp_up[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinicalnb_gp_up' not found
t_cf_clinicalnb_gp_reac_up_tree <- sm(enrichplot::treeplot(reactome_termsim,
label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'reactome_termsim' not found
pp(file = "images/overrepresentation/t_cf_clinicalnb_gp_up_tree.pdf",
width = treeplot_width, height = treeplot_height)
t_cf_clinicalnb_gp_reac_up_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_reac_up_tree' not found
dev.off()## png
## 2
t_cf_clinicalnb_gp_reac_up_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_reac_up_tree' not found
pp(file = "images/overrepresentation/t_cf_clinicalnb_gp_up_dot.pdf",
width = treeplot_width, height = treeplot_height)
enrichplot::dotplot(t_cf_clinicalnb_gp_up[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinicalnb_gp_up' not found
dev.off()## png
## 2
enrichplot::dotplot(t_cf_clinicalnb_gp_up[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinicalnb_gp_up' not found
tf_termsim <- enrichplot::pairwise_termsim(t_cf_clinicalnb_gp_up[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinicalnb_gp_up' not found
## The treeplot fails for this for some reason?
##t_cf_clinicalnb_gp_tf_up_tree <- sm(enrichplot::treeplot(tf_termsim))
enrichplot::dotplot(t_cf_clinicalnb_gp_up[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinicalnb_gp_up' not found
enrichplot::dotplot(t_cf_clinicalnb_gp_up[["WP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinicalnb_gp_up' not found
The only significant results for this group appear to be GO.
t_cf_clinical_gp_down <- simple_gprofiler(
t_clinical_cf_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Overrepresentation/clinical_fail_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_clinical_gp_down## Error in eval(expr, envir, enclos): object 't_cf_clinical_gp_down' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_clinical_gp_down[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinical_gp_down' not found
t_cf_clinical_gp_go_down_tree <- sm(enrichplot::treeplot(go_termsim))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = "images/overrepresentation/t_cf_clinical_gp_down_tree.pdf",
width = treeplot_width, height = treeplot_height)
t_cf_clinical_gp_go_down_tree## Error in eval(expr, envir, enclos): object 't_cf_clinical_gp_go_down_tree' not found
dev.off()## png
## 2
No biopsies!
t_cf_clinicalnb_gp_down <- simple_gprofiler(
t_clinicalnb_cf_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Overrepresentation/clinicalnb_fail_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_clinicalnb_gp_down## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_down' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_clinicalnb_gp_down[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinicalnb_gp_down' not found
t_cf_clinicalnb_gp_go_down_tree <- sm(enrichplot::treeplot(go_termsim))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = "images/overrepresentation/t_cf_clinicalnb_gp_down_tree.pdf",
width = treeplot_width, height = treeplot_height)
t_cf_clinicalnb_gp_go_down_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_go_down_tree' not found
dev.off()## png
## 2
t_cf_clinicalnb_gp_go_down_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_go_down_tree' not found
## And both, this is not usually where I put this, but the
## clinical samples are a bit of a special case.
t_cf_clinicalnb_gp_both <- simple_gprofiler(
t_clinicalnb_cf_sig_sva_both,
excel = glue("{xlsx_prefix}/Gene_Set_Overrepresentation/clinicalnb_fail_up_gp-v{ver}.xlsx"))## Error in function (type, msg, asError = TRUE) : Recv failure: Connection reset by peer
t_cf_clinicalnb_gp_both## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_both' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_clinicalnb_gp_both[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinicalnb_gp_both' not found
t_cf_clinicalnb_gp_go_both_tree <- sm(enrichplot::treeplot(go_termsim))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = "images/overrepresentation/t_cf_clinicalnb_gp_both_tree.pdf",
width = treeplot_width, height = treeplot_height)
t_cf_clinicalnb_gp_go_both_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_go_both_tree' not found
dev.off()## png
## 2
t_cf_clinicalnb_gp_go_both_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_go_both_tree' not found
reac_termsim <- enrichplot::pairwise_termsim(t_cf_clinicalnb_gp_both[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_clinicalnb_gp_both' not found
t_cf_clinicalnb_gp_reac_both_tree <- sm(enrichplot::treeplot(reac_termsim))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'reac_termsim' not found
pp(file = "images/overrepresentation/t_cf_clinicalnb_gp_both_reac_tree.pdf",
width = treeplot_width, height = treeplot_height)
t_cf_clinicalnb_gp_reac_both_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_reac_both_tree' not found
dev.off()## png
## 2
t_cf_clinicalnb_gp_reac_both_tree## Error in eval(expr, envir, enclos): object 't_cf_clinicalnb_gp_reac_both_tree' not found
The following essentially repeats the gProfiler2 invocation using clusterProfiler. I have a couple of functions which compare the GO results from various methods, perhaps I should dig it out and see how similar the results are using these two tools. My assumption is that the primary differences should arise from the fact that gProfiler theoretically is updating their GO data over time and cProfiler uses the information in org.Hs.eg.db, which afaik has not changed in quite a while.
t_cf_clinical_cp_up <- simple_clusterprofiler(
t_clinical_cf_sig_sva_up, de_table = t_clinical_cf_table_sva,
excel = glue("{xlsx_prefix}/Gene_Set_Overrepresentation/clinical_cure_up_cp-v{ver}.xlsx"))## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Reading KEGG annotation online: "https://rest.kegg.jp/link/hsa/pathway"...
## Reading KEGG annotation online: "https://rest.kegg.jp/list/pathway/hsa"...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the BP data.
##
## Loading required namespace: Vennerable
##
## Writing the MF data.
##
## Writing the KEGG data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_clinical_cp_up[["enrich_objects"]][["BP_all"]])t_cf_clinical_cp_down <- simple_clusterprofiler(
t_clinical_cf_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Overrepresentation/clinical_fail_up_cp-v{ver}.xlsx"))## Unable to find the fold-change column in the de table, not doing gsea.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the BP data.
##
## Writing the MF data.
##
## Writing the CC data.
##
## Writing the KEGG data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_clinical_cp_down[["enrich_objects"]][["BP_all"]])GSEA is not associated with either up nor down, it takes the rank order of genes with respect (in this case) to fold-change.
t_cf_clinical_topn_gsea <- plot_topn_gsea(t_cf_clinical_cp_up)
t_cf_clinical_topn_gsea[["GO"]][[1]]t_cf_clinical_topn_gsea[["GO"]][[2]]t_cf_clinical_topn_gsea[["GO"]][[3]]t_cf_clinical_topn_gsea[["GO"]][[4]]t_cf_clinical_topn_gsea[["GO"]][[5]]The relevant xlsx files are:
input_xlsx <- glue("{xlsx_prefix}/DE_Visits/tv1_vs_later_tables-v{ver}.xlsx")
tv1_vs_later_table <- table_reader(input_xlsx, "later_vs_first")## [1] 11910 68
input_xlsx <- glue("{xlsx_prefix}/DE_Visits/tv1_vs_later_sig-v{ver}.xlsx")
tv1_vs_later_up_sig <- sig_reader(input_xlsx, "later_vs_first")
tv1_vs_later_down_sig <- sig_reader(input_xlsx, "later_vs_first", "down")## There are less than 20 rows in this significance table, it is unlikely to be interesting.
I am not likely to do the decreased in visit 1, there are only 7 genes.
tv1later_up_gp <- simple_gprofiler(
tv1_vs_later_up_sig,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/tv1_vs_later_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
tv1later_up_gp## Error in eval(expr, envir, enclos): object 'tv1later_up_gp' not found
enrichplot::dotplot(tv1later_up_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 'tv1later_up_gp' not found
enrichplot::dotplot(tv1later_up_gp[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 'tv1later_up_gp' not found
Note to self: make some classes for plot_topn_gsea so it can handle the various inputs it is likely to receive.
tv1later_up_cp <- simple_clusterprofiler(
tv1_vs_later_up_sig, de_table = tv1_vs_later_table,
orgdb = "org.Hs.eg.db", kegg_prefix = "hs", do_kegg = TRUE)## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
enrichplot::dotplot(tv1later_up_cp[["enrich_objects"]][["MF_all"]])enrichplot::dotplot(tv1later_up_cp[["enrich_objects"]][["BP_all"]])written <- write_cp_data(
tv1later_up_cp,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/tv1_vs_later_up_cp-v{ver}.xlsx"))## Writing a sheet containing the legend.
## Writing the MF data.
## Writing the CC data.
## Finished writing excel file.
tv1later_topn_gsea <- plot_topn_gsea(tv1later_up_cp)
tv1later_topn_gsea[["GO"]][[1]]tv1later_topn_gsea[["GO"]][[2]]The relevant input xlsx files are:
Oh, I messed up and put the DE results in the GSEA directory!
Let us see if we observe general male/female differences in the data. This has an important caveat: there are few female failures in the dataset and so the results may reflect that.
input_xlsx <- glue("{xlsx_prefix}/DE_Sex/t_sex_cure_table-v{ver}.xlsx")
t_sex_table <- table_reader(input_xlsx, "male_vs_female")## [1] 13971 68
input_xlsx <- glue("{xlsx_prefix}/DE_Sex/t_sex_cure_sig-v{ver}.xlsx")
t_sex_up_sig <- sig_reader(input_xlsx, "male_vs_female")
t_sex_down_sig <- sig_reader(input_xlsx, "male_vs_female", "down")t_sex_up_gp <- simple_gprofiler(
t_sex_up_sig,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/sex_male_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_sex_up_gp## Error in eval(expr, envir, enclos): object 't_sex_up_gp' not found
enrichplot::dotplot(t_sex_up_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_sex_up_gp' not found
enrichplot::dotplot(t_sex_up_gp[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_sex_up_gp' not found
enrichplot::dotplot(t_sex_up_gp[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_sex_up_gp' not found
t_sex_down_gp <- simple_gprofiler(
t_sex_down_sig,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/sex_female_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_sex_down_gp## Error in eval(expr, envir, enclos): object 't_sex_down_gp' not found
Given the results from gProfiler, I do not have high expectations for clusterProfiler, so I am not likely to take the time to write them out. It seems like male/female is confounded with cure/fail.
t_sex_up_cp <- simple_clusterprofiler(
t_sex_up_sig, de_table = t_sex_table,
orgdb = "org.Hs.eg.db", kegg_prefix = "hs", do_kegg = TRUE)## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
enrichplot::dotplot(t_sex_up_cp[["enrich_objects"]][["BP_all"]])t_sex_down_cp <- simple_clusterprofiler(
t_sex_down_sig, de_table = t_sex_table,
orgdb = "org.Hs.eg.db", kegg_prefix = "hs", do_kegg = TRUE)## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
enrichplot::dotplot(t_sex_down_cp[["enrich_objects"]][["BP_all"]])t_sex_topn_gsea <- plot_topn_gsea(t_sex_up_cp)
t_sex_topn_gsea[["GO"]][[1]]Once again, the relevant files to load:
input_xlsx <- glue("{xlsx_prefix}/DE_Ethnicity/t_ethnicity_table-v{ver}.xlsx")
t_ethnicity_mestizo_indigenous <- table_reader(input_xlsx, "mestizo_indigenous")## [1] 14156 68
t_ethnicity_mestizo_afrocol <- table_reader(input_xlsx, "mestizo_afrocol")## [1] 14156 68
t_ethnicity_indigenous_afrocol <- table_reader(input_xlsx, "indigenous_afrocol")## [1] 14156 68
input_xlsx <- glue("{xlsx_prefix}/DE_Ethnicity/t_ethnicity_sig-v{ver}.xlsx")
t_ethnicity_mestizo_indigenous_up <- sig_reader(input_xlsx, "mestizo_indigenous")
t_ethnicity_mestizo_indigenous_down <- sig_reader(input_xlsx, "mestizo_indigenous", "down")
t_ethnicity_mestizo_afrocol_up <- sig_reader(input_xlsx, "mestizo_afrocol")
t_ethnicity_mestizo_afrocol_down <- sig_reader(input_xlsx, "mestizo_afrocol", "down")
t_ethnicity_indigenous_afrocol_up <- sig_reader(input_xlsx, "indigenous_afrocol")
t_ethnicity_indigenous_afrocol_down <- sig_reader(input_xlsx, "indigenous_afrocol", "down")mestizo_indigenous_up_gp <- simple_gprofiler(
t_ethnicity_mestizo_indigenous_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/ethnicity_mi_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
mestizo_indigenous_up_gp## Error in eval(expr, envir, enclos): object 'mestizo_indigenous_up_gp' not found
indigenous_mestizo_up_gp <- simple_gprofiler(
t_ethnicity_mestizo_indigenous_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/ethnicity_im_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
indigenous_mestizo_up_gp## Error in eval(expr, envir, enclos): object 'indigenous_mestizo_up_gp' not found
mestizo_afrocol_up_gp <- simple_gprofiler(
t_ethnicity_mestizo_afrocol_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/ethnicity_ma_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
mestizo_afrocol_up_gp## Error in eval(expr, envir, enclos): object 'mestizo_afrocol_up_gp' not found
afrocol_mestizo_up_gp <- simple_gprofiler(
t_ethnicity_mestizo_afrocol_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/ethnicity_am_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
afrocol_mestizo_up_gp## Error in eval(expr, envir, enclos): object 'afrocol_mestizo_up_gp' not found
indigenous_afrocol_up_gp <- simple_gprofiler(
t_ethnicity_indigenous_afrocol_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/ethnicity_ia_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
indigenous_afrocol_up_gp## Error in eval(expr, envir, enclos): object 'indigenous_afrocol_up_gp' not found
afrocol_indigenous_up_gp <- simple_gprofiler(
t_ethnicity_indigenous_afrocol_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/ethnicity_ai_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
afrocol_indigenous_up_gp## Error in eval(expr, envir, enclos): object 'afrocol_indigenous_up_gp' not found
mestizo_indigenous_up_cp <- simple_clusterprofiler(
t_ethnicity_mestizo_indigenous_up,
de_table = t_ethnicity_mestizo_indigenous)## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
mestizo_indigenous_up_cp## A set of ontologies produced by clusterprofiler.
indigenous_mestizo_up_cp <- simple_clusterprofiler(
t_ethnicity_mestizo_indigenous_down)## Unable to find the fold-change column in the de table, not doing gsea.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
indigenous_mestizo_up_cp## A set of ontologies produced by clusterprofiler.
mestizo_afrocol_up_cp <- simple_clusterprofiler(
t_ethnicity_mestizo_afrocol_up,
de_table = t_ethnicity_mestizo_afrocol)## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
mestizo_afrocol_up_cp## A set of ontologies produced by clusterprofiler.
afrocol_mestizo_up_cp <- simple_clusterprofiler(t_ethnicity_mestizo_afrocol_down)## Unable to find the fold-change column in the de table, not doing gsea.
afrocol_mestizo_up_cp## A set of ontologies produced by clusterprofiler.
indigenous_afrocol_up_cp <- simple_clusterprofiler(
t_ethnicity_indigenous_afrocol_up,
de_table = t_ethnicity_indigenous_afrocol)## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
indigenous_afrocol_up_cp## A set of ontologies produced by clusterprofiler.
afrocol_indigenous_up_cp <- simple_clusterprofiler(t_ethnicity_indigenous_afrocol_down)## Unable to find the fold-change column in the de table, not doing gsea.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
afrocol_indigenous_up_cp## A set of ontologies produced by clusterprofiler.
It looks like there are very few groups in the visit 1 significant genes.
The relevant xlsx files are:
input_xlsx <- glue("{cf_prefix}/Visits/t_clinical_v1_cf_table_sva-v{ver}.xlsx")
t_cf_clinical_v1_table_sva <- table_reader(input_xlsx)## [1] 14023 68
input_xlsx <- glue("{cf_prefix}/Visits/t_clinical_v1_cf_sig_sva-v{ver}.xlsx")
t_cf_clinical_v1_sig_sva_up <- sig_reader(input_xlsx, "outcome")
t_cf_clinical_v1_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")t_cf_clinical_v1_sig_sva_up_gp <- simple_gprofiler(t_cf_clinical_v1_sig_sva_up)## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_clinical_v1_sig_sva_up_gp## Error in eval(expr, envir, enclos): object 't_cf_clinical_v1_sig_sva_up_gp' not found
t_cf_clinical_v1_sig_sva_down_gp <- simple_gprofiler(t_cf_clinical_v1_sig_sva_down)## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_clinical_v1_sig_sva_down_gp## Error in eval(expr, envir, enclos): object 't_cf_clinical_v1_sig_sva_down_gp' not found
enrichplot::dotplot(t_cf_clinical_v1_sig_sva_down_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_clinical_v1_sig_sva_down_gp' not found
t_cf_clinical_v1_sig_sva_up_cp <- simple_cprofiler(
t_cf_clinical_v1_sig_sva_up,
de_table = t_cf_clinical_v1_table_sva,
orgdb = "org.Hs.eg.db")## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
t_cf_clinical_v1_sig_sva_up_cp## A set of ontologies produced by clusterprofiler.
enrichplot::dotplot(t_cf_clinical_v1_sig_sva_up_cp[["enrich_objects"]][["BP_all"]])t_cf_clinical_v1_sig_sva_down_cp <- simple_cprofiler(
t_cf_clinical_v1_sig_sva_down,
orgdb = "org.Hs.eg.db")## Unable to find the fold-change column in the de table, not doing gsea.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
It appears there are too few results to perform the gsea plots.
The relevant xlsx output may be found at:
input_xlsx <- glue("{cf_prefix}/Biopsies/t_biopsy_cf_table_sva-v{ver}.xlsx")
t_cf_biopsy_table_sva <- table_reader(input_xlsx, "outcome")## [1] 13513 68
input_xlsx <- glue("{cf_prefix}/Biopsies/t_cf_biopsy_sig_sva-v{ver}.xlsx")
t_cf_biopsy_sig_sva_up <- sig_reader(input_xlsx, "outcome")## There are less than 20 rows in this significance table, it is unlikely to be interesting.
t_cf_biopsy_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")## There are less than 20 rows in this significance table, it is unlikely to be interesting.
t_cf_biopsy_sig_sva_both <- rbind.data.frame(t_cf_biopsy_sig_sva_up,
t_cf_biopsy_sig_sva_down)We only have 17 genes in the biopsies, but perhaps they are still interesting?
t_cf_biopsy_sig_sva_gp_up <- simple_gprofiler(
t_cf_biopsy_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_biopsy_sig_sva_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_biopsy_sig_sva_gp_up## Error in eval(expr, envir, enclos): object 't_cf_biopsy_sig_sva_gp_up' not found
enrichplot::dotplot(t_cf_biopsy_sig_sva_gp_up[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_biopsy_sig_sva_gp_up' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_biopsy_sig_sva_gp_up[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_biopsy_sig_sva_gp_up' not found
go_treeplot <- sm(treeplot(go_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_biopsy_up_gp_go-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
t_cf_biopsy_sig_sva_gp_down <- simple_gprofiler(
t_cf_biopsy_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_biopsy_sig_sva_down_gp-v{ver}.xlsx"))
t_cf_biopsy_sig_sva_gp_down## A set of ontologies produced by gprofiler using 11
## genes against the hsapiens annotations and significance cutoff 0.05.
## There are:
## 0 MF
## 0 BP
## 0 KEGG
## 0 REAC
## 0 WP
## 0 TF
## 0 MIRNA
## 0 HPA
## 0 CORUM
## 0 HP hits.
## Not nearly as interestingAgain, clusterprofiler version
t_cf_biopsy_sig_sva_cp_up <- simple_cprofiler(
t_cf_biopsy_sig_sva_up, de_table = t_cf_biopsy_table_sva,
orgdb = "org.Hs.eg.db",
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_biopsy_sig_sva_up_cp-v{ver}.xlsx"))## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the BP data.
##
## Writing the MF data.
##
## Writing the CC data.
##
## Writing the KEGG data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_biopsy_sig_sva_cp_up[["enrich_objects"]][["BP_all"]])t_cf_biopsy_sig_topn_gsea <- plot_topn_gsea(t_cf_biopsy_sig_sva_cp_up)
t_cf_biopsy_sig_topn_gsea[["GO_outcome_up"]][[1]]## NULL
input_xlsx <- glue("{cf_prefix}/Eosinophils/t_eosinophil_cf_table_sva-v{ver}.xlsx")
t_cf_eosinophil_table_sva <- table_reader(input_xlsx, "outcome")## [1] 10532 68
input_xlsx <- glue("{cf_prefix}/Eosinophils/t_eosinophil_cf_sig_sva-v{ver}.xlsx")
t_cf_eosinophil_sig_sva_up <- sig_reader(input_xlsx, "outcome")
t_cf_eosinophil_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")
t_cf_eosinophil_sig_sva_both <- rbind.data.frame(t_cf_eosinophil_sig_sva_up,
t_cf_eosinophil_sig_sva_down)t_cf_eosinophil_sig_sva_up_gp <- simple_gprofiler(
t_cf_eosinophil_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_eosinophil_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_eosinophil_sig_sva_up_gp## Error in eval(expr, envir, enclos): object 't_cf_eosinophil_sig_sva_up_gp' not found
enrichplot::dotplot(t_cf_eosinophil_sig_sva_up_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_eosinophil_sig_sva_up_gp' not found
enrichplot::dotplot(t_cf_eosinophil_sig_sva_up_gp[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_eosinophil_sig_sva_up_gp' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_eosinophil_sig_sva_up_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_eosinophil_sig_sva_up_gp' not found
go_treeplot <- sm(treeplot(go_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = "figures/t_cf_eosinophil_up_gp_go.svg",
height = treeplot_height, width = treeplot_width)
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
reac_termsim <- enrichplot::pairwise_termsim(t_cf_eosinophil_sig_sva_up_gp[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_eosinophil_sig_sva_up_gp' not found
reac_treeplot <- sm(treeplot(reac_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'reac_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_eosinophil_up_gp_reac-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
reac_treeplot## Error in eval(expr, envir, enclos): object 'reac_treeplot' not found
dev.off()## png
## 2
t_cf_eosinophil_sig_sva_down_gp <- simple_gprofiler(
t_cf_eosinophil_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_eosinophil_down_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
enrichplot::dotplot(t_cf_eosinophil_sig_sva_down_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_eosinophil_sig_sva_down_gp' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_eosinophil_sig_sva_down_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_eosinophil_sig_sva_down_gp' not found
go_treeplot <- sm(treeplot(go_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_eosinophil_down_gp_go-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
## There is only one reactome hit, so not plotting it.I evaluated this and the ‘up’ set next to each other and they are extremely similar:
up: 148 GO hits, 68 TF, 0 HPA both: 169 GO, 69 TF, and 2 HPA
Otherwise I think they are the same.
t_cf_eosinophil_sig_sva_both_gp <- simple_gprofiler(
t_cf_eosinophil_sig_sva_both,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_eosinophil_both_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_eosinophil_sig_sva_both_gp## Error in eval(expr, envir, enclos): object 't_cf_eosinophil_sig_sva_both_gp' not found
enrichplot::dotplot(t_cf_eosinophil_sig_sva_both_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_eosinophil_sig_sva_both_gp' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_eosinophil_sig_sva_both_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_eosinophil_sig_sva_both_gp' not found
go_treeplot <- sm(treeplot(go_termsim, label_formap = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_eosinophil_both_gp_go-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
reac_termsim <- enrichplot::pairwise_termsim(t_cf_eosinophil_sig_sva_both_gp[["REAC_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_eosinophil_sig_sva_both_gp' not found
reac_treeplot <- sm(treeplot(reac_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'reac_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_eosinophil_both_gp_reac-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
reac_treeplot## Error in eval(expr, envir, enclos): object 'reac_treeplot' not found
dev.off()## png
## 2
t_cf_eosinophil_sig_sva_cp_up <- simple_cprofiler(
t_cf_eosinophil_sig_sva_up, de_table = t_cf_eosinophil_table_sva,
orgdb = "org.Hs.eg.db",
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_eosinophil_sig_sva_up_cp-v{ver}.xlsx"))## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the BP data.
##
## Writing the MF data.
##
## Writing the CC data.
##
## Writing the KEGG data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_eosinophil_sig_sva_cp_up[["enrich_objects"]][["BP_all"]])t_cf_eosinophil_sig_sva_cp_down <- simple_cprofiler(
t_cf_eosinophil_sig_sva_down,
orgdb = "org.Hs.eg.db",
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_eosinophil_sig_sva_down_cp-v{ver}.xlsx"))## Unable to find the fold-change column in the de table, not doing gsea.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the BP data.
##
## Writing the MF data.
##
## Writing the CC data.
##
## Writing the KEGG data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_eosinophil_sig_sva_cp_down[["enrich_objects"]][["BP_all"]])t_cf_eosinophil_sig_topn_gsea <- plot_topn_gsea(t_cf_eosinophil_sig_sva_cp_up)
t_cf_eosinophil_sig_topn_gsea[["GO_outcome_up"]][[1]]## NULL
input_xlsx <- glue("{cf_prefix}/Monocytes/t_monocyte_cf_table_sva-v{ver}.xlsx")
t_cf_monocyte_table_sva <- table_reader(input_xlsx, "outcome")## [1] 10862 68
input_xlsx <- glue("{cf_prefix}/Monocytes/t_monocyte_cf_sig_sva-v{ver}.xlsx")
t_cf_monocyte_sig_sva_up <- sig_reader(input_xlsx, "outcome")
t_cf_monocyte_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")
t_cf_monocyte_sig_sva_both <- rbind.data.frame(t_cf_monocyte_sig_sva_up,
t_cf_monocyte_sig_sva_down)Now that I am looking back over these results, I am not compeltely certain why I only did the gprofiler search for the sva data…
t_cf_monocyte_sig_sva_up_gp <- simple_gprofiler(
t_cf_monocyte_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_monocyte_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_monocyte_sig_sva_up_gp## Error in eval(expr, envir, enclos): object 't_cf_monocyte_sig_sva_up_gp' not found
enrichplot::dotplot(t_cf_monocyte_sig_sva_up_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_monocyte_sig_sva_up_gp' not found
enrichplot::dotplot(t_cf_monocyte_sig_sva_up_gp[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_monocyte_sig_sva_up_gp' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_monocyte_sig_sva_up_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_monocyte_sig_sva_up_gp' not found
go_treeplot <- sm(treeplot(go_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = "figures/overrepresentation/t_cf_monocyte_up_gp_go.svg",
height = treeplot_height, width = treeplot_width)## Warning in pp(file = "figures/overrepresentation/t_cf_monocyte_up_gp_go.svg", :
## The directory: figures/overrepresentation does not exist, will attempt to
## create it.
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
t_cf_monocyte_sig_sva_down_gp <- simple_gprofiler(
t_cf_monocyte_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_monocyte_down_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
enrichplot::dotplot(t_cf_monocyte_sig_sva_down_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_monocyte_sig_sva_down_gp' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_monocyte_sig_sva_down_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_monocyte_sig_sva_down_gp' not found
go_treeplot <- sm(treeplot(go_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_monocyte_down_gp_go-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
## Insufficient results to make a tree plot.t_cf_monocyte_sig_sva_both_gp <- simple_gprofiler(
t_cf_monocyte_sig_sva_both,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_monocyte_both_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_monocyte_sig_sva_both_gp## Error in eval(expr, envir, enclos): object 't_cf_monocyte_sig_sva_both_gp' not found
enrichplot::dotplot(t_cf_monocyte_sig_sva_both_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_monocyte_sig_sva_both_gp' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_monocyte_sig_sva_both_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_monocyte_sig_sva_both_gp' not found
go_treeplot <- sm(treeplot(go_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_monocyte_both_gp_go-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
## Insufficient results for reactome
tf_termsim <- enrichplot::pairwise_termsim(t_cf_monocyte_sig_sva_both_gp[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_monocyte_sig_sva_both_gp' not found
tf_treeplot <- sm(treeplot(tf_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'tf_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_monocyte_both_gp_tf-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
tf_treeplot## Error in eval(expr, envir, enclos): object 'tf_treeplot' not found
dev.off()## png
## 2
tf_treeplot## Error in eval(expr, envir, enclos): object 'tf_treeplot' not found
t_cf_monocyte_sig_sva_cp_up <- simple_cprofiler(
t_cf_monocyte_sig_sva_up, de_table = t_cf_monocyte_table_sva,
orgdb = "org.Hs.eg.db",
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_monocyte_sig_sva_up_cp-v{ver}.xlsx"))## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the BP data.
##
## Writing the KEGG data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_monocyte_sig_sva_cp_up[["enrich_objects"]][["BP_all"]])t_cf_monocyte_sig_sva_cp_down <- simple_cprofiler(
t_cf_monocyte_sig_sva_down,
orgdb = "org.Hs.eg.db",
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_monocyte_sig_sva_down_cp-v{ver}.xlsx"))## Unable to find the fold-change column in the de table, not doing gsea.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the BP data.
##
## Writing the MF data.
##
## Writing the CC data.
##
## Writing the KEGG data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_monocyte_sig_sva_cp_down[["enrich_objects"]][["BP_all"]])t_cf_monocyte_sig_topn_gsea <- plot_topn_gsea(t_cf_monocyte_sig_sva_cp_up)
t_cf_monocyte_sig_topn_gsea[["GO_outcome_up"]][[1]]## NULL
input_xlsx <- glue("{cf_prefix}/Neutrophils/t_neutrophil_cf_table_sva-v{ver}.xlsx")
t_cf_neutrophil_table_sva <- table_reader(input_xlsx, "outcome")## [1] 9101 68
input_xlsx <- glue("{cf_prefix}/Neutrophils/t_neutrophil_cf_sig_sva-v{ver}.xlsx")
t_cf_neutrophil_sig_sva_up <- sig_reader(input_xlsx, "outcome")
t_cf_neutrophil_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")
t_cf_neutrophil_sig_sva_both <- rbind.data.frame(t_cf_neutrophil_sig_sva_up,
t_cf_neutrophil_sig_sva_down)Now that I am looking back over these results, I am not compeltely certain why I only did the gprofiler search for the sva data…
t_cf_neutrophil_sig_sva_up_gp <- simple_gprofiler(
t_cf_neutrophil_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_up_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_neutrophil_sig_sva_up_gp## Error in eval(expr, envir, enclos): object 't_cf_neutrophil_sig_sva_up_gp' not found
enrichplot::dotplot(t_cf_neutrophil_sig_sva_up_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_neutrophil_sig_sva_up_gp' not found
enrichplot::dotplot(t_cf_neutrophil_sig_sva_up_gp[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_neutrophil_sig_sva_up_gp' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_neutrophil_sig_sva_up_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_neutrophil_sig_sva_up_gp' not found
go_treeplot <- sm(treeplot(go_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = "figures/t_cf_neutrophil_up_gp_go.svg",
height = treeplot_height, width = treeplot_width)
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
t_cf_neutrophil_sig_sva_down_gp <- simple_gprofiler(
t_cf_neutrophil_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_down_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_neutrophil_sig_sva_down_gp## Error in eval(expr, envir, enclos): object 't_cf_neutrophil_sig_sva_down_gp' not found
## Not much to work with here.t_cf_neutrophil_sig_sva_both_gp <- simple_gprofiler(
t_cf_neutrophil_sig_sva_both,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_both_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_neutrophil_sig_sva_both_gp## Error in eval(expr, envir, enclos): object 't_cf_neutrophil_sig_sva_both_gp' not found
enrichplot::dotplot(t_cf_neutrophil_sig_sva_both_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_neutrophil_sig_sva_both_gp' not found
enrichplot::dotplot(t_cf_neutrophil_sig_sva_both_gp[["TF_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'dotplot': object 't_cf_neutrophil_sig_sva_both_gp' not found
go_termsim <- enrichplot::pairwise_termsim(t_cf_neutrophil_sig_sva_both_gp[["BP_enrich"]])## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'pairwise_termsim': object 't_cf_neutrophil_sig_sva_both_gp' not found
go_treeplot <- sm(treeplot(go_termsim, label_format = wrap_width))## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'treeplot': object 'go_termsim' not found
pp(file = glue("images/overrepresentation/t_cf_neutrophil_both_gp_go-v{ver}.pdf"),
height = treeplot_height, width = treeplot_width)
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
dev.off()## png
## 2
go_treeplot## Error in eval(expr, envir, enclos): object 'go_treeplot' not found
## Insufficient results for reactomet_cf_neutrophil_sig_sva_cp_up <- simple_cprofiler(
t_cf_neutrophil_sig_sva_up, de_table = t_cf_neutrophil_table_sva,
orgdb = "org.Hs.eg.db",
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_sig_sva_up_cp-v{ver}.xlsx"))## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the BP data.
##
## Writing the MF data.
##
## Writing the CC data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_neutrophil_sig_sva_cp_up[["enrich_objects"]][["BP_all"]])t_cf_neutrophil_sig_sva_cp_down <- simple_cprofiler(
t_cf_neutrophil_sig_sva_down,
orgdb = "org.Hs.eg.db",
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_sig_sva_down_cp-v{ver}.xlsx"))## Unable to find the fold-change column in the de table, not doing gsea.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Writing a sheet containing the legend.
##
## Writing the MF data.
##
## Writing the CC data.
##
## Writing the KEGG data.
##
## Finished writing excel file.
enrichplot::dotplot(t_cf_neutrophil_sig_sva_cp_down[["enrich_objects"]][["BP_all"]])t_cf_neutrophil_sig_topn_gsea <- plot_topn_gsea(t_cf_neutrophil_sig_sva_cp_up)
t_cf_neutrophil_sig_topn_gsea[["GO_outcome_up"]][[1]]## NULL
input_xlsx <- glue("{cf_prefix}/Monocytes/t_monocyte_v1_cf_table_sva-v{ver}.xlsx")
t_cf_monocyte_v1_table_sva <- table_reader(input_xlsx, "outcome")## [1] 10482 68
input_xlsx <- glue("{cf_prefix}/Monocytes/t_monocyte_v1_cf_sig_sva-v{ver}.xlsx")
t_cf_monocyte_v1_sig_sva_up <- sig_reader(input_xlsx, "outcome")## There are less than 20 rows in this significance table, it is unlikely to be interesting.
t_cf_monocyte_v1_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")
t_cf_monocyte_v1_sig_sva_both <- rbind.data.frame(t_cf_monocyte_v1_sig_sva_up,
t_cf_monocyte_v1_sig_sva_down)V1: Up: 14 genes; No categories V1: Down: 52 genes; 20 GO, 5 TF
t_cf_monocyte_v1_sig_sva_up_gp <- simple_gprofiler(
t_cf_monocyte_v1_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_up_gp-v{ver}.xlsx"))
t_cf_monocyte_v1_sig_sva_up_gp## A set of ontologies produced by gprofiler using 14
## genes against the hsapiens annotations and significance cutoff 0.05.
## There are:
## 0 MF
## 0 BP
## 0 KEGG
## 0 REAC
## 0 WP
## 0 TF
## 0 MIRNA
## 0 HPA
## 0 CORUM
## 0 HP hits.
t_cf_monocyte_v1_sig_sva_down_gp <- simple_gprofiler(
t_cf_monocyte_v1_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_down_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_monocyte_v1_sig_sva_down_gp## Error in eval(expr, envir, enclos): object 't_cf_monocyte_v1_sig_sva_down_gp' not found
t_cf_monocyte_v1_sig_sva_both_gp <- simple_gprofiler(
t_cf_monocyte_v1_sig_sva_both,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_down_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_monocyte_v1_sig_sva_both_gp## Error in eval(expr, envir, enclos): object 't_cf_monocyte_v1_sig_sva_both_gp' not found
I like cats!
t_cf_monocyte_v1_sig_sva_up_cp <- simple_cprofiler(t_cf_monocyte_v1_sig_sva_up,
t_cf_monocyte_v1_table_sva,
orgdb = "org.Hs.eg.db")## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
enrichplot::dotplot(t_cf_monocyte_v1_sig_sva_up_cp[["enrich_objects"]][["BP_all"]])t_cf_monocyte_v1_topn_gsea <- plot_topn_gsea(t_cf_monocyte_v1_sig_sva_up_cp)
t_cf_monocyte_v1_topn_gsea[["GO_outcome_up"]][[1]]## NULL
input_xlsx <- glue("{cf_prefix}/Neutrophils/t_neutrophil_v1_cf_table_sva-v{ver}.xlsx")
t_cf_neutrophil_v1_table_sva <- table_reader(input_xlsx, "outcome")## [1] 8717 68
input_xlsx <- glue("{cf_prefix}/Neutrophils/t_neutrophil_v1_cf_sig_sva-v{ver}.xlsx")
t_cf_neutrophil_v1_sig_sva_up <- sig_reader(input_xlsx, "outcome")## There are less than 20 rows in this significance table, it is unlikely to be interesting.
t_cf_neutrophil_v1_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")## There are less than 20 rows in this significance table, it is unlikely to be interesting.
t_cf_neutrophil_v1_sig_sva_both <- rbind.data.frame(t_cf_neutrophil_v1_sig_sva_up,
t_cf_neutrophil_v1_sig_sva_down)t_cf_neutrophil_v1_sig_sva_up_gp <- simple_gprofiler(
t_cf_neutrophil_v1_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_up_gp-v{ver}.xlsx"))## There are only, 5 returning null.
t_cf_neutrophil_v1_sig_sva_up_gp## NULL
t_cf_neutrophil_v1_sig_sva_down_gp <- simple_gprofiler(
t_cf_neutrophil_v1_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_down_gp-v{ver}.xlsx"))## There are only, 8 returning null.
t_cf_neutrophil_v1_sig_sva_down_gp## NULL
t_cf_neutrophil_v1_sig_sva_both_gp <- simple_gprofiler(
t_cf_neutrophil_v1_sig_sva_both,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_neutrophil_down_gp-v{ver}.xlsx"))
t_cf_neutrophil_v1_sig_sva_both_gp## A set of ontologies produced by gprofiler using 13
## genes against the hsapiens annotations and significance cutoff 0.05.
## There are:
## 0 MF
## 0 BP
## 0 KEGG
## 0 REAC
## 0 WP
## 0 TF
## 0 MIRNA
## 0 HPA
## 0 CORUM
## 0 HP hits.
t_cf_neutrophil_v1_sig_sva_up_cp <- simple_cprofiler(t_cf_neutrophil_v1_sig_sva_up,
t_cf_neutrophil_v1_table_sva,
orgdb = "org.Hs.eg.db")## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
## Scale for size is already present.
## Adding another scale for size, which will replace the existing scale.
enrichplot::dotplot(t_cf_neutrophil_v1_sig_sva_up_cp[["enrich_objects"]][["BP_all"]])t_cf_neutrophil_v1_topn_gsea <- plot_topn_gsea(t_cf_neutrophil_v1_sig_sva_up_cp)
t_cf_neutrophil_v1_topn_gsea[["GO_outcome_up"]][[1]]## NULL
input_xlsx <- glue("{cf_prefix}/Eosinophils/t_eosinophil_v1_cf_table_sva-v{ver}.xlsx")
t_cf_eosinophil_v1_table_sva <- table_reader(input_xlsx, "outcome")## [1] 9979 68
input_xlsx <- glue("{cf_prefix}/Eosinophils/t_eosinophil_v1_cf_sig_sva-v{ver}.xlsx")
t_cf_eosinophil_v1_sig_sva_up <- sig_reader(input_xlsx, "outcome")## There are less than 20 rows in this significance table, it is unlikely to be interesting.
t_cf_eosinophil_v1_sig_sva_down <- sig_reader(input_xlsx, "outcome", "down")## There are less than 20 rows in this significance table, it is unlikely to be interesting.
t_cf_eosinophil_v1_sig_sva_both <- rbind.data.frame(t_cf_eosinophil_v1_sig_sva_up,
t_cf_eosinophil_v1_sig_sva_down)t_cf_eosinophil_v1_sig_sva_up_gp <- simple_gprofiler(
t_cf_eosinophil_v1_sig_sva_up,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_eosinophil_up_gp-v{ver}.xlsx"))
t_cf_eosinophil_v1_sig_sva_up_gp## A set of ontologies produced by gprofiler using 13
## genes against the hsapiens annotations and significance cutoff 0.05.
## There are:
## 0 MF
## 0 BP
## 0 KEGG
## 0 REAC
## 0 WP
## 0 TF
## 0 MIRNA
## 0 HPA
## 0 CORUM
## 0 HP hits.
t_cf_eosinophil_v1_sig_sva_down_gp <- simple_gprofiler(
t_cf_eosinophil_v1_sig_sva_down,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_eosinophil_down_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_eosinophil_v1_sig_sva_down_gp## Error in eval(expr, envir, enclos): object 't_cf_eosinophil_v1_sig_sva_down_gp' not found
t_cf_eosinophil_v1_sig_sva_both_gp <- simple_gprofiler(
t_cf_eosinophil_v1_sig_sva_both,
excel = glue("{xlsx_prefix}/Gene_Set_Enrichment/t_cf_eosinophil_down_gp-v{ver}.xlsx"))## Error in gprofiler_request(url, body): There's an issue with your request to g:Profiler.
## Error code: 503.
## Please double check your input. If this doesn't help, then check your internet connection or contact us with a reproducible example on biit.support@ut.ee
t_cf_eosinophil_v1_sig_sva_both_gp## Error in eval(expr, envir, enclos): object 't_cf_eosinophil_v1_sig_sva_both_gp' not found
t_cf_eosinophil_v1_sig_sva_up_cp <- simple_cprofiler(t_cf_eosinophil_v1_sig_sva_up,
t_cf_eosinophil_v1_table_sva,
orgdb = "org.Hs.eg.db")## preparing geneSet collections...
## GSEA analysis...
## leading edge analysis...
## done...
enrichplot::dotplot(t_cf_eosinophil_v1_sig_sva_up_cp[["enrich_objects"]][["BP_all"]])t_cf_eosinophil_v1_topn_gsea <- plot_topn_gsea(t_cf_eosinophil_v1_sig_sva_up_cp)
t_cf_eosinophil_v1_topn_gsea[["GO_outcome_up"]][[1]]## NULL