• TODO: Box, create ‘plasma’, print out plots, name xlsx appropriately. Check out olps further.

1 Introduction

This document seeks to describe the results from an experiment performed at CIDEIM and sequenced by macrogen. In the experiment a series of U937 macrophages was plated and various sera were added to them.

  1. 3 ‘controls’: M1/M2 and serum free medium.
  2. 2 ‘Healthy’: Sera from two healthy individuals
  3. 5 ‘asymptomatic’: Sera from 5 asymptomatic individuals
  4. 5 ‘chronic’: From chronic individuals.

I think the controls were U937 cells differentiated via various methods and had the tree stimuli added.

I think the other samples were differentiated in a similar fashion and then the sera were added.

I am not sure which is true.

2 Gene annotations

hg_annot <- load_biomart_annotations()
## The biomart annotations file already exists, loading from it.
hg_df <- hg_annot[["gene_annotations"]]

3 Sample sheet annotation

We have an older revision of the sample sheet for this dataset. I added some samples from Dr. Mosser in order to compare against M1/M2 activation states. These extra samples are not likely to be the most appropriate because they are not U937 samples.

hg38_se <- create_se("sample_sheets/macrogen_samples.xlsx",
                     file_column = "hisat_hg38", gene_info = hg_df)
## Reading the sample metadata.
## Checking the state of the condition column.
## Warning in extract_metadata(metadata, id_column = id_column, condition_column =
## condition_column, : There were NA values in the condition column, setting them
## to 'undefined'.
## Checking the state of the batch column.
## Warning in extract_metadata(metadata, id_column = id_column, condition_column =
## condition_column, : There were NA values in the condition column, setting them
## to 'undefined'.
## Checking the condition factor.
## The sample definitions comprises: 54 rows(samples) and 21 columns(metadata fields).
## Warning in create_se("sample_sheets/macrogen_samples.xlsx", file_column =
## "hisat_hg38", : Some samples were removed when cross referencing the samples
## against the count data.
## Matched 21405 annotations and counts.
## Some annotations were lost in merging, setting them to 'undefined'.
## The final summarized experiment has 21481 rows and 21 columns.
hg38_sampletype <- set_conditions(hg38_se, fact = "sampletype")
## The numbers of samples by condition are:
## 
## Asymptomatic      Chronic      control      Healthy 
##            5            5            3            2

4 Simple subtractions of the controls

We have one sample each of SFB, M1, and M2. Lina and Olga are interested in seeing if there are specific genes of interest.

hg38_l2_cpm <- normalize(hg38_se, transform = "log2", convert = "cpm", filter = TRUE)
## Removing 9903 low-count genes (11578 remaining).
## transform_counts: Found 932 values equal to 0, adding 1 to the matrix.
hg38_means <- mean_by_factor(hg38_l2_cpm, fact = "stimulation")
## The factor FBS has only 1 row.
## The factor M1 has only 1 row.
## The factor M2 has only 1 row.
## The factor NS has 12 rows.
mean_df <- hg38_means[["medians"]]  ## yeah, I known it says medians, it is actually mean
subtraction_table <- data.frame(row.names = rownames(mean_df))
subtraction_table[["m1_vs_sfb"]] <- mean_df[["M1"]] - mean_df[["FBS"]]
subtraction_table[["m2_vs_sfb"]] <- mean_df[["M2"]] - mean_df[["FBS"]]
subtraction_table[["m1_vs_m2"]] <- mean_df[["M1"]] - mean_df[["M2"]]
written <- write_xlsx(data = subtraction_table, excel = "excel/m1_m2_fbs_subtractions.xlsx")
## Deleting the file excel/m1_m2_fbs_subtractions.xlsx before writing the tables.

5 RPKM table

There is a desire to use a deconvolution tool (aphis), it requires rpkm values.

written <- write_normalized_se(hg38_se, convert = "rpkm", length_column = "cds_length", excel = "excel/rpkm_values_base10.xlsx")
## Deleting the file excel/rpkm_values_base10.xlsx before writing the tables.
## Writing the first sheet, containing a legend and some summary data.
## Removing 9903 low-count genes (11578 remaining).
## There appear to be 3863 genes without a length.
## transform_counts: Found 58614 values equal to 0, adding 1 to the matrix.
## Warning in write_normalized_se(hg38_se, convert = "rpkm", length_column =
## "cds_length", : It seems the filter chosen results in all-zero rows, setting
## filter to 'simple'.

