1 Introduction

Having established that the TMRC2 macrophage data looks robust and illustrative of a couple of interesting questions, let us perform a couple of differential analyses of it.

Also note that as of 202212, we received a new set of samples which now include some which are of a completely different cell type, U937. As their ATCC page states, they are malignant cells taken from the pleural effusion of a 37 year old white male with histiocytic lymphoma and which exhibit the morphology of monocytes. Thus, this document now includes some comparisons of the cell types as well as the various macrophage donors (given that there are now more donors too).

1.1 Human data

I am moving the dataset manipulations here so that I can look at them all together before running the various DE analyses.

1.2 Create sets focused on drug, celltype, strain, and combinations

Let us start by playing with the metadata a little and create sets with the condition set to:

  • Drug treatment
  • Cell type (macrophage or U937)
  • Donor
  • Infection Strain
  • Some useful combinations thereof

In addition, keep mental track of which datasets are comprised of all samples vs. those which are only macrophage vs. those which are only U937. (Thus, the usage of all_human vs. hs_macr vs. u937 as prefixes for the data structures.)

Ideally, these recreations of the data should perhaps be in the datastructures worksheet.

all_human <- sanitize_expt_metadata(hs_macrophage, columns = "drug") %>%
  set_expt_conditions(fact = "drug") %>%
  set_expt_batches(fact = "typeofcells")
## 
## antimony     none 
##       34       34 
## 
## Macrophages        U937 
##          54          14
## The following 3 lines were copy/pasted to datastructures and should be removed soon.
no_strain_idx <- pData(all_human)[["strainid"]] == "none"
pData(all_human)[["strainid"]] <- paste0("s", pData(all_human)[["strainid"]],
                                         "_", pData(all_human)[["macrophagezymodeme"]])
pData(all_human)[no_strain_idx, "strainid"] <- "none"
table(pData(all_human)[["strainid"]])
## 
##            none ss10763_z22_z22 ss10772_z23_z23 ss10977_z22_z22 ss11026_z23_z23 
##              10               2               8               2               2 
## ss11075_z22_z22 ss11126_z22_z22 ss12251_z23_z23 ss12309_z22_z22 ss12355_z23_z23 
##               2               8               7               8               2 
## ss12367_z22_z22  ss2169_z23_z23  ss7158_z23_z23 
##               7               8               2
all_human_types <- set_expt_conditions(all_human, fact = "typeofcells") %>%
  set_expt_batches(fact = "drug")
## 
## Macrophages        U937 
##          54          14 
## 
## antimony     none 
##       34       34
type_zymo_fact <- paste0(pData(all_human_types)[["condition"]], "_",
                         pData(all_human_types)[["macrophagezymodeme"]])
type_zymo <- set_expt_conditions(all_human_types, fact = type_zymo_fact)
## 
## Macrophages_none  Macrophages_z22  Macrophages_z23        U937_none 
##                8               23               23                2 
##         U937_z22         U937_z23 
##                6                6
type_drug_fact <- paste0(pData(all_human_types)[["condition"]], "_",
                         pData(all_human_types)[["drug"]])
type_drug <- set_expt_conditions(all_human_types, fact=type_drug_fact)
## 
## Macrophages_antimony     Macrophages_none        U937_antimony 
##                   27                   27                    7 
##            U937_none 
##                    7
strain_fact <- pData(all_human_types)[["strainid"]]
table(strain_fact)
## strain_fact
##            none ss10763_z22_z22 ss10772_z23_z23 ss10977_z22_z22 ss11026_z23_z23 
##              10               2               8               2               2 
## ss11075_z22_z22 ss11126_z22_z22 ss12251_z23_z23 ss12309_z22_z22 ss12355_z23_z23 
##               2               8               7               8               2 
## ss12367_z22_z22  ss2169_z23_z23  ss7158_z23_z23 
##               7               8               2
new_conditions <- paste0(pData(hs_macrophage)[["macrophagetreatment"]], "_",
                         pData(hs_macrophage)[["macrophagezymodeme"]])
## Note the sanitize() call is redundant with the addition of sanitize() in the
## datastructures file, but I don't want to wait to rerun that.
hs_macr <- set_expt_conditions(hs_macrophage, fact = new_conditions) %>%
  sanitize_expt_metadata(column = "drug")
## 
##      inf_z22      inf_z23    infsb_z22    infsb_z23   uninf_none uninfsb_none 
##           14           15           15           14            5            5

1.2.1 Separate Macrophage samples

Once again, we should reconsider where the following block is placed, but these datastructures are likely to be used in many of the following analyses.

hs_macr_drug_expt <- set_expt_conditions(hs_macr, fact = "drug")
## 
## antimony     none 
##       34       34
hs_macr_strain_expt <- set_expt_conditions(hs_macr, fact = "macrophagezymodeme") %>%
  subset_expt(subset = "macrophagezymodeme != 'none'")
## 
## none  z22  z23 
##   10   29   29
## subset_expt(): There were 68, now there are 58 samples.
table(pData(hs_macr)[["strainid"]])
## 
##       none s10763_z22 s10772_z23 s10977_z22 s11026_z23 s11075_z22 s11126_z22 
##         10          2          8          2          2          2          8 
## s12251_z23 s12309_z22 s12355_z23 s12367_z22  s2169_z23  s7158_z23 
##          7          8          2          7          8          2

1.2.2 Refactor U937 samples

The U937 samples were separated in the datastructures file, but we want to use the combination of drug/zymodeme with them pretty much exclusively.

new_conditions <- paste0(pData(hs_u937)[["macrophagetreatment"]], "_",
                         pData(hs_u937)[["macrophagezymodeme"]])
u937_expt <- set_expt_conditions(hs_u937, fact=new_conditions)
## 
##      inf_z22      inf_z23    infsb_z22    infsb_z23   uninf_none uninfsb_none 
##            3            3            3            3            1            1

1.3 Contrasts used in this document

Given the various ways we have chopped up this dataset, there are a few general types of contrasts we will perform, which will then be combined into greater complexity:

  • drug treatment
  • strains used
  • cellltypes
  • donors

In the end, our actual goal is to consider the variable effects of drug+strain and see if we can discern patterns which lead to better or worse drug treatment outcome.

There is a set of contrasts in which we are primarily interested in this data, these follow. I created one ratio of ratios contrast which I think has the potential to ask our biggest question.

tmrc2_human_extra <- "z23drugnodrug_vs_z22drugnodrug = (infsbz23 - infz23) - (infsbz22 - infz22), z23z22drug_vs_z23z22nodrug = (infsbz23 - infsbz22) - (infz23 - infz22)"
tmrc2_human_keepers <- list(
    "z23nosb_vs_uninf" = c("infz23", "uninfnone"),
    "z22nosb_vs_uninf" = c("infz22", "uninfnone"),
    "z23nosb_vs_z22nosb" = c("infz23", "infz22"),
    "z23sb_vs_z22sb" = c("infsbz23", "infsbz22"),
    "z23sb_vs_z23nosb" = c("infsbz23", "infz23"),
    "z22sb_vs_z22nosb" = c("infsbz22", "infz22"),
    "z23sb_vs_sb" = c("infz23", "uninfsbnone"),
    "z22sb_vs_sb" = c("infz22", "uninfsbnone"),
    "z23sb_vs_uninf" = c("infsbz23", "uninfnone"),
    "z22sb_vs_uninf" = c("infsbz22", "uninfnone"),
    "sb_vs_uninf" = c("uninfsbnone", "uninfnone"),
    "extra_z2322" = c("z23drugnodrug", "z22drugnodrug"),
    "extra_drugnodrug" = c("z23z22drug", "z23z22nodrug"))
tmrc2_drug_keepers <- list(
    "drug" = c("antimony", "none"))
tmrc2_type_keepers <- list(
    "type" = c("U937", "Macrophages"))
tmrc2_strain_keepers <- list(
    "strain" = c("z23", "z22"))
type_zymo_extra <- "zymos_vs_types = (U937_z2.3 - U937_z2.2) - (Macrophages_z2.3 - Macrophages_z2.2)"
tmrc2_typezymo_keepers <- list(
    "u937_macr" = c("Macrophagesnone", "U937none"),
    "zymo_macr" = c("Macrophagesz23", "Macrophagesz22"),
    "zymo_u937" = c("U937z23", "U937z22"),
    "z23_types" = c("U937z23", "Macrophagesz23"),
    "z22_types" = c("U937z22", "Macrophagesz22"),
    "zymos_types" = c("zymos_vs_types"))
tmrc2_typedrug_keepers <- list(
    "type_nodrug" = c("U937none", "Macrophagesnone"),
    "type_drug" = c("U937antimony", "Macrophagesantimony"),
    "macr_drugs" = c("Macrophagesantimony", "Macrophagesnone"),
    "u937_drugs" = c("U937antimony", "U937none"))
u937_keepers <- list(
    "z23nosb_vs_uninf" = c("infz23", "uninfnone"),
    "z22nosb_vs_uninf" = c("infz22", "uninfnone"),
    "z23nosb_vs_z22nosb" = c("infz23", "infz22"),
    "z23sb_vs_z22sb" = c("infsbz23", "infsbz22"),
    "z23sb_vs_z23nosb" = c("infsbz23", "infz23"),
    "z22sb_vs_z22nosb" = c("infsbz22", "infz22"),
    "z23sb_vs_sb" = c("infz23", "uninfsbnone"),
    "z22sb_vs_sb" = c("infz22", "uninfsbnone"),
    "z23sb_vs_uninf" = c("infsbz23", "uninfnone"),
    "z22sb_vs_uninf" = c("infsbz22", "uninfnone"),
    "sb_vs_uninf" = c("uninfsbnone", "uninfnone"))

1.3.1 Primary queries

There is a series of initial questions which make some sense to me, but these do not necessarily match the set of questions which are most pressing. I am hoping to pull both of these sets of queries in one.

Before extracting these groups of queries, let us invoke the all_pairwise() function and get all of the likely contrasts along with one or more extras that might prove useful (the ‘extra’ argument).

1.3.2 Combined U937 and Macrophages: Compare drug effects

When we have the u937 cells in the same dataset as the macrophages, that provides an interesting opportunity to see if we can observe drug-dependant effects which are shared across both cell types.