6 Plots

hg38_norm <- normalize(hg38_sampletype, convert = "cpm", norm = "quant",
                       transform = "log2", filter = TRUE)
## Removing 9903 low-count genes (11578 remaining).
## transform_counts: Found 26 values equal to 0, adding 1 to the matrix.
pp(file = "images/legend.png", image = plot_legend(hg38_sampletype)[["plot"]])

plot_quantreads(hg38_sampletype)
## Library sizes of 15 samples, 
## ranging from 1,872,219 to 7,805,747.

plot_nonzero(hg38_sampletype, y_intercept = 0.65)
## The following samples have less than 13962.65 genes.
##  [1] "m1"      "m2"      "a_20179" "c_10036" "a_20187" "c_10046" "a_20132"
##  [8] "c_10063" "a_20133" "c_10093" "su1160"  "a_20134" "c_10073"
## Scale for colour is already present.
## Adding another scale for colour, which will replace the existing scale.
## Scale for fill is already present.
## Adding another scale for fill, which will replace the existing scale.
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## ℹ The deprecated feature was likely used in the hpgltools package.
##   Please report the issue to the authors.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## A non-zero genes plot of 15 samples.
## These samples have an average 3.382 CPM coverage and 13550 genes observed, ranging from 12975 to
## 14728.

plot_corheat(hg38_norm)
## A heatmap of pairwise sample correlations ranging from: 
## 0.932974671519701 to 0.990409066934894.

plot_pca(hg38_norm)
## The result of performing a fast_svd dimension reduction.
## The x-axis is PC1 and the y-axis is PC2
## Colors are defined by Asymptomatic, Chronic, control, Healthy
## Shapes are defined by undefined.

hg38_nb <- normalize(hg38_sampletype, convert = "cpm", batch = "svaseq",
                     filter = TRUE, transform = "log2")
## Removing 9903 low-count genes (11578 remaining).
## transform_counts: Found 169 values less than 0.
## transform_counts: Found 169 values equal to 0, adding 1 to the matrix.
plot_pca(hg38_nb)
## The result of performing a fast_svd dimension reduction.
## The x-axis is PC1 and the y-axis is PC2
## Colors are defined by Asymptomatic, Chronic, control, Healthy
## Shapes are defined by undefined.

7 Varpart

Some categories of inteest: donor, ac, stimulation, clinicalpresentation

Oh wow, all factors are confounded.

hg38_varpart <- simple_varpart(hg38_sampletype,
                               fstring = "~ 0 + (1|clinicalpresentation) + (1|ac)")
## The model of ~ 0 + (1|clinicalpresentation) + (1|ac) has 7 levels and rank 6
## This will not work with a linear model,
## a different factor or random effect should be used.
hg38_varpart[["partition_plots"]]
## NULL

well, that was a bust.

8 DE

keepers <- list(
  "chr_asy" = c("Chronic", "Asymptomatic"),
  "chr_hea" = c("Chronic", "Healthy"),
  "chr_con" = c("Chronic", "control"),
  "asy_hea" = c("Asymptomatic", "Healthy"),
  "asy_con" = c("Asymptomatic", "control"),
  "hea_con" = c("Healthy", "control"))

hg38_de <- all_pairwise(hg38_sampletype, keepers = keepers, model_fstring = "~ 0 + condition",
                        model_svs = "svaseq", filter = TRUE)
## Asymptomatic      Chronic      control      Healthy 
##            5            5            3            2
## Removing 9903 low-count genes (11578 remaining).
## Basic step 0/3: Normalizing data.
## Basic step 0/3: Converting data.
## I think this is failing? SummarizedExperiment
## Basic step 0/3: Transforming data.
## Setting 4687 entries to zero.
## This received a matrix of SVs.
## converting counts to integer mode
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## conditions
## Asymptomatic      Chronic      control      Healthy 
##            5            5            3            2
## conditions
## Asymptomatic      Chronic      control      Healthy 
##            5            5            3            2
## conditions
## Asymptomatic      Chronic      control      Healthy 
##            5            5            3            2

hg38_de
## A pairwise differential expression with results from: basic, deseq, ebseq, edger, limma, noiseq.
## This used a surrogate/batch estimate from: svaseq.
## The primary analysis performed 6 comparisons.
hg38_tables <- combine_de_tables(hg38_de, keepers = keepers, excel = "excel/hg38_tables.xlsx")
## Deleting the file excel/hg38_tables.xlsx before writing the tables.
## Looking for subscript invalid names, end of extract_keepers.
hg38_tables
## A set of combined differential expression results.
##                     table deseq_sigup deseq_sigdown edger_sigup edger_sigdown
## 1 Chronic_vs_Asymptomatic          31            41          43            73
## 2      Chronic_vs_Healthy          59            43          98            77
## 3      Chronic_vs_control         680           458         748           551
## 4 Asymptomatic_vs_Healthy         112            83         183           127
## 5 Asymptomatic_vs_control         759           492         837           575
## 6      Healthy_vs_control         427           311         488           421
##   limma_sigup limma_sigdown
## 1          46            28
## 2          34            46
## 3         611           554
## 4          92           113
## 5         646           626
## 6         414           392
## Warning: `aes_string()` was deprecated in ggplot2 3.0.0.
## ℹ Please use tidy evaluation idioms with `aes()`.
## ℹ See also `vignette("ggplot2-in-packages")` for more information.
## ℹ The deprecated feature was likely used in the UpSetR package.
##   Please report the issue to the authors.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0.
## ℹ Please use the `linewidth` argument instead.
## ℹ The deprecated feature was likely used in the UpSetR package.
##   Please report the issue to the authors.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Plot describing unique/shared genes in a differential expression table.

pp(file = "images/chronic_asym_volcano.png", image = hg38_tables[["plots"]][["Chronic_vs_Asymptomatic"]][["deseq_vol_plots"]])
## Error in `pp()`:
## ! The image does not appear to exist.
hg38_sig <- extract_significant_genes(hg38_tables, excel = "excel/hg38_sig.xlsx",
                                      according_to = "deseq")
## Deleting the file excel/hg38_sig.xlsx before writing the tables.
hg38_sig
## A set of genes deemed significant according to deseq.
## The parameters defining significant were:
## LFC cutoff: 1 adj P cutoff: 0.05
##         deseq_up deseq_down
## chr_asy       31         41
## chr_hea       59         43
## chr_con      680        458
## asy_hea      112         83
## asy_con      759        492
## hea_con      427        311

pp(file = "images/sig_barplot.png", image = hg38_sig[["sig_bar_plots"]][["deseq"]])

I would like to try a different volcano plot, modified so that the mean-value of expression is used to size the points; my hypothesis is that we will be able to observe that most (all?) of the absurdly high logFC values are in fact caused by genes with very low but non-zero expression values.

Simultaneously I would like to clean up some of the poor decisions I made when writing my volcano plotter. It has some logic in it to detect various input types which date back to times when I had no concept of how S4 methods worked.

test_volcano <- plot_volcano_condition_de(input = hg38_tables, table_name = "chr_asy",
                                          alpha = 0.5, size_by = "deseq_basemean", size_categories = 6)
## Set color_high to #1B9E77 and color_low to #D95F02.
## Error in `plot_volcano_condition_de()`:
## ! object 'arglist' not found

9 Repeat without the controls

no_controls <- subset_se(hg38_sampletype, subset = "condition!='control'")

no_controls_norm <- normalize(no_controls, transform = "log2", convert = "cpm",
                              norm = "quant", filter = TRUE)
## Removing 10032 low-count genes (11449 remaining).
## transform_counts: Found 6 values equal to 0, adding 1 to the matrix.
pp(file = "images/no_control_pca.png", image = plot_pca(no_controls_norm))

pp(file = "images/no_control_corheat.png", image = plot_corheat(no_controls_norm))

no_controls_nb <- normalize(no_controls, transform = "log2", convert = "cpm",
                            batch = "svaseq", filter = TRUE)
## Removing 10032 low-count genes (11449 remaining).
## transform_counts: Found 74 values less than 0.
## transform_counts: Found 74 values equal to 0, adding 1 to the matrix.
pp(file = "images/no_control_nb_pca.png", image = plot_pca(no_controls_nb))