drug_de <- all_pairwise(all_human, filter = TRUE, model_batch = "svaseq")
## This DE analysis will perform all pairwise comparisons among:
## 
## antimony     none 
##       34       34
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12283 remaining).
## Setting 3092 low elements to zero.
## transform_counts: Found 3092 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.
drug_table <- combine_de_tables(
    drug_de, keepers = tmrc2_drug_keepers,
    excel = glue::glue("analyses/macrophage_de/tmrc2_macrophage_drug_comparison-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/tmrc2_macrophage_drug_comparison-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## antimony, none, SV1, SV2, SV3, SV4, SV5
## Actually comparing none and antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of none_vs_antimony according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## antimony, none
## Actually comparing none and antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of none_vs_antimony according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## antimony, none
## Actually comparing none and antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of none_vs_antimony according to the columns: logFC and P.Value using the expressionset colors.

1.3.3 Combined U937 and Macrophages: compare cell types

There are a couple of ways one might want to directly compare the two cell types.

  • Given that the variance between the two celltypes is so huge, just compare all samples.
  • One might want to compare them with the interaction effects of drug/zymodeme.
type_de <- all_pairwise(all_human_types, filter = TRUE, model_batch = "svaseq")
## This DE analysis will perform all pairwise comparisons among:
## 
## Macrophages        U937 
##          54          14
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12283 remaining).
## Setting 8682 low elements to zero.
## transform_counts: Found 8682 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.
type_table <- combine_de_tables(
    type_de, keepers = tmrc2_type_keepers,
    excel = glue::glue("analyses/macrophage_de/tmrc2_macrophage_type_comparison-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/tmrc2_macrophage_type_comparison-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophages, U937, SV1, SV2, SV3, SV4, SV5, SV6, SV7
## Actually comparing U937 and Macrophages.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937_vs_Macrophages according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophages, U937
## Actually comparing U937 and Macrophages.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937_vs_Macrophages according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophages, U937
## Actually comparing U937 and Macrophages.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937_vs_Macrophages according to the columns: logFC and P.Value using the expressionset colors.

1.3.3.1 Combined factors of interest: celltype+zymodeme, celltype+drug

Given the above explicit comparison of all samples comprising the two cell types, now let us look at the drug treatment+zymodeme status with all samples, macrophages and U937.

type_zymo_de <- all_pairwise(type_zymo, filter = TRUE, model_batch = "svaseq")
## This DE analysis will perform all pairwise comparisons among:
## 
## Macrophages_none  Macrophages_z22  Macrophages_z23        U937_none 
##                8               23               23                2 
##         U937_z22         U937_z23 
##                6                6
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12283 remaining).
## Setting 9655 low elements to zero.
## transform_counts: Found 9655 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.

type_zymo_table <- combine_de_tables(
    type_zymo_de, keepers = tmrc2_typezymo_keepers,
    excel = glue::glue("analyses/macrophage_de/tmrc2_macrophage_type_zymo_comparison-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/tmrc2_macrophage_type_zymo_comparison-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23, SV1, SV2, SV3, SV4, SV5, SV6, SV7
## Actually comparing U937none and Macrophagesnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_Macrophagesnone according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing U937none and Macrophagesnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_Macrophagesnone according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing U937none and Macrophagesnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_Macrophagesnone according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23, SV1, SV2, SV3, SV4, SV5, SV6, SV7
## Actually comparing Macrophagesz23 and Macrophagesz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of Macrophagesz23_vs_Macrophagesz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing Macrophagesz23 and Macrophagesz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of Macrophagesz23_vs_Macrophagesz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing Macrophagesz23 and Macrophagesz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of Macrophagesz23_vs_Macrophagesz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23, SV1, SV2, SV3, SV4, SV5, SV6, SV7
## Actually comparing U937z23 and U937z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z23_vs_U937z22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing U937z23 and U937z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z23_vs_U937z22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing U937z23 and U937z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z23_vs_U937z22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23, SV1, SV2, SV3, SV4, SV5, SV6, SV7
## Actually comparing U937z23 and Macrophagesz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z23_vs_Macrophagesz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing U937z23 and Macrophagesz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z23_vs_Macrophagesz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing U937z23 and Macrophagesz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z23_vs_Macrophagesz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23, SV1, SV2, SV3, SV4, SV5, SV6, SV7
## Actually comparing U937z22 and Macrophagesz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z22_vs_Macrophagesz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing U937z22 and Macrophagesz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z22_vs_Macrophagesz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesnone, Macrophagesz22, Macrophagesz23, U937none, U937z22, U937z23
## Actually comparing U937z22 and Macrophagesz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937z22_vs_Macrophagesz22 according to the columns: logFC and P.Value using the expressionset colors.
## Warning in extract_keepers_lst(extracted, keepers, table_names,
## all_coefficients, : FOUND NEITHER zymos_vs_types NOR zymos_vs_types!
type_drug_de <- all_pairwise(type_drug, filter = TRUE, model_batch = "svaseq")
## This DE analysis will perform all pairwise comparisons among:
## 
## Macrophages_antimony     Macrophages_none        U937_antimony 
##                   27                   27                    7 
##            U937_none 
##                    7
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12283 remaining).
## Setting 9642 low elements to zero.
## transform_counts: Found 9642 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.

type_drug_table <- combine_de_tables(
    type_drug_de, keepers = tmrc2_typedrug_keepers,
    excel=glue::glue("analyses/macrophage_de/tmrc2_macrophage_type_drug_comparison-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/tmrc2_macrophage_type_drug_comparison-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing U937none and Macrophagesnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_Macrophagesnone according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none
## Actually comparing U937none and Macrophagesnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_Macrophagesnone according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none
## Actually comparing U937none and Macrophagesnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_Macrophagesnone according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing U937antimony and Macrophagesantimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937antimony_vs_Macrophagesantimony according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none
## Actually comparing U937antimony and Macrophagesantimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937antimony_vs_Macrophagesantimony according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none
## Actually comparing U937antimony and Macrophagesantimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937antimony_vs_Macrophagesantimony according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing Macrophagesnone and Macrophagesantimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of Macrophagesnone_vs_Macrophagesantimony according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none
## Actually comparing Macrophagesnone and Macrophagesantimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of Macrophagesnone_vs_Macrophagesantimony according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none
## Actually comparing Macrophagesnone and Macrophagesantimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of Macrophagesnone_vs_Macrophagesantimony according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing U937none and U937antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_U937antimony according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none
## Actually comparing U937none and U937antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_U937antimony according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## Macrophagesantimony, Macrophagesnone, U937antimony, U937none
## Actually comparing U937none and U937antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of U937none_vs_U937antimony according to the columns: logFC and P.Value using the expressionset colors.

2 Individual cell types

At this point, I think it is fair to say that the two cell types are sufficiently different that they do not really belong together in a single analysis.

2.1 drug or strain effects, single cell type

One of the queries Najib asked which I think I misinterpreted was to look at drug and/or strain effects. My interpretation is somewhere below and was not what he was looking for. Instead, he was looking to see all(macrophage) drug/nodrug and all(macrophage) z23/z22 and compare them to each other. It may be that this is still a wrong interpretation, if so the most likely comparison is either:

  • (z23drug/z22drug) / (z23nodrug/z22nodrug), or perhaps
  • (z23drug/z23nodrug) / (z22drug/z22nodrug),

I am not sure those confuse me, and at least one of them is below

2.1.1 Macrophages

In these blocks we will explicitly query only one factor at a time, drug and strain. The eventual goal is to look for effects of drug treatment and/or strain treatment which are shared?

2.1.1.1 Macrophage Drug only

Thus we will start with the pure drug query. In this block we will look only at the drug/nodrug effect.

hs_macr_drug_de <- all_pairwise(hs_macr_drug_expt, filter = TRUE, model_batch = "svaseq")
## This DE analysis will perform all pairwise comparisons among:
## 
## antimony     none 
##       34       34
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12283 remaining).
## Setting 3092 low elements to zero.
## transform_counts: Found 3092 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.
hs_macr_drug_table <- combine_de_tables(
    hs_macr_drug_de, keepers = tmrc2_drug_keepers,
    excel = glue::glue("analyses/macrophage_de/tmrc2_macrophage_onlydrug_table-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/tmrc2_macrophage_onlydrug_table-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## antimony, none, SV1, SV2, SV3, SV4, SV5
## Actually comparing none and antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of none_vs_antimony according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## antimony, none
## Actually comparing none and antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of none_vs_antimony according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## antimony, none
## Actually comparing none and antimony.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of none_vs_antimony according to the columns: logFC and P.Value using the expressionset colors.
hs_macr_drug_sig <- extract_significant_genes(
    hs_macr_drug_table)

2.1.1.2 Macrophage Strain only

In a similar fashion, let us look for effects which are observed when we consider only the strain used during infection.

hs_macr_strain_de <- all_pairwise(hs_macr_strain_expt, filter = TRUE, model_batch = "svaseq")
## This DE analysis will perform all pairwise comparisons among:
## 
## z22 z23 
##  29  29
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12249 remaining).
## Setting 2048 low elements to zero.
## transform_counts: Found 2048 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.
hs_macr_strain_table <- combine_de_tables(
    hs_macr_strain_de, keepers = tmrc2_strain_keepers,
    excel = glue::glue("analyses/macrophage_de/tmrc2_macrophage_onlystrain_table-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/tmrc2_macrophage_onlystrain_table-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## z22, z23, SV1, SV2, SV3, SV4
## Actually comparing z23 and z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of z23_vs_z22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## z22, z23
## Actually comparing z23 and z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of z23_vs_z22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## z22, z23
## Actually comparing z23 and z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of z23_vs_z22 according to the columns: logFC and P.Value using the expressionset colors.
hs_macr_strain_sig <- extract_significant_genes(
    hs_macr_strain_table)

2.1.1.3 Compare Drug and Strain Effects

Now let us consider the above two comparisons together. First, I will plot the logFC values of them against each other (drug on x-axis and strain on the y-axis). Then we can extract the significant genes in a few combined categories of interest. I assume these will focus exclusively on the categories which include the introduction of the drug.

drug_strain_comp_df <- merge(hs_macr_drug_table[["data"]][["drug"]],
                             hs_macr_strain_table[["data"]][["strain"]],
                             by = "row.names")
drug_strain_comp_plot <- plot_linear_scatter(drug_strain_comp_df[, c("deseq_logfc.x", "deseq_logfc.y")])
## Contrasts: antimony/none, z23/z22; x-axis: drug, y-axis: strain
## top left: higher no drug, z23; top right: higher drug z23
## bottom left: higher no drug, z22; bottom right: higher drug z22
drug_strain_comp_plot$scatter

As I noted in the comments above, some quadrants of the scatter plot are likely to be of greater interest to us than others (the right side). Because I get confused sometimes, the following block will explicitly name the categories of likely interest, then ask which genes are shared among them, and finally use UpSetR to extract the various gene intersection/union categories.

higher_drug <- hs_macr_drug_sig[["deseq"]][["downs"]][[1]]
higher_nodrug <- hs_macr_drug_sig[["deseq"]][["ups"]][[1]]
higher_z23 <- hs_macr_strain_sig[["deseq"]][["ups"]][[1]]
higher_z22 <- hs_macr_strain_sig[["deseq"]][["downs"]][[1]]
sum(rownames(higher_drug) %in% rownames(higher_z23))
## [1] 65
sum(rownames(higher_drug) %in% rownames(higher_z22))
## [1] 87
sum(rownames(higher_nodrug) %in% rownames(higher_z23))
## [1] 18
sum(rownames(higher_nodrug) %in% rownames(higher_z22))
## [1] 43
drug_z23_lst <- list("drug" = rownames(higher_drug),
                     "z23" = rownames(higher_z23))
higher_drug_z23 <- upset(UpSetR::fromList(drug_z23_lst), text.scale = 2)
higher_drug_z23

drug_z23_shared_genes <- overlap_groups(drug_z23_lst)

drug_z22_lst <- list("drug" = rownames(higher_drug),
                     "z22" = rownames(higher_z22))
higher_drug_z22 <- upset(UpSetR::fromList(drug_z22_lst), text.scale = 2)
higher_drug_z22

drug_z22_shared_genes <- overlap_groups(drug_z22_lst)
shared_genes_drug_z22 <- attr(drug_z22_shared_genes, "elements")[drug_z22_shared_genes[["drug:z22"]]]

2.1.1.4 Perform gProfiler on drug/strain effect shared genes

Now that we have some populations of genes which are shared across the drug/strain effects, let us pass them to some GSEA analyses and see what pops out.

shared_genes_drug_z23 <- attr(drug_z23_shared_genes, "elements")[drug_z23_shared_genes[["drug:z23"]]]
shared_drug_z23_gp <- simple_gprofiler(shared_genes_drug_z23)
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
shared_drug_z23_gp[["pvalue_plots"]][["MF"]]

shared_drug_z23_gp[["pvalue_plots"]][["BP"]]

shared_drug_z23_gp[["pvalue_plots"]][["REAC"]]

shared_drug_z22_gp <- simple_gprofiler(shared_genes_drug_z22)
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
shared_drug_z22_gp[["pvalue_plots"]][["BP"]]

2.2 Our main question of interest

The data structure hs_macr contains our primary macrophages, which are, as shown above, the data we can really sink our teeth into.

Note, we expect some errors when running the combine_de_tables() because not all methods I use are comfortable using the ratio or ratios contrasts we added in the ‘extras’ argument. As a result, when we combine them into the larger output tables, those peculiar contrasts fail. This does not stop it from writing the rest of the results, however.

hs_macr_de <- all_pairwise(
    hs_macr, model_batch = "svaseq",
    filter = TRUE,
    extra_contrasts = tmrc2_human_extra)
## This DE analysis will perform all pairwise comparisons among:
## 
##      inf_z22      inf_z23    infsb_z22    infsb_z23   uninf_none uninfsb_none 
##           14           15           15           14            5            5
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12283 remaining).
## Setting 3485 low elements to zero.
## transform_counts: Found 3485 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.
## Used reverse contrast for deseq.
## Used reverse contrast for edger.
## Used reverse contrast for deseq.
## Used reverse contrast for edger.
## Used reverse contrast for deseq.
## Used reverse contrast for basic.
## Used reverse contrast for deseq.
## Used reverse contrast for basic.

hs_macr_table <- combine_de_tables(
    hs_macr_de,
    keepers = tmrc2_human_keepers,
    excel = glue::glue("analyses/macrophage_de/hs_macr_drug_zymo_table-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/hs_macr_drug_zymo_table-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and P.Value using the expressionset colors.
## Warning in combine_single_de_table(li = limma, ed = edger, eb = ebseq, de =
## deseq, : The deseq table seems to be missing.
## Warning in combine_single_de_table(li = limma, ed = edger, eb = ebseq, de =
## deseq, : The basic table seems to be missing.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing z23drugnodrug and z22drugnodrug.
## Did not find z23drugnodrug or z22drugnodrug.
## Unable to find the table in the set of possible tables.
## The possible tables are: infsbz23_vs_infsbz22, infz22_vs_infsbz22, infz23_vs_infsbz22, uninfnone_vs_infsbz22, uninfsbnone_vs_infsbz22, infz22_vs_infsbz23, infz23_vs_infsbz23, uninfnone_vs_infsbz23, uninfsbnone_vs_infsbz23, infz23_vs_infz22, uninfnone_vs_infz22, uninfsbnone_vs_infz22, uninfnone_vs_infz23, uninfsbnone_vs_infz23, uninfsbnone_vs_uninfnone
## Error in get_plot_columns(pairwise, type, found_table = found_table, p_type = p_type) : 
## 
## Error in ma_vol_coef[["coef"]]: subscript out of bounds
hs_macr_sig <- extract_significant_genes(
    hs_macr_table,
    excel = glue::glue("analyses/macrophage_de/hs_macr_drug_zymo_sig-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/hs_macr_drug_zymo_sig-v202301.xlsx before writing the tables.
## Error in extract_significant_genes(hs_macr_table, excel = glue::glue("analyses/macrophage_de/hs_macr_drug_zymo_sig-v{ver}.xlsx")): object 'hs_macr_table' not found

2.2.1 Our main questions in U937

Let us do the same comparisons in the U937 samples, though I will not do the extra contrasts, primarily because I think the dataset is less likely to support them.

u937_de <- all_pairwise(u937_expt, model_batch = "svaseq", filter = TRUE)
## This DE analysis will perform all pairwise comparisons among:
## 
##      inf_z22      inf_z23    infsb_z22    infsb_z23   uninf_none uninfsb_none 
##            3            3            3            3            1            1
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (10751 remaining).
## Setting 5 low elements to zero.
## transform_counts: Found 5 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.

u937_table <- combine_de_tables(
    u937_de,
    keepers = u937_keepers,
    excel = glue::glue("analyses/macrophage_de/u937_drug_zymo_table-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/u937_drug_zymo_table-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and P.Value using the expressionset colors.
u937_sig <- extract_significant_genes(
    u937_table,
    excel = glue::glue("analyses/macrophage_de/u937_drug_zymo_sig-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/u937_drug_zymo_sig-v202301.xlsx before writing the tables.

2.2.1.1 Compare (no)Sb z2.3/z2.2 treatments among macrophages

upset_plots_hs_macr <- upsetr_sig(
    hs_macr_sig, both = TRUE,
    contrasts = c("z23sb_vs_z22sb", "z23nosb_vs_z22nosb"))
## Error in upsetr_sig(hs_macr_sig, both = TRUE, contrasts = c("z23sb_vs_z22sb", : object 'hs_macr_sig' not found
upset_plots_hs_macr[["both"]]
## Error in eval(expr, envir, enclos): object 'upset_plots_hs_macr' not found
groups <- upset_plots_hs_macr[["both_groups"]]
## Error in eval(expr, envir, enclos): object 'upset_plots_hs_macr' not found
shared_genes <- attr(groups, "elements")[groups[[2]]] %>%
  gsub(pattern = "^gene:", replacement = "")
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'gsub': object 'groups' not found
length(shared_genes)
## Error in eval(expr, envir, enclos): object 'shared_genes' not found
shared_gp <- simple_gprofiler(shared_genes)
## Error in "character" %in% class(sig_genes): object 'shared_genes' not found
shared_gp[["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'shared_gp' not found
shared_gp[["pvalue_plots"]][["BP"]]
## Error in eval(expr, envir, enclos): object 'shared_gp' not found
shared_gp[["pvalue_plots"]][["REAC"]]
## Error in eval(expr, envir, enclos): object 'shared_gp' not found
drug_genes <- attr(groups, "elements")[groups[["z23sb_vs_z22sb"]]] %>%
    gsub(pattern = "^gene:", replacement = "")
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'gsub': object 'groups' not found
drugonly_gp <- simple_gprofiler(drug_genes)
## Error in "character" %in% class(sig_genes): object 'drug_genes' not found
drugonly_gp[["pvalue_plots"]][["BP"]]
## Error in eval(expr, envir, enclos): object 'drugonly_gp' not found

I want to try something, directly include the u937 data in this…

both_sig <- hs_macr_sig
## Error in eval(expr, envir, enclos): object 'hs_macr_sig' not found
names(both_sig[["deseq"]][["ups"]]) <- paste0("macr_", names(both_sig[["deseq"]][["ups"]]))
## Error in paste0("macr_", names(both_sig[["deseq"]][["ups"]])): object 'both_sig' not found
names(both_sig[["deseq"]][["downs"]]) <- paste0("macr_", names(both_sig[["deseq"]][["downs"]]))
## Error in paste0("macr_", names(both_sig[["deseq"]][["downs"]])): object 'both_sig' not found
u937_deseq <- u937_sig[["deseq"]]
names(u937_deseq[["ups"]]) <- paste0("u937_", names(u937_deseq[["ups"]]))
names(u937_deseq[["downs"]]) <- paste0("u937_", names(u937_deseq[["downs"]]))
both_sig[["deseq"]][["ups"]] <- c(both_sig[["deseq"]][["ups"]], u937_deseq[["ups"]])
## Error in eval(expr, envir, enclos): object 'both_sig' not found
both_sig[["deseq"]][["downs"]] <- c(both_sig[["deseq"]][["ups"]], u937_deseq[["downs"]])
## Error in eval(expr, envir, enclos): object 'both_sig' not found
summary(both_sig[["deseq"]][["ups"]])
## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'both_sig' not found
upset_plots_both <- upsetr_sig(
    both_sig, both=TRUE,
    contrasts=c("macr_z23sb_vs_z22sb", "macr_z23nosb_vs_z22nosb",
                "u937_z23sb_vs_z22sb", "u937_z23nosb_vs_z22nosb"))
## Error in upsetr_sig(both_sig, both = TRUE, contrasts = c("macr_z23sb_vs_z22sb", : object 'both_sig' not found
upset_plots_both$both
## Error in eval(expr, envir, enclos): object 'upset_plots_both' not found

2.2.1.2 Compare DE results from macrophages and U937 samples

Looking a bit more closely at these, I think the u937 data is too sparse to effectively compare.

macr_u937_comparison <- compare_de_results(hs_macr_table, u937_table)
## Testing method: limma.
## Error: object 'hs_macr_table' not found
macr_u937_comparison$lfc_heat
## Error in eval(expr, envir, enclos): object 'macr_u937_comparison' not found
macr_u937_venns <- compare_significant_contrasts(hs_macr_sig, second_sig_tables = u937_sig,
                                                 contrasts = "z23sb_vs_z23nosb")
## Error in compare_significant_contrasts(hs_macr_sig, second_sig_tables = u937_sig, : object 'hs_macr_sig' not found
macr_u937_venns$up_plot
## Error in eval(expr, envir, enclos): object 'macr_u937_venns' not found
macr_u937_venns$down_plot
## Error in eval(expr, envir, enclos): object 'macr_u937_venns' not found
macr_u937_venns_v2 <- compare_significant_contrasts(hs_macr_sig, second_sig_tables = u937_sig,
                                                    contrasts = "z22sb_vs_z22nosb")
## Error in compare_significant_contrasts(hs_macr_sig, second_sig_tables = u937_sig, : object 'hs_macr_sig' not found
macr_u937_venns_v2$up_plot
## Error in eval(expr, envir, enclos): object 'macr_u937_venns_v2' not found
macr_u937_venns_v2$down_plot
## Error in eval(expr, envir, enclos): object 'macr_u937_venns_v2' not found
macr_u937_venns_v3 <- compare_significant_contrasts(hs_macr_sig, second_sig_tables = u937_sig,
                                                    contrasts = "sb_vs_uninf")
## Error in compare_significant_contrasts(hs_macr_sig, second_sig_tables = u937_sig, : object 'hs_macr_sig' not found
macr_u937_venns_v3$up_plot
## Error in eval(expr, envir, enclos): object 'macr_u937_venns_v3' not found
macr_u937_venns_v3$down_plot
## Error in eval(expr, envir, enclos): object 'macr_u937_venns_v3' not found

2.2.2 Compare macrophage/u937 with respect to z2.3/z2.2

comparison_df <- merge(hs_macr_table[["data"]][["z23sb_vs_z22sb"]],
                       u937_table[["data"]][["z23sb_vs_z22sb"]],
                       by = "row.names")
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'hs_macr_table' not found
macru937_z23z22_plot <- plot_linear_scatter(comparison_df[, c("deseq_logfc.x", "deseq_logfc.y")])
## Error in is.data.frame(x): object 'comparison_df' not found
macru937_z23z22_plot$scatter
## Error in eval(expr, envir, enclos): object 'macru937_z23z22_plot' not found
comparison_df <- merge(hs_macr_table[["data"]][["z23nosb_vs_z22nosb"]],
                       u937_table[["data"]][["z23nosb_vs_z22nosb"]],
                       by = "row.names")
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'merge': object 'hs_macr_table' not found
macru937_z23z22_plot <- plot_linear_scatter(comparison_df[, c("deseq_logfc.x", "deseq_logfc.y")])
## Error in is.data.frame(x): object 'comparison_df' not found
macru937_z23z22_plot$scatter
## Error in eval(expr, envir, enclos): object 'macru937_z23z22_plot' not found

2.2.2.1 Add donor to the contrasts, no sva

no_power_fact <- paste0(pData(hs_macr)[["donor"]], "_",
                        pData(hs_macr)[["condition"]])
table(pData(hs_macr)[["donor"]])
## 
##   d01   d02   d09   d81 du937 
##    13    14    13    14    14
table(no_power_fact)
## no_power_fact
##        d01_inf_z22        d01_inf_z23      d01_infsb_z22      d01_infsb_z23 
##                  2                  3                  3                  3 
##     d01_uninf_none   d01_uninfsb_none        d02_inf_z22        d02_inf_z23 
##                  1                  1                  3                  3 
##      d02_infsb_z22      d02_infsb_z23     d02_uninf_none   d02_uninfsb_none 
##                  3                  3                  1                  1 
##        d09_inf_z22        d09_inf_z23      d09_infsb_z22      d09_infsb_z23 
##                  3                  3                  3                  2 
##     d09_uninf_none   d09_uninfsb_none        d81_inf_z22        d81_inf_z23 
##                  1                  1                  3                  3 
##      d81_infsb_z22      d81_infsb_z23     d81_uninf_none   d81_uninfsb_none 
##                  3                  3                  1                  1 
##      du937_inf_z22      du937_inf_z23    du937_infsb_z22    du937_infsb_z23 
##                  3                  3                  3                  3 
##   du937_uninf_none du937_uninfsb_none 
##                  1                  1
hs_nopower <- set_expt_conditions(hs_macr, fact = no_power_fact)
## 
##        d01_inf_z22        d01_inf_z23      d01_infsb_z22      d01_infsb_z23 
##                  2                  3                  3                  3 
##     d01_uninf_none   d01_uninfsb_none        d02_inf_z22        d02_inf_z23 
##                  1                  1                  3                  3 
##      d02_infsb_z22      d02_infsb_z23     d02_uninf_none   d02_uninfsb_none 
##                  3                  3                  1                  1 
##        d09_inf_z22        d09_inf_z23      d09_infsb_z22      d09_infsb_z23 
##                  3                  3                  3                  2 
##     d09_uninf_none   d09_uninfsb_none        d81_inf_z22        d81_inf_z23 
##                  1                  1                  3                  3 
##      d81_infsb_z22      d81_infsb_z23     d81_uninf_none   d81_uninfsb_none 
##                  3                  3                  1                  1 
##      du937_inf_z22      du937_inf_z23    du937_infsb_z22    du937_infsb_z23 
##                  3                  3                  3                  3 
##   du937_uninf_none du937_uninfsb_none 
##                  1                  1
hs_nopower <- subset_expt(hs_nopower, subset="macrophagezymodeme!='none'")
## subset_expt(): There were 68, now there are 58 samples.
hs_nopower_nosva_de <- all_pairwise(hs_nopower, model_batch = FALSE, filter = TRUE)
## This DE analysis will perform all pairwise comparisons among:
## 
##     d01_inf_z22     d01_inf_z23   d01_infsb_z22   d01_infsb_z23     d02_inf_z22 
##               2               3               3               3               3 
##     d02_inf_z23   d02_infsb_z22   d02_infsb_z23     d09_inf_z22     d09_inf_z23 
##               3               3               3               3               3 
##   d09_infsb_z22   d09_infsb_z23     d81_inf_z22     d81_inf_z23   d81_infsb_z22 
##               3               2               3               3               3 
##   d81_infsb_z23   du937_inf_z22   du937_inf_z23 du937_infsb_z22 du937_infsb_z23 
##               3               3               3               3               3
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.

nopower_keepers <- list(
    "d01_zymo" = c("d01infz23", "d01infz22"),
    "d01_sbzymo" = c("d01infsbz23", "d01infsbz22"),
    "d02_zymo" = c("d02infz23", "d02infz22"),
    "d02_sbzymo" = c("d02infsbz23", "d02infsbz22"),
    "d09_zymo" = c("d09infz23", "d09infz22"),
    "d09_sbzymo" = c("d09infsbz23", "d09infsbz22"),
    "d81_zymo" = c("d81infz23", "d81infz22"),
    "d81_sbzymo" = c("d81infsbz23", "d81infsbz22"))
hs_nopower_nosva_table <- combine_de_tables(
    hs_nopower_nosva_de, keepers = nopower_keepers,
    excel = glue::glue("analyses/macrophage_de/hs_nopower_table-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/hs_nopower_table-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infz23 and d01infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infz23_vs_d01infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infz23 and d01infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infz23_vs_d01infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infz23 and d01infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infz23_vs_d01infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infsbz23 and d01infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infsbz23_vs_d01infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infsbz23 and d01infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infsbz23_vs_d01infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infsbz23 and d01infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infsbz23_vs_d01infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infz23 and d02infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infz23_vs_d02infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infz23 and d02infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infz23_vs_d02infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infz23 and d02infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infz23_vs_d02infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infsbz23 and d02infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infsbz23_vs_d02infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infsbz23 and d02infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infsbz23_vs_d02infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infsbz23 and d02infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infsbz23_vs_d02infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infz23 and d09infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infz23_vs_d09infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infz23 and d09infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infz23_vs_d09infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infz23 and d09infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infz23_vs_d09infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infsbz23 and d09infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infsbz23_vs_d09infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infsbz23 and d09infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infsbz23_vs_d09infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infsbz23 and d09infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infsbz23_vs_d09infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infz23 and d81infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infz23_vs_d81infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infz23 and d81infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infz23_vs_d81infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infz23 and d81infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infz23_vs_d81infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infsbz23 and d81infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infsbz23_vs_d81infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infsbz23 and d81infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infsbz23_vs_d81infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infsbz23 and d81infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infsbz23_vs_d81infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
##                                  extra_contrasts = extra)
hs_nopower_nosva_sig <- extract_significant_genes(
    hs_nopower_nosva_table,
    excel = glue::glue("analyses/macrophage_de/hs_nopower_nosva_sig-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/hs_nopower_nosva_sig-v202301.xlsx before writing the tables.
d01d02_zymo_nosva_comp <- merge(hs_nopower_nosva_table[["data"]][["d01_zymo"]],
                          hs_nopower_nosva_table[["data"]][["d02_zymo"]],
                          by="row.names")
d0102_zymo_nosva_plot <- plot_linear_scatter(d01d02_zymo_nosva_comp[, c("deseq_logfc.x", "deseq_logfc.y")])
d0102_zymo_nosva_plot$scatter

d0102_zymo_nosva_plot$correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df[[xcol]] and df[[ycol]]
## t = 164, df = 12247, p-value <2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.8240 0.8351
## sample estimates:
##    cor 
## 0.8296
d0102_zymo_nosva_plot$lm_rsq
## [1] 0.8278
d09d81_zymo_nosva_comp <- merge(hs_nopower_nosva_table[["data"]][["d09_zymo"]],
                          hs_nopower_nosva_table[["data"]][["d81_zymo"]],
                          by="row.names")
d0981_zymo_nosva_plot <- plot_linear_scatter(d09d81_zymo_nosva_comp[, c("deseq_logfc.x", "deseq_logfc.y")])
d0981_zymo_nosva_plot$scatter

d0981_zymo_nosva_plot$correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df[[xcol]] and df[[ycol]]
## t = 88, df = 12247, p-value <2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.6122 0.6339
## sample estimates:
##    cor 
## 0.6232
d0981_zymo_nosva_plot$lm_rsq
## [1] 0.4569
d01d81_zymo_nosva_comp <- merge(hs_nopower_nosva_table[["data"]][["d01_zymo"]],
                                hs_nopower_nosva_table[["data"]][["d81_zymo"]],
                                by="row.names")
d0181_zymo_nosva_plot <- plot_linear_scatter(d01d81_zymo_nosva_comp[, c("deseq_logfc.x", "deseq_logfc.y")])
d0181_zymo_nosva_plot$scatter

d0181_zymo_nosva_plot$correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df[[xcol]] and df[[ycol]]
## t = 73, df = 12247, p-value <2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.5363 0.5611
## sample estimates:
##    cor 
## 0.5488
d0181_zymo_nosva_plot$lm_rsq
## [1] 0.272
upset_plots_nosva <- upsetr_sig(hs_nopower_nosva_sig, both=TRUE,
                          contrasts=c("d01_zymo", "d02_zymo", "d09_zymo", "d81_zymo"))
upset_plots_nosva$up

upset_plots_nosva$down

upset_plots_nosva$both

## The 7th element in the both groups list is the set shared among all donors.
## I don't feel like writing out x:y:z:a
groups <- upset_plots_nosva[["both_groups"]]
shared_genes <- attr(groups, "elements")[groups[[7]]] %>%
  gsub(pattern = "^gene:", replacement = "")
shared_gp <- simple_gprofiler(shared_genes)
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
shared_gp$pvalue_plots$MF

shared_gp$pvalue_plots$BP

shared_gp$pvalue_plots$REAC

shared_gp$pvalue_plots$WP

2.2.2.2 Add donor to the contrasts, sva

hs_nopower_sva_de <- all_pairwise(hs_nopower, model_batch = "svaseq", filter = TRUE)
## This DE analysis will perform all pairwise comparisons among:
## 
##     d01_inf_z22     d01_inf_z23   d01_infsb_z22   d01_infsb_z23     d02_inf_z22 
##               2               3               3               3               3 
##     d02_inf_z23   d02_infsb_z22   d02_infsb_z23     d09_inf_z22     d09_inf_z23 
##               3               3               3               3               3 
##   d09_infsb_z22   d09_infsb_z23     d81_inf_z22     d81_inf_z23   d81_infsb_z22 
##               3               2               3               3               3 
##   d81_infsb_z23   du937_inf_z22   du937_inf_z23 du937_infsb_z22 du937_infsb_z23 
##               3               3               3               3               3
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12249 remaining).
## Setting 8711 low elements to zero.
## transform_counts: Found 8711 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.

nopower_keepers <- list(
    "d01_zymo" = c("d01infz23", "d01infz22"),
    "d01_sbzymo" = c("d01infsbz23", "d01infsbz22"),
    "d02_zymo" = c("d02infz23", "d02infz22"),
    "d02_sbzymo" = c("d02infsbz23", "d02infsbz22"),
    "d09_zymo" = c("d09infz23", "d09infz22"),
    "d09_sbzymo" = c("d09infsbz23", "d09infsbz22"),
    "d81_zymo" = c("d81infz23", "d81infz22"),
    "d81_sbzymo" = c("d81infsbz23", "d81infsbz22"))
hs_nopower_sva_table <- combine_de_tables(
    hs_nopower_sva_de, keepers = nopower_keepers,
    excel = glue::glue("analyses/macrophage_de/hs_nopower_table-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/hs_nopower_table-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23, SV1, SV2, SV3
## Actually comparing d01infz23 and d01infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infz23_vs_d01infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infz23 and d01infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infz23_vs_d01infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infz23 and d01infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infz23_vs_d01infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23, SV1, SV2, SV3
## Actually comparing d01infsbz23 and d01infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infsbz23_vs_d01infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infsbz23 and d01infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infsbz23_vs_d01infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d01infsbz23 and d01infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d01infsbz23_vs_d01infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23, SV1, SV2, SV3
## Actually comparing d02infz23 and d02infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infz23_vs_d02infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infz23 and d02infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infz23_vs_d02infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infz23 and d02infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infz23_vs_d02infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23, SV1, SV2, SV3
## Actually comparing d02infsbz23 and d02infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infsbz23_vs_d02infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infsbz23 and d02infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infsbz23_vs_d02infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d02infsbz23 and d02infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02infsbz23_vs_d02infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23, SV1, SV2, SV3
## Actually comparing d09infz23 and d09infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infz23_vs_d09infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infz23 and d09infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infz23_vs_d09infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infz23 and d09infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infz23_vs_d09infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23, SV1, SV2, SV3
## Actually comparing d09infsbz23 and d09infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infsbz23_vs_d09infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infsbz23 and d09infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infsbz23_vs_d09infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d09infsbz23 and d09infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09infsbz23_vs_d09infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23, SV1, SV2, SV3
## Actually comparing d81infz23 and d81infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infz23_vs_d81infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infz23 and d81infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infz23_vs_d81infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infz23 and d81infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infz23_vs_d81infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23, SV1, SV2, SV3
## Actually comparing d81infsbz23 and d81infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infsbz23_vs_d81infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infsbz23 and d81infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infsbz23_vs_d81infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01infsbz22, d01infsbz23, d01infz22, d01infz23, d02infsbz22, d02infsbz23, d02infz22, d02infz23, d09infsbz22, d09infsbz23, d09infz22, d09infz23, d81infsbz22, d81infsbz23, d81infz22, d81infz23, du937infsbz22, du937infsbz23, du937infz22, du937infz23
## Actually comparing d81infsbz23 and d81infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81infsbz23_vs_d81infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
##                                  extra_contrasts = extra)
hs_nopower_sva_sig <- extract_significant_genes(
    hs_nopower_sva_table,
    excel = glue::glue("analyses/macrophage_de/hs_nopower_sva_sig-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/hs_nopower_sva_sig-v202301.xlsx before writing the tables.
d01d02_zymo_sva_comp <- merge(hs_nopower_sva_table[["data"]][["d01_zymo"]],
                          hs_nopower_sva_table[["data"]][["d02_zymo"]],
                          by="row.names")
d0102_zymo_sva_plot <- plot_linear_scatter(d01d02_zymo_sva_comp[, c("deseq_logfc.x", "deseq_logfc.y")])
d0102_zymo_sva_plot$scatter

d0102_zymo_sva_plot$correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df[[xcol]] and df[[ycol]]
## t = 149, df = 12247, p-value <2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.7963 0.8089
## sample estimates:
##    cor 
## 0.8027
d0102_zymo_sva_plot$lm_rsq
## [1] 0.7858
d09d81_zymo_sva_comp <- merge(hs_nopower_sva_table[["data"]][["d09_zymo"]],
                          hs_nopower_sva_table[["data"]][["d81_zymo"]],
                          by="row.names")
d0981_zymo_sva_plot <- plot_linear_scatter(d09d81_zymo_sva_comp[, c("deseq_logfc.x", "deseq_logfc.y")])
d0981_zymo_sva_plot$scatter

d0981_zymo_sva_plot$correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df[[xcol]] and df[[ycol]]
## t = 87, df = 12247, p-value <2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.6091 0.6309
## sample estimates:
##    cor 
## 0.6202
d0981_zymo_sva_plot$lm_rsq
## [1] 0.4411
d01d81_zymo_sva_comp <- merge(hs_nopower_sva_table[["data"]][["d01_zymo"]],
                              hs_nopower_sva_table[["data"]][["d81_zymo"]],
                              by="row.names")
d0181_zymo_sva_plot <- plot_linear_scatter(d01d81_zymo_sva_comp[, c("deseq_logfc.x", "deseq_logfc.y")])
d0181_zymo_sva_plot$scatter

d0181_zymo_sva_plot$correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df[[xcol]] and df[[ycol]]
## t = 66, df = 12247, p-value <2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.5000 0.5261
## sample estimates:
##    cor 
## 0.5131
d0181_zymo_sva_plot$lm_rsq
## [1] 0.2779
upset_plots_sva <- upsetr_sig(hs_nopower_sva_sig, both=TRUE,
                          contrasts=c("d01_zymo", "d02_zymo", "d09_zymo", "d81_zymo"))
upset_plots_sva$up

upset_plots_sva$down

upset_plots_sva$both

## The 7th element in the both groups list is the set shared among all donors.
## I don't feel like writing out x:y:z:a
groups <- upset_plots_sva[["both_groups"]]
shared_genes <- attr(groups, "elements")[groups[[7]]] %>%
  gsub(pattern = "^gene:", replacement = "")
shared_gp <- simple_gprofiler(shared_genes)
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
## No results to show
## Please make sure that the organism is correct or set significant = FALSE
shared_gp$pvalue_plots$MF
## NULL
shared_gp$pvalue_plots$BP

shared_gp$pvalue_plots$REAC
## NULL
shared_gp$pvalue_plots$WP
## NULL

2.2.3 Donor comparison

hs_donors <- set_expt_conditions(hs_macr, fact = "donor")
## 
##   d01   d02   d09   d81 du937 
##    13    14    13    14    14
donor_de <- all_pairwise(hs_donors, model_batch="svaseq", filter=TRUE)
## This DE analysis will perform all pairwise comparisons among:
## 
##   d01   d02   d09   d81 du937 
##    13    14    13    14    14
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (12283 remaining).
## Setting 10588 low elements to zero.
## transform_counts: Found 10588 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.

donor_table <- combine_de_tables(
    donor_de,
    excel=glue::glue("analyses/macrophage_de/donor_tables-v{ver}.xlsx"))
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing d02 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02_vs_d01 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d02 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02_vs_d01 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d02 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d02_vs_d01 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing d09 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09_vs_d01 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d09 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09_vs_d01 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d09 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09_vs_d01 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing d81 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d01 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d81 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d01 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d81 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d01 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing du937 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d01 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing du937 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d01 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing du937 and d01.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d01 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing d09 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09_vs_d02 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d09 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09_vs_d02 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d09 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d09_vs_d02 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing d81 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d02 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d81 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d02 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d81 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d02 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing du937 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d02 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing du937 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d02 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing du937 and d02.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d02 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing d81 and d09.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d09 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d81 and d09.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d09 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing d81 and d09.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of d81_vs_d09 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing du937 and d09.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d09 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing du937 and d09.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d09 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing du937 and d09.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d09 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937, SV1, SV2, SV3, SV4, SV5, SV6
## Actually comparing du937 and d81.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d81 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing du937 and d81.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d81 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## d01, d02, d09, d81, du937
## Actually comparing du937 and d81.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of du937_vs_d81 according to the columns: logFC and P.Value using the expressionset colors.
donor_sig <- extract_significant_genes(
    donor_table,
    excel = glue::glue("analyses/macrophage_de/donor_sig-v{ver}.xlsx"))

2.2.3.1 Primary query contrasts

The final contrast in this list is interesting because it depends on the extra contrasts applied to the all_pairwise() above. In my way of thinking, the primary comparisons to consider are either cross-drug or cross-strain, but not both. However I think in at least a few instances Olga is interested in strain+drug / uninfected+nodrug.

2.2.3.2 Write contrast results

Now let us write out the xlsx file containing the above contrasts. The file with the suffix _table-version will therefore contain all genes and the file with the suffix _sig-version will contain only those deemed significant via our default criteria of DESeq2 |logFC| >= 1.0 and adjusted p-value <= 0.05.

hs_macr_table <- combine_de_tables(
    hs_macr_de,
    keepers = tmrc2_human_keepers,
    excel=glue::glue("analyses/macrophage_de/macrophage_human_table-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/macrophage_human_table-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and P.Value using the expressionset colors.
## Warning in combine_single_de_table(li = limma, ed = edger, eb = ebseq, de =
## deseq, : The deseq table seems to be missing.
## Warning in combine_single_de_table(li = limma, ed = edger, eb = ebseq, de =
## deseq, : The basic table seems to be missing.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2, SV3, SV4
## Actually comparing z23drugnodrug and z22drugnodrug.
## Did not find z23drugnodrug or z22drugnodrug.
## Unable to find the table in the set of possible tables.
## The possible tables are: infsbz23_vs_infsbz22, infz22_vs_infsbz22, infz23_vs_infsbz22, uninfnone_vs_infsbz22, uninfsbnone_vs_infsbz22, infz22_vs_infsbz23, infz23_vs_infsbz23, uninfnone_vs_infsbz23, uninfsbnone_vs_infsbz23, infz23_vs_infz22, uninfnone_vs_infz22, uninfsbnone_vs_infz22, uninfnone_vs_infz23, uninfsbnone_vs_infz23, uninfsbnone_vs_uninfnone
## Error in get_plot_columns(pairwise, type, found_table = found_table, p_type = p_type) : 
## 
## Error in ma_vol_coef[["coef"]]: subscript out of bounds
hs_macr_sig <- extract_significant_genes(
    hs_macr_table,
    excel=glue::glue("analyses/macrophage_de/macrophage_human_sig-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/macrophage_human_sig-v202301.xlsx before writing the tables.
## Error in extract_significant_genes(hs_macr_table, excel = glue::glue("analyses/macrophage_de/macrophage_human_sig-v{ver}.xlsx")): object 'hs_macr_table' not found
u937_table <- combine_de_tables(
    u937_de,
    keepers = tmrc2_human_keepers,
    excel=glue::glue("analyses/macrophage_de/u937_human_table-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/u937_human_table-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infsbz23 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infsbz23_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz23 and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz23_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing infz22 and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of infz22_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and infz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_infz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz23.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz23 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: TRUE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfnone and infsbz22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfnone_vs_infsbz22 according to the columns: logFC and P.Value using the expressionset colors.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone, SV1, SV2
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## infsbz22, infsbz23, infz22, infz23, uninfnone, uninfsbnone
## Actually comparing uninfsbnone and uninfnone.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of uninfsbnone_vs_uninfnone according to the columns: logFC and P.Value using the expressionset colors.
## Warning in extract_keepers_lst(extracted, keepers, table_names,
## all_coefficients, : FOUND NEITHER z23drugnodrug_vs_z22drugnodrug NOR
## z22drugnodrug_vs_z23drugnodrug!
u937_sig <- extract_significant_genes(
    u937_table,
    excel=glue::glue("analyses/macrophage_de/u937_human_sig-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/u937_human_sig-v202301.xlsx before writing the tables.

3 Over representation searches

I decided to make one initially small, but I think quickly big change to the organization of this document: I am moving the GSEA searches up to immediately after the DE. I will then move the plots of the gprofiler results to immediately after the various volcano plots so that it is easier to interpret them.

all_gp <- all_gprofiler(hs_macr_sig)
## Error in all_gprofiler(hs_macr_sig): object 'hs_macr_sig' not found

4 Plot contrasts of interest

One suggestion I received recently was to set the axes for these volcano plots to be static rather than let ggplot choose its own. I am assuming this is only relevant for pairs of contrasts, but that might not be true.

4.1 Individual zymodemes vs. uninfected

z23nosb_vs_uninf_volcano <- plot_volcano_de(
    table = hs_macr_table[["data"]][["z23nosb_vs_uninf"]],
    fc_col = "deseq_logfc", p_col = "deseq_adjp",
    shapes_by_state = FALSE, color_by = "fc",  label = 10, label_column = "hgncsymbol")
## Error in is.data.frame(x): object 'hs_macr_table' not found
plotly::ggplotly(z23nosb_vs_uninf_volcano$plot)
## Error in plotly::ggplotly(z23nosb_vs_uninf_volcano$plot): object 'z23nosb_vs_uninf_volcano' not found
z22nosb_vs_uninf_volcano <- plot_volcano_de(
    table = hs_macr_table[["data"]][["z22nosb_vs_uninf"]],
    fc_col = "deseq_logfc", p_col = "deseq_adjp",
    shapes_by_state = FALSE, color_by = "fc",  label = 10, label_column = "hgncsymbol")
## Error in is.data.frame(x): object 'hs_macr_table' not found
plotly::ggplotly(z22nosb_vs_uninf_volcano$plot)
## Error in plotly::ggplotly(z22nosb_vs_uninf_volcano$plot): object 'z22nosb_vs_uninf_volcano' not found

4.1.1 Zymodeme 2.3 without drug vs. uninfected

z23nosb_vs_uninf_volcano$plot +
  xlim(-10, 25) +
  ylim(0, 40)
## Error in eval(expr, envir, enclos): object 'z23nosb_vs_uninf_volcano' not found
pp(file="images/z23_uninf_reactome_up.png", image=all_gp[["z23nosb_vs_uninf_up"]][["pvalue_plots"]][["REAC"]], height=12, width=9)
## Error in pp(file = "images/z23_uninf_reactome_up.png", image = all_gp[["z23nosb_vs_uninf_up"]][["pvalue_plots"]][["REAC"]], : object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_uninf_up"]][["pvalue_plots"]][["KEGG"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## KEGG, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_uninf_up"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_uninf_up"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_uninf_up"]][["pvalue_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## WikiPathways, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_uninf_up"]][["interactive_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
all_gp[["z23nosb_vs_uninf_down"]][["pvalue_plots"]][["REAC"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z23nosb_vs_uninf_down"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z23nosb_vs_uninf_down"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, down.
z22nosb_vs_uninf_volcano$plot +
  xlim(-10, 25) +
  ylim(0, 40)
## Error in eval(expr, envir, enclos): object 'z22nosb_vs_uninf_volcano' not found
pp(file="images/z22_uninf_reactome_up.png", image=all_gp[["z22nosb_vs_uninf_up"]][["pvalue_plots"]][["REAC"]], height=12, width=9)
## Error in pp(file = "images/z22_uninf_reactome_up.png", image = all_gp[["z22nosb_vs_uninf_up"]][["pvalue_plots"]][["REAC"]], : object 'all_gp' not found
## Reactome, zymodeme2.2 without drug vs. uninfected without drug, up.
all_gp[["z22nosb_vs_uninf_up"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.2 without drug vs. uninfected without drug, up.
all_gp[["z22nosb_vs_uninf_up"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.2 without drug vs. uninfected without drug, up.
all_gp[["z22nosb_vs_uninf_up"]][["pvalue_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## WikiPathways, zymodeme2.2 without drug vs. uninfected without drug, up.

all_gp[["z22nosb_vs_uninf_down"]][["pvalue_plots"]][["REAC"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## Reactome, zymodeme2.2 without drug vs. uninfected without drug, down.
all_gp[["z22nosb_vs_uninf_down"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.2 without drug vs. uninfected without drug, down.
all_gp[["z22nosb_vs_uninf_down"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, down.

Check that my perception of the number of significant up/down genes matches what the table/venn says.

shared <- Vennerable::Venn(list("drug" = rownames(hs_macr_sig[["deseq"]][["ups"]][["z23sb_vs_uninf"]]),
                                "nodrug" = rownames(hs_macr_sig[["deseq"]][["ups"]][["z23nosb_vs_uninf"]])))
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'hs_macr_sig' not found
pp(file="images/z23_vs_uninf_venn_up.png")
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
dev.off()
## png 
##   2
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
## I see 910 z23sb/uninf and 670 no z23nosb/uninf genes in the venn diagram.
length(shared@IntersectionSets[["10"]]) + length(shared@IntersectionSets[["11"]])
## Error in eval(expr, envir, enclos): object 'shared' not found
dim(hs_macr_sig[["deseq"]][["ups"]][["z23sb_vs_uninf"]])
## Error in eval(expr, envir, enclos): object 'hs_macr_sig' not found
shared <- Vennerable::Venn(list("drug" = rownames(hs_macr_sig[["deseq"]][["ups"]][["z22sb_vs_uninf"]]),
                                "nodrug" = rownames(hs_macr_sig[["deseq"]][["ups"]][["z22nosb_vs_uninf"]])))
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'hs_macr_sig' not found
pp(file="images/z22_vs_uninf_venn_up.png")
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
dev.off()
## png 
##   2
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
length(shared@IntersectionSets[["10"]]) + length(shared@IntersectionSets[["11"]])
## Error in eval(expr, envir, enclos): object 'shared' not found
dim(hs_macr_sig[["deseq"]][["ups"]][["z22sb_vs_uninf"]])
## Error in eval(expr, envir, enclos): object 'hs_macr_sig' not found

Note to self: There is an error in my volcano plot code which takes effect when the numerator and denominator of the all_pairwise contrasts are different than those in combine_de_tables. It is putting the ups/downs on the correct sides of the plot, but calling the down genes ‘up’ and vice-versa. The reason for this is that I did a check for this happening, but used the wrong argument to handle it.

A likely bit of text for these volcano plots:

The set of genes differentially expressed between the zymodeme 2.3 and uninfected samples without druge treatment was quantified with DESeq2 and included surrogate estimates from SVA. Given the criteria of significance of a abs(logFC) >= 1.0 and false discovery rate adjusted p-value <= 0.05, 670 genes were observed as significantly increased between the infected and uninfected samples and 386 were observed as decreased. The most increased genes from the uninfected samples include some which are potentially indicative of a strong innate immune response and the inflammatory response.

In contrast, when the set of genes differentially expressed between the zymodeme 2.2 and uninfected samples was visualized, only 7 genes were observed as decreased and 435 increased. The inflammatory response was significantly less apparent in this set, but instead included genes related to transporter activity and oxidoreductases.

4.2 Direct zymodeme comparisons

An orthogonal comparison to that performed above is to directly compare the zymodeme 2.3 and 2.2 samples with and without antimonial treatment.

z23nosb_vs_z22nosb_volcano <- plot_volcano_de(
    table = hs_macr_table[["data"]][["z23nosb_vs_z22nosb"]],
    fc_col = "deseq_logfc", p_col = "deseq_adjp",
    shapes_by_state = FALSE, color_by = "fc",  label = 10, label_column = "hgncsymbol")
## Error in is.data.frame(x): object 'hs_macr_table' not found
plotly::ggplotly(z23nosb_vs_z22nosb_volcano$plot)
## Error in plotly::ggplotly(z23nosb_vs_z22nosb_volcano$plot): object 'z23nosb_vs_z22nosb_volcano' not found
z23sb_vs_z22sb_volcano <- plot_volcano_de(
    table = hs_macr_table[["data"]][["z23sb_vs_z22sb"]],
    fc_col = "deseq_logfc", p_col = "deseq_adjp",
    shapes_by_state = FALSE, color_by = "fc",  label = 10, label_column = "hgncsymbol")
## Error in is.data.frame(x): object 'hs_macr_table' not found
plotly::ggplotly(z23sb_vs_z22sb_volcano$plot)
## Error in plotly::ggplotly(z23sb_vs_z22sb_volcano$plot): object 'z23sb_vs_z22sb_volcano' not found
z23nosb_vs_z22nosb_volcano$plot +
  xlim(-10, 10) +
  ylim(0, 60)
## Error in eval(expr, envir, enclos): object 'z23nosb_vs_z22nosb_volcano' not found
pp(file="images/z23nosb_vs_z22nosb_reactome_up.png", image=all_gp[["z23nosb_vs_z22nosb_up"]][["pvalue_plots"]][["REAC"]], height=12, width=9)
## Error in pp(file = "images/z23nosb_vs_z22nosb_reactome_up.png", image = all_gp[["z23nosb_vs_z22nosb_up"]][["pvalue_plots"]][["REAC"]], : object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_z22nosb_up"]][["pvalue_plots"]][["KEGG"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## KEGG, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_z22nosb_up"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_z22nosb_up"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_z22nosb_up"]][["pvalue_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## WikiPathways, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23nosb_vs_z22nosb_up"]][["interactive_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
all_gp[["z23nosb_vs_z22nosb_down"]][["pvalue_plots"]][["REAC"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z23nosb_vs_z22nosb_down"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z23nosb_vs_z22nosb_down"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, down.
z23sb_vs_z22sb_volcano$plot +
  xlim(-10, 10) +
  ylim(0, 60)
## Error in eval(expr, envir, enclos): object 'z23sb_vs_z22sb_volcano' not found
pp(file="images/z23sb_vs_z22sb_reactome_up.png", image=all_gp[["z23sb_vs_z22sb_up"]][["pvalue_plots"]][["REAC"]], height=12, width=9)
## Error in pp(file = "images/z23sb_vs_z22sb_reactome_up.png", image = all_gp[["z23sb_vs_z22sb_up"]][["pvalue_plots"]][["REAC"]], : object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z22sb_up"]][["pvalue_plots"]][["KEGG"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## KEGG, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z22sb_up"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z22sb_up"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z22sb_up"]][["pvalue_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## WikiPathways, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z22sb_up"]][["interactive_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
all_gp[["z23sb_vs_z22sb_down"]][["pvalue_plots"]][["REAC"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z23sb_vs_z22sb_down"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z23sb_vs_z22sb_down"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, down.
shared <- Vennerable::Venn(list("drug" = rownames(hs_macr_sig[["deseq"]][["ups"]][["z23sb_vs_z22sb"]]),
                                "nodrug" = rownames(hs_macr_sig[["deseq"]][["ups"]][["z23nosb_vs_z22nosb"]])))
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'hs_macr_sig' not found
pp(file="images/drug_nodrug_venn_up.png")
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
dev.off()
## png 
##   2
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
shared <- Vennerable::Venn(list("drug" = rownames(hs_macr_sig[["deseq"]][["downs"]][["z23sb_vs_z22sb"]]),
                                "nodrug" = rownames(hs_macr_sig[["deseq"]][["downs"]][["z23nosb_vs_z22nosb"]])))
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'hs_macr_sig' not found
pp(file="images/drug_nodrug_venn_down.png")
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
dev.off()
## png 
##   2

A slightly different way of looking at the differences between the two zymodeme infections is to directly compare the infected samples with and without drug. Thus, when a volcano plot showing the comparison of the zymodeme 2.3 vs. 2.2 samples was plotted, 484 genes were observed as increased and 422 decreased; these groups include many of the same inflammatory (up) and membrane (down) genes.

Similar patterns were observed when the antimonial was included. Thus, when a Venn diagram of the two sets of increased genes was plotted, a significant number of the genes was observed as increased (313) and decreased (244) in both the untreated and antimonial treated samples.

4.3 Drug effects on each zymodeme infection

Another likely question is to directly compare the treated vs untreated samples for each zymodeme infection in order to visualize the effects of antimonial.

z23sb_vs_z23nosb_volcano <- plot_volcano_de(
    table = hs_macr_table[["data"]][["z23sb_vs_z23nosb"]],
    fc_col = "deseq_logfc", p_col = "deseq_adjp",
    shapes_by_state = FALSE, color_by = "fc",  label = 10, label_column = "hgncsymbol")
## Error in is.data.frame(x): object 'hs_macr_table' not found
plotly::ggplotly(z23sb_vs_z23nosb_volcano$plot)
## Error in plotly::ggplotly(z23sb_vs_z23nosb_volcano$plot): object 'z23sb_vs_z23nosb_volcano' not found
z22sb_vs_z22nosb_volcano <- plot_volcano_de(
    table = hs_macr_table[["data"]][["z22sb_vs_z22nosb"]],
    fc_col = "deseq_logfc", p_col = "deseq_adjp",
    shapes_by_state = FALSE, color_by = "fc",  label = 10, label_column = "hgncsymbol")
## Error in is.data.frame(x): object 'hs_macr_table' not found
plotly::ggplotly(z22sb_vs_z22nosb_volcano$plot)
## Error in plotly::ggplotly(z22sb_vs_z22nosb_volcano$plot): object 'z22sb_vs_z22nosb_volcano' not found
z23sb_vs_z23nosb_volcano$plot +
  xlim(-8, 8) +
  ylim(0, 210)
## Error in eval(expr, envir, enclos): object 'z23sb_vs_z23nosb_volcano' not found
pp(file="images/z23sb_vs_z23nosb_reactome_up.png",
   image=all_gp[["z23sb_vs_z23nosb_up"]][["pvalue_plots"]][["REAC"]], height=12, width=9)
## Error in pp(file = "images/z23sb_vs_z23nosb_reactome_up.png", image = all_gp[["z23sb_vs_z23nosb_up"]][["pvalue_plots"]][["REAC"]], : object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z23nosb_up"]][["pvalue_plots"]][["KEGG"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## KEGG, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z23nosb_up"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z23nosb_up"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z23nosb_up"]][["pvalue_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## WikiPathways, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z23sb_vs_z23nosb_up"]][["interactive_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
all_gp[["z23sb_vs_z23nosb_down"]][["pvalue_plots"]][["REAC"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z23sb_vs_z23nosb_down"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z23sb_vs_z23nosb_down"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, down.
z22sb_vs_z22nosb_volcano$plot +
  xlim(-8, 8) +
  ylim(0, 210)
## Error in eval(expr, envir, enclos): object 'z22sb_vs_z22nosb_volcano' not found
pp(file="images/z22sb_vs_z22nosb_reactome_up.png",
   image=all_gp[["z22sb_vs_z22nosb_up"]][["pvalue_plots"]][["REAC"]], height=12, width=9)
## Error in pp(file = "images/z22sb_vs_z22nosb_reactome_up.png", image = all_gp[["z22sb_vs_z22nosb_up"]][["pvalue_plots"]][["REAC"]], : object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z22sb_vs_z22nosb_up"]][["pvalue_plots"]][["KEGG"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## KEGG, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z22sb_vs_z22nosb_up"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z22sb_vs_z22nosb_up"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z22sb_vs_z22nosb_up"]][["pvalue_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## WikiPathways, zymodeme2.3 without drug vs. uninfected without drug, up.
all_gp[["z22sb_vs_z22nosb_up"]][["interactive_plots"]][["WP"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
all_gp[["z22sb_vs_z22nosb_down"]][["pvalue_plots"]][["REAC"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## Reactome, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z22sb_vs_z22nosb_down"]][["pvalue_plots"]][["MF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## MF, zymodeme2.3 without drug vs. uninfected without drug, down.
all_gp[["z22sb_vs_z22nosb_down"]][["pvalue_plots"]][["TF"]]
## Error in eval(expr, envir, enclos): object 'all_gp' not found
## TF, zymodeme2.3 without drug vs. uninfected without drug, down.
shared <- Vennerable::Venn(list("z23" = rownames(hs_macr_sig[["deseq"]][["ups"]][["z23sb_vs_z23nosb"]]),
                                "z22" = rownames(hs_macr_sig[["deseq"]][["ups"]][["z22sb_vs_z22nosb"]])))
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'hs_macr_sig' not found
pp(file="images/z23_z22_drug_venn_up.png")
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
dev.off()
## png 
##   2
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
shared <- Vennerable::Venn(list("z23" = rownames(hs_macr_sig[["deseq"]][["downs"]][["z23sb_vs_z23nosb"]]),
                                "z22" = rownames(hs_macr_sig[["deseq"]][["downs"]][["z22sb_vs_z22nosb"]])))
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'rownames': object 'hs_macr_sig' not found
pp(file="images/z23_z22_drug_venn_down.png")
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found
dev.off()
## png 
##   2
Vennerable::plot(shared)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'shared' not found

Note: I am settig the x and y-axis boundaries by allowing the plotter to pick its own axis the first time, writing down the ranges I observe, and then setting them to the largest of the pair. It is therefore possible that I missed one or more genes which lies outside that range.

The previous plotted contrasts sought to show changes between the two strains z2.3 and z2.2. Conversely, the previous volcano plots seek to directly compare each strain before/after drug treatment.

4.4 LRT of the Human Macrophage

tmrc2_lrt_strain_drug <- deseq_lrt(hs_macr, interactor_column = "drug",
                                   interest_column = "macrophagezymodeme", factors = c("drug", "macrophagezymodeme"))
## converting counts to integer mode
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 517 genes
## -- DESeq argument 'minReplicatesForReplace' = 7 
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
## rlog() may take a long time with 50 or more samples,
## vst() is a much faster transformation
## Working with 138 genes.
## Working with 138 genes after filtering: minc > 3
## Joining with `by = join_by(merge)`
## Joining with `by = join_by(merge)`

tmrc2_lrt_strain_drug$cluster_data$plot

4.5 Parasite

lp_macrophage_de <- all_pairwise(lp_macrophage,
                                 model_batch="svaseq", filter=TRUE)
## This DE analysis will perform all pairwise comparisons among:
## 
## z2.2 z2.3 
##   11    9
## This analysis will include surrogate estimates from: svaseq.
## This will pre-filter the input data using normalize_expt's: TRUE argument.
## Removing 0 low-count genes (8541 remaining).
## Setting 134 low elements to zero.
## transform_counts: Found 134 values equal to 0, adding 1 to the matrix.
## Finished running DE analyses, collecting outputs.
## Comparing analyses.
tmrc2_parasite_keepers <- list(
    "z23_vs_z22" = c("z23", "z22"))
lp_macrophage_table <- combine_de_tables(
  lp_macrophage_de, keepers = tmrc2_parasite_keepers,
  excel=glue::glue("analyses/macrophage_de/macrophage_parasite_infection_de-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/macrophage_parasite_infection_de-v202301.xlsx before writing the tables.
## Starting combine_extracted_plots() with do_inverse as: FALSE.
## This can do comparisons among the following columns in the pairwise result:
## z22, z23, SV1
## Actually comparing z23 and z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of z23_vs_z22 according to the columns: logFC and P.Value using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## z22, z23
## Actually comparing z23 and z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of z23_vs_z22 according to the columns: logFC and PValue using the expressionset colors.
## This can do comparisons among the following columns in the pairwise result:
## z22, z23
## Actually comparing z23 and z22.
## Getting the genes >= 1.5 stdevs away from the mean of all.
## Plotting volcano plot of the DE results of z23_vs_z22 according to the columns: logFC and P.Value using the expressionset colors.
lp_macrophage_sig <- extract_significant_genes(
    lp_macrophage_table,
    excel=glue::glue("analyses/macrophage_de/macrophage_parasite_sig-v{ver}.xlsx"))
## Deleting the file analyses/macrophage_de/macrophage_parasite_sig-v202301.xlsx before writing the tables.
pp(file="images/lp_macrophage_z23_z22.png",
   image=lp_macrophage_table[["plots"]][["z23nosb_vs_z22nosb"]][["deseq_vol_plots"]][["plot"]])

up_genes <- lp_macrophage_sig[["deseq"]][["ups"]][[1]]
dim(up_genes)
## [1] 47 58
down_genes <- lp_macrophage_sig[["deseq"]][["downs"]][[1]]
dim(down_genes)
## [1] 88 58
lp_z23sb_vs_z22sb_volcano <- plot_volcano_de(
    table = lp_macrophage_table[["data"]][["z23_vs_z22"]],
    fc_col = "deseq_logfc", p_col = "deseq_adjp",
    shapes_by_state = FALSE, color_by = "fc",  label = 10, label_column = "hgncsymbol")
plotly::ggplotly(lp_z23sb_vs_z22sb_volcano$plot)
## Warning in geom2trace.default(dots[[1L]][[2L]], dots[[2L]][[1L]], dots[[3L]][[1L]]): geom_GeomTextRepel() has yet to be implemented in plotly.
##   If you'd like to see this geom implemented,
##   Please open an issue with your example code at
##   https://github.com/ropensci/plotly/issues

## Warning in geom2trace.default(dots[[1L]][[2L]], dots[[2L]][[1L]], dots[[3L]][[1L]]): geom_GeomTextRepel() has yet to be implemented in plotly.
##   If you'd like to see this geom implemented,
##   Please open an issue with your example code at
##   https://github.com/ropensci/plotly/issues
lp_z23sb_vs_z22sb_volcano$plot
## Warning: ggrepel: 6 unlabeled data points (too many overlaps). Consider
## increasing max.overlaps

up_goseq <- simple_goseq(up_genes, go_db=lp_go, length_db=lp_lengths)
## Found 16 go_db genes and 47 length_db genes out of 47.
## Testing that go categories are defined.
## Removing undefined categories.
## Gathering synonyms.
## Gathering category definitions.
## The score column is null, defaulting to score.
## Possible columns are:
## [1] "category"                 "over_represented_pvalue" 
## [3] "under_represented_pvalue" "numDEInCat"              
## [5] "numInCat"                 "term"                    
## [7] "ontology"                 "qvalue"
## The score column is null, defaulting to score.
## Possible columns are:
## [1] "category"                 "over_represented_pvalue" 
## [3] "under_represented_pvalue" "numDEInCat"              
## [5] "numInCat"                 "term"                    
## [7] "ontology"                 "qvalue"
## The score column is null, defaulting to score.
## Possible columns are:
## [1] "category"                 "over_represented_pvalue" 
## [3] "under_represented_pvalue" "numDEInCat"              
## [5] "numInCat"                 "term"                    
## [7] "ontology"                 "qvalue"
## View categories over represented in the 2.3 samples
up_goseq$pvalue_plots$bpp_plot_over

down_goseq <- simple_goseq(down_genes, go_db=lp_go, length_db=lp_lengths)
## Found 28 go_db genes and 88 length_db genes out of 88.
## Testing that go categories are defined.
## Removing undefined categories.
## Gathering synonyms.
## Gathering category definitions.
## The score column is null, defaulting to score.
## Possible columns are:
## [1] "category"                 "over_represented_pvalue" 
## [3] "under_represented_pvalue" "numDEInCat"              
## [5] "numInCat"                 "term"                    
## [7] "ontology"                 "qvalue"
## The score column is null, defaulting to score.
## Possible columns are:
## [1] "category"                 "over_represented_pvalue" 
## [3] "under_represented_pvalue" "numDEInCat"              
## [5] "numInCat"                 "term"                    
## [7] "ontology"                 "qvalue"
## The score column is null, defaulting to score.
## Possible columns are:
## [1] "category"                 "over_represented_pvalue" 
## [3] "under_represented_pvalue" "numDEInCat"              
## [5] "numInCat"                 "term"                    
## [7] "ontology"                 "qvalue"
## View categories over represented in the 2.2 samples
down_goseq$pvalue_plots$bpp_plot_over

5 GSVA

hs_infected <- subset_expt(hs_macrophage, subset="macrophagetreatment!='uninf'") %>%
  subset_expt(subset="macrophagetreatment!='uninf_sb'")
## subset_expt(): There were 68, now there are 63 samples.
## subset_expt(): There were 63, now there are 63 samples.
hs_gsva_c2 <- simple_gsva(hs_infected)
## Converting the rownames() of the expressionset to ENTREZID.
## 1630 ENSEMBL ID's didn't have a matching ENTEREZ ID. Dropping them now.
## Before conversion, the expressionset has 21481 entries.
## After conversion, the expressionset has 20006 entries.
hs_gsva_c2_meta <- get_msigdb_metadata(hs_gsva_c2, msig_xml="reference/msigdb_v7.2.xml")
## The downloaded msigdb contained 2725 rownames shared with the gsva result out of 2989.
hs_gsva_c2_sig <- get_sig_gsva_categories(hs_gsva_c2_meta, excel = "analyses/macrophage_de/hs_macrophage_gsva_c2_sig.xlsx")
##                  Length Class         Mode     
## title             1     -none-        character
## notes             1     -none-        character
## initial_metadata 70     data.frame    list     
## expressionset     1     ExpressionSet S4       
## design           70     data.frame    list     
## conditions       63     -none-        character
## batches          63     -none-        character
## samplenames      63     -none-        character
## colors           63     -none-        character
## state             5     -none-        list     
## libsize          63     -none-        numeric
## Starting limma pairwise comparison.
## libsize was not specified, this parameter has profound effects on limma's result.
## Using the libsize from expt$libsize.
## Limma step 1/6: choosing model.
## Choosing the non-intercept containing model.
## Assuming this data is similar to a micro array and not performign voom.
## Limma step 3/6: running lmFit with method: ls.
## Limma step 4/6: making and fitting contrasts with no intercept. (~ 0 + factors)
## Limma step 5/6: Running eBayes with robust = FALSE and trend = FALSE.
## Limma step 6/6: Writing limma outputs.
## Limma step 6/6: 1/3: Creating table: infsb_vs_inf.  Adjust = BH
## Limma step 6/6: 2/3: Creating table: uninfsb_vs_inf.  Adjust = BH
## Limma step 6/6: 3/3: Creating table: uninfsb_vs_infsb.  Adjust = BH
## Limma step 6/6: 1/3: Creating table: inf.  Adjust = BH
## Limma step 6/6: 2/3: Creating table: infsb.  Adjust = BH
## Limma step 6/6: 3/3: Creating table: uninfsb.  Adjust = BH
##                  Length Class         Mode     
## title             1     -none-        character
## notes             1     -none-        character
## initial_metadata 70     data.frame    list     
## expressionset     1     ExpressionSet S4       
## design           70     data.frame    list     
## conditions       63     -none-        character
## batches          63     -none-        character
## samplenames      63     -none-        character
## colors           63     -none-        character
## state             5     -none-        list     
## libsize          63     -none-        numeric
## The factor inf has 29 rows.
## The factor inf_sb has 29 rows.
## The factor uninf_sb has 5 rows.
## Testing each factor against the others.
## Scoring inf against everything else.
## Scoring inf_sb against everything else.
## Scoring uninf_sb against everything else.
## Deleting the file analyses/macrophage_de/hs_macrophage_gsva_c2_sig.xlsx before writing the tables.
hs_gsva_c2_sig$raw_plot

hs_gsva_c7 <- simple_gsva(hs_infected, signature_category = "c7")
## Converting the rownames() of the expressionset to ENTREZID.
## 1630 ENSEMBL ID's didn't have a matching ENTEREZ ID. Dropping them now.
## Before conversion, the expressionset has 21481 entries.
## After conversion, the expressionset has 20006 entries.
hs_gsva_c7_meta <- get_msigdb_metadata(hs_gsva_c7, msig_xml="reference/msigdb_v7.2.xml")
## The downloaded msigdb contained 2725 rownames shared with the gsva result out of 2989.
hs_gsva_c7_sig <- get_sig_gsva_categories(hs_gsva_c7, excel = "analyses/macrophage_de/hs_macrophage_gsva_c7_sig.xlsx")
##                  Length Class         Mode     
## title             1     -none-        character
## notes             1     -none-        character
## initial_metadata 70     data.frame    list     
## expressionset     1     ExpressionSet S4       
## design           70     data.frame    list     
## conditions       63     -none-        character
## batches          63     -none-        character
## samplenames      63     -none-        character
## colors           63     -none-        character
## state             5     -none-        list     
## libsize          63     -none-        numeric
## Starting limma pairwise comparison.
## libsize was not specified, this parameter has profound effects on limma's result.
## Using the libsize from expt$libsize.
## Limma step 1/6: choosing model.
## Choosing the non-intercept containing model.
## Assuming this data is similar to a micro array and not performign voom.
## Limma step 3/6: running lmFit with method: ls.
## Limma step 4/6: making and fitting contrasts with no intercept. (~ 0 + factors)
## Limma step 5/6: Running eBayes with robust = FALSE and trend = FALSE.
## Limma step 6/6: Writing limma outputs.
## Limma step 6/6: 1/3: Creating table: infsb_vs_inf.  Adjust = BH
## Limma step 6/6: 2/3: Creating table: uninfsb_vs_inf.  Adjust = BH
## Limma step 6/6: 3/3: Creating table: uninfsb_vs_infsb.  Adjust = BH
## Limma step 6/6: 1/3: Creating table: inf.  Adjust = BH
## Limma step 6/6: 2/3: Creating table: infsb.  Adjust = BH
## Limma step 6/6: 3/3: Creating table: uninfsb.  Adjust = BH
##                  Length Class         Mode     
## title             1     -none-        character
## notes             1     -none-        character
## initial_metadata 70     data.frame    list     
## expressionset     1     ExpressionSet S4       
## design           70     data.frame    list     
## conditions       63     -none-        character
## batches          63     -none-        character
## samplenames      63     -none-        character
## colors           63     -none-        character
## state             5     -none-        list     
## libsize          63     -none-        numeric
## The factor inf has 29 rows.
## The factor inf_sb has 29 rows.
## The factor uninf_sb has 5 rows.
## Testing each factor against the others.
## Scoring inf against everything else.
## Scoring inf_sb against everything else.
## Scoring uninf_sb against everything else.
## Deleting the file analyses/macrophage_de/hs_macrophage_gsva_c7_sig.xlsx before writing the tables.
hs_gsva_c7_sig$raw_plot

6 Try out a new tool

Two reasons: Najib loves him some PCA, this uses wikipathways, which is something I think is neat.

Ok, I spent some time looking through the code and I have some problems with some of the design decisions.

Most importantly, it requires a data.frame() which has the following format:

  1. No rownames, instead column #1 is the sample ID.
  2. Columns 2-m are the categorical/survival/etc metrics.
  3. Columns m-n are 1 gene-per-column with log2 values.

But when I think about it I think I get the idea, they want to be able to do modelling stuff more easily with response factors.

library(pathwayPCA)
library(rWikiPathways)

downloaded <- downloadPathwayArchive(organism = "Homo sapiens", format = "gmt")
data_path <- system.file("extdata", package="pathwayPCA")
wikipathways <- read_gmt(paste0(data_path, "/wikipathways_human_symbol.gmt"), description=TRUE)

expt <- subset_expt(hs_macrophage, subset="macrophagetreatment!='uninf'") %>%
  subset_expt(subset="macrophagetreatment!='uninf_sb'")
expt <- set_expt_conditions(expt, fact="macrophagezymodeme")

symbol_vector <- fData(expt)[[symbol_column]]
names(symbol_vector) <- rownames(fData(expt))
symbol_df <- as.data.frame(symbol_vector)

assay_df <- merge(symbol_df, as.data.frame(exprs(expt)), by = "row.names")
assay_df[["Row.names"]] <- NULL
rownames(assay_df) <- make.names(assay_df[["symbol_vector"]], unique = TRUE)
assay_df[["symbol_vector"]] <- NULL
assay_df <- as.data.frame(t(assay_df))
assay_df[["SampleID"]] <- rownames(assay_df)
assay_df <- dplyr::select(assay_df, "SampleID", everything())

factor_df <- as.data.frame(pData(expt))
factor_df[["SampleID"]] <- rownames(factor_df)
factor_df <- dplyr::select(factor_df, "SampleID", everything())
factor_df <- factor_df[, c("SampleID", factors)]

tt <- CreateOmics(
    assayData_df = assay_df,
    pathwayCollection_ls = wikipathways,
    response = factor_df,
    respType = "categorical",
    minPathSize=5)

super <- AESPCA_pVals(
    object = tt,
    numPCs = 2,
    parallel = FALSE,
    numCores = 8,
    numReps = 2,
    adjustment = "BH")
## Stopping this because it takes forever
##if (!isTRUE(get0("skip_load"))) {
##  pander::pander(sessionInfo())
##  message("This is hpgltools commit: ", get_git_commit())
##  message("Saving to ", savefile)
##  tmp <- sm(saveme(filename = savefile))
##}
tmp <- loadme(filename = savefile)
LS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mZmVjdGl2ZWx5IGNvbXBhcmUuCgpgYGB7ciBjb21wYXJlX2RlX3U5MzdfbWFjcm99Cm1hY3JfdTkzN19jb21wYXJpc29uIDwtIGNvbXBhcmVfZGVfcmVzdWx0cyhoc19tYWNyX3RhYmxlLCB1OTM3X3RhYmxlKQptYWNyX3U5MzdfY29tcGFyaXNvbiRsZmNfaGVhdAoKbWFjcl91OTM3X3Zlbm5zIDwtIGNvbXBhcmVfc2lnbmlmaWNhbnRfY29udHJhc3RzKGhzX21hY3Jfc2lnLCBzZWNvbmRfc2lnX3RhYmxlcyA9IHU5Mzdfc2lnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJhc3RzID0gInoyM3NiX3ZzX3oyM25vc2IiKQptYWNyX3U5MzdfdmVubnMkdXBfcGxvdAptYWNyX3U5MzdfdmVubnMkZG93bl9wbG90CgptYWNyX3U5MzdfdmVubnNfdjIgPC0gY29tcGFyZV9zaWduaWZpY2FudF9jb250cmFzdHMoaHNfbWFjcl9zaWcsIHNlY29uZF9zaWdfdGFibGVzID0gdTkzN19zaWcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cmFzdHMgPSAiejIyc2JfdnNfejIybm9zYiIpCm1hY3JfdTkzN192ZW5uc192MiR1cF9wbG90Cm1hY3JfdTkzN192ZW5uc192MiRkb3duX3Bsb3QKCm1hY3JfdTkzN192ZW5uc192MyA8LSBjb21wYXJlX3NpZ25pZmljYW50X2NvbnRyYXN0cyhoc19tYWNyX3NpZywgc2Vjb25kX3NpZ190YWJsZXMgPSB1OTM3X3NpZywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyYXN0cyA9ICJzYl92c191bmluZiIpCm1hY3JfdTkzN192ZW5uc192MyR1cF9wbG90Cm1hY3JfdTkzN192ZW5uc192MyRkb3duX3Bsb3QKYGBgCgojIyMgQ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