no_control_keepers <- list(
  "chr_asy" = c("Chronic", "Asymptomatic"),
  "chr_hea" = c("Chronic", "Healthy"),
  "asy_hea" = c("Asymptomatic", "Healthy"))
no_control_de <- all_pairwise(no_controls, keepers = no_control_keepers,
                              model_fstring = "~ 0 + condition", model_svs = "svaseq",
                              filter = TRUE)
## Asymptomatic      Chronic      Healthy 
##            5            5            2
## Removing 10032 low-count genes (11449 remaining).
## Basic step 0/3: Normalizing data.
## Basic step 0/3: Converting data.
## I think this is failing? SummarizedExperiment
## Basic step 0/3: Transforming data.
## Setting 2623 entries to zero.
## This received a matrix of SVs.
## converting counts to integer mode
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## conditions
## Asymptomatic      Chronic      Healthy 
##            5            5            2
## conditions
## Asymptomatic      Chronic      Healthy 
##            5            5            2
## conditions
## Asymptomatic      Chronic      Healthy 
##            5            5            2

no_control_table <- combine_de_tables(no_control_de, excel = "excel/hg38_nocontrols_tables.xlsx")
## Deleting the file excel/hg38_nocontrols_tables.xlsx before writing the tables.
## Looking for subscript invalid names, end of extract_keepers.
pp(file = "images/chronic_asym_no_control_volcano.png", image = no_control_table[["plots"]][["Chronic_vs_Asymptomatic"]][["deseq_vol_plots"]])

no_control_sig <- extract_significant_genes(
  no_control_table, according_to = "deseq", excel = "excel/hg38_nocontrol_sig.xlsx")
## Deleting the file excel/hg38_nocontrol_sig.xlsx before writing the tables.
pp(file = "images/no_control_sig_barplot.png", image = no_control_sig[["sig_bar_plots"]][["deseq"]])

10 AUCC of control/nocontrol

control_no_control <- calculate_aucc(tbl = hg38_tables[["data"]][["chr_asy"]],
                                     tbl2 = no_control_table[["data"]][["Chronic_vs_Asymptomatic"]],
                                     py = "deseq_adjp", ly = "deseq_logfc")
pp(file = "images/control_no_control_aucc.png", image = control_no_control[["plot"]])

11 Repeat GSE(A) analyses

all_gp <- all_gprofiler(hg38_sig)
all_cp <- all_cprofiler(hg38_sig, hg38_tables)
## Error in simple_clusterprofiler(sig_genes = structure(list(ensembl_transcript_id = c("ENST00000492807",  : 
##   unused arguments (internal = FALSE, permutations = 1000)
## Error in simple_clusterprofiler(sig_genes = structure(list(ensembl_transcript_id = c("ENST00000256104",  : 
##   unused arguments (internal = FALSE, permutations = 1000)
## Error in `simple_cl[["kegg_universe"]]`:
## ! subscript out of bounds
## cp_test <- simple_clusterprofiler(ups, de_table = table, orgdb = pombe_orgdb,
##                                  orgdb_to = "GID", orgdb_from = "GID")

no_control_ca_up <- no_control_sig[["deseq"]][["ups"]][["Chronic_vs_Asymptomatic"]]
no_control_ca_up_gp <- simple_gprofiler(no_control_ca_up)
no_control_ca_up_gp
no_control_ca_down <- no_control_sig[["deseq"]][["downs"]][["Chronic_vs_Asymptomatic"]]
no_control_ca_down_gp <- simple_gprofiler(no_control_ca_down)
no_control_ca_down_gp

mf_up_plots <- plot_enrichresult(no_control_ca_up_gp[["MF_enrich"]])
## Warning in (function (model, data, ...) : Arguments in `...` must be used.
## ✖ Problematic argument:
## • by = "Count"
## ℹ Did you misspell an argument name?
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
pp(file = "images/mf_up_ca_map.png", image = mf_up_plots[["map"]])

pp(file = "images/mf_up_ca_tree.png", image = mf_up_plots[["tree"]])

mf_down_plots <- plot_enrichresult(no_control_ca_down_gp[["MF_enrich"]])
## Warning in (function (model, data, ...) : Arguments in `...` must be used.
## ✖ Problematic argument:
## • by = "Count"
## ℹ Did you misspell an argument name?
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
pp(file = "images/mf_down_ca_map.png", image = mf_down_plots[["map"]])

pp(file = "images/mf_down_ca_tree.png", image = mf_down_plots[["tree"]])

bp_up_plots <- plot_enrichresult(no_control_ca_up_gp[["BP_enrich"]])
## Warning in (function (model, data, ...) : Arguments in `...` must be used.
## ✖ Problematic argument:
## • by = "Count"
## ℹ Did you misspell an argument name?
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
pp(file = "images/bp_up_ca_map.png", image = bp_up_plots[["map"]])

pp(file = "images/bp_up_ca_tree.png", image = bp_up_plots[["tree"]])

bp_down_plots <- plot_enrichresult(no_control_ca_down_gp[["BP_enrich"]])
## Warning in (function (model, data, ...) : Arguments in `...` must be used.
## ✖ Problematic argument:
## • by = "Count"
## ℹ Did you misspell an argument name?
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
pp(file = "images/bp_down_ca_map.png", image = bp_down_plots[["map"]])

pp(file = "images/bp_down_ca_tree.png", image = bp_down_plots[["tree"]])

no_control_ca_up_cp <- simple_cprofiler(no_control_ca_up,
                                        no_control_table[["data"]][["Chronic_vs_Asymptomatic"]],
                                        orgdb_from = "ENSEMBL")
## There are 36 genes deemed significant out of 11366.
## using 'fgsea' for GSEA analysis, please cite Korotkevich et al (2019).
## preparing geneSet collections...
## GSEA analysis...
## Warning in preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam, : There are ties in the preranked stats (24.6% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## 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"...
## using 'fgsea' for GSEA analysis, please cite Korotkevich et al (2019).
## preparing geneSet collections...
## GSEA analysis...
## Warning in preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam, : There are ties in the preranked stats (24.79% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## leading edge analysis...
## done...
## Loading required package: org.Hs.eg.db
## Loading required package: AnnotationDbi
## Loading required package: stats4
## Loading required package: BiocGenerics
## Loading required package: generics
## 
## Attaching package: 'generics'
## The following object is masked from 'package:dplyr':
## 
##     explain
## The following objects are masked from 'package:base':
## 
##     as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
##     setequal, union
## 
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:hpgltools':
## 
##     annotation<-, conditions, conditions<-, IQR, mad, sd, var, xtabs
## The following object is masked from 'package:dplyr':
## 
##     combine
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
## 
##     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
##     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
##     get, grep, grepl, is.unsorted, lapply, Map, mapply, match, mget,
##     order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
##     rbind, Reduce, rownames, sapply, saveRDS, table, tapply, unique,
##     unsplit, which.max, which.min
## Loading required package: Biobase
## Welcome to Bioconductor
## 
##     Vignettes contain introductory material; view with
##     'browseVignettes()'. To cite Bioconductor, see
##     'citation("Biobase")', and for packages 'citation("pkgname")'.
## 
## Attaching package: 'Biobase'
## The following object is masked from 'package:hpgltools':
## 
##     notes
## Loading required package: IRanges
## Loading required package: S4Vectors
## 
## Attaching package: 'S4Vectors'
## The following object is masked from 'package:tidyr':
## 
##     expand
## The following objects are masked from 'package:dplyr':
## 
##     first, rename
## The following object is masked from 'package:utils':
## 
##     findMatches
## The following objects are masked from 'package:base':
## 
##     expand.grid, I, unname
## 
## Attaching package: 'IRanges'
## The following object is masked from 'package:hpgltools':
## 
##     trim
## The following object is masked from 'package:glue':
## 
##     trim
## The following objects are masked from 'package:dplyr':
## 
##     collapse, desc, slice
## 
## Attaching package: 'AnnotationDbi'
## The following object is masked from 'package:dplyr':
## 
##     select
## using 'fgsea' for GSEA analysis, please cite Korotkevich et al (2019).
## preparing geneSet collections...
## GSEA analysis...
## Warning in preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam, : There are ties in the preranked stats (24.6% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## leading edge analysis...
## done...
## using 'fgsea' for GSEA analysis, please cite Korotkevich et al (2019).
## preparing geneSet collections...
## GSEA analysis...
## Warning in preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam, : There are ties in the preranked stats (24.6% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## leading edge analysis...
## done...
## using 'fgsea' for GSEA analysis, please cite Korotkevich et al (2019).
## preparing geneSet collections...
## GSEA analysis...
## Warning in preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam, : There are ties in the preranked stats (24.6% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
## leading edge analysis...
## done...
cp_enrich_plots <- plot_enrichresult(no_control_ca_up_cp[["go_data"]][["BP_enrich"]])
## Warning in (function (model, data, ...) : Arguments in `...` must be used.
## ✖ Problematic argument:
## • by = "Count"
## ℹ Did you misspell an argument name?
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
cp_enrich_plots[["vol"]]

cp_gsea_plots <- plot_topn_gsea(no_control_ca_up_cp[["go_data"]][["GO_gse"]])
pp(file = "images/cytokine_increased_chronic_gsea.png", image = print(cp_enrich_gsea_plots[[3]]))
## Error:
## ! object 'cp_enrich_gsea_plots' not found
cp_enrich_plots <- plot_enrichresult(no_control_ca_up_cp[["msigdb_data"]][["msigdb_all"]])
## Warning in (function (model, data, ...) : Arguments in `...` must be used.
## ✖ Problematic argument:
## • by = "Count"
## ℹ Did you misspell an argument name?
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
## ! # Invaild edge matrix for <phylo>. A <tbl_df> is returned.
pp(file = "images/msigdb_c2_increased_chronic_cp.png", image = cp_enrich_plots[["dot"]])

cp_msigdb_gsea_plots <- plot_topn_gsea(no_control_ca_up_cp[["msigdb_data"]][["gse_msigdb_all"]])
pander::pander(sessionInfo())
message(paste0("This is hpgltools commit: ", get_git_commit()))
message(paste0("Saving to ", savefile))
tmp <- sm(saveme(filename = savefile))
tmp <- loadme(filename = savefile)
LS0tCnRpdGxlOiAiQWRkaW5nIFZhcmlvdXMgU2VyYSB0byBVOTM3IE1hY3JvcGhhZ2VzLiIKYXV0aG9yOiAiYXRiIGFiZWxld0BnbWFpbC5jb20iCmRhdGU6ICJgciBTeXMuRGF0ZSgpYCIKb3V0cHV0OgogIGh0bWxfZG9jdW1lbnQ6CiAgICBjb2RlX2Rvd25sb2FkOiB0cnVlCiAgICBjb2RlX2ZvbGRpbmc6IHNob3cKICAgIGZpZ19jYXB0aW9uOiB0cnVlCiAgICBmaWdfaGVpZ2h0OiA3CiAgICBmaWdfd2lkdGg6IDcKICAgIGhpZ2hsaWdodDogemVuYnVybgogICAga2VlcF9tZDogZmFsc2UKICAgIG1vZGU6IHNlbGZjb250YWluZWQKICAgIG51bWJlcl9zZWN0aW9uczogdHJ1ZQogICAgc2VsZl9jb250YWluZWQ6IHRydWUKICAgIHRoZW1lOiByZWFkYWJsZQogICAgdG9jOiB0cnVlCiAgICB0b2NfZmxvYXQ6CiAgICAgIGNvbGxhcHNlZDogZmFsc2UKICAgICAgc21vb3RoX3Njcm9sbDogZmFsc2UKLS0tCgpgYGB7ciwgaW5jbHVkZT1GQUxTRX0KbGlicmFyeShkcGx5cikKbGlicmFyeShmb3JjYXRzKQpsaWJyYXJ5KGdsdWUpCmxpYnJhcnkoaHBnbHRvb2xzKQpsaWJyYXJ5KHRpZHlyKQoKbG9hZGVkIDwtIGRldnRvb2xzOjpsb2FkX2FsbCgifi9ocGdsdG9vbHMiKQprbml0cjo6b3B0c19rbml0JHNldChwcm9ncmVzcyA9IFRSVUUsIHZlcmJvc2UgPSBUUlVFLCB3aWR0aCA9IDkwLCBlY2hvID0gVFJVRSkKa25pdHI6Om9wdHNfY2h1bmskc2V0KAogIGVycm9yID0gVFJVRSwgZmlnLndp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