index.html macrophage_estimation.html
In ‘macrophage_estimation’, we did a series of analyses to try to pick out some of the surrogate variables in the data. Now we will perform a set of differential expression analyses using the results from that. Since the ‘batch’ element of the data is reasonably well explained, we will not abuse the data with sva/combat, but instead include batch in the experimental model.
It appears that it is possible though somewhat difficult to apply batch estimations generated by sva to the model given to DESeq/EdgeR/limma. In the case of limma it is fairly simple, but in the other two it is a bit more difficult. There is a nice discussion of this at: https://www.biostars.org/p/156186/ I am attempting to apply that logic to this data with limited success.
my_contrasts <- list(
"macro_chr-sh" = c("macro_ch","macro_sh"),
"macro_chr-nil" = c("macro_ch","macro_nil"),
"macro_sh-nil" = c("macro_sh", "macro_nil"))
macro_norm <- sm(normalize_expt(macrophage_parasite, filter=TRUE, convert="cpm", norm="quant"))
## Error in normalize_expt(macrophage_parasite, filter = TRUE, convert = "cpm", : object 'macrophage_parasite' not found
macro_combat_norm <- sm(normalize_expt(macrophage_parasite, filter=TRUE, norm="quant", batch="combat_scale"))
## Error in normalize_expt(macrophage_parasite, filter = TRUE, norm = "quant", : object 'macrophage_parasite' not found
macro_lowfilt <- sm(normalize_expt(macrophage_parasite, filter=TRUE))
## Error in normalize_expt(macrophage_parasite, filter = TRUE): object 'macrophage_parasite' not found
## Set up the data used in the 3 comparative contrast sets.
macro_nobatch <- sm(all_pairwise(macro_lowfilt, model_batch=FALSE))
## Error in exists(sym, env, mode = "function", inherits = FALSE): object 'macro_lowfilt' not found
## wow, all tools including basic agree almost completely
medians_by_condition <- macro_nobatch$basic$medians
## Error in eval(expr, envir, enclos): object 'macro_nobatch' not found
macro_nobatch_tables <- sm(combine_de_tables(macro_nobatch,
excel=paste0("excel/macrophage_nobatch-v", ver, ".xlsx"),
keepers=my_contrasts,
extra_annot=medians_by_condition))
## Error in combine_de_tables(macro_nobatch, excel = paste0("excel/macrophage_nobatch-v", : object 'macro_nobatch' not found
macro_nobatch_sig <- sm(extract_significant_genes(macro_nobatch_tables,
excel=paste0("excel/macrophage_nobatch_significant-v", ver, ".xlsx"),
p_type="unadjusted",
according_to="all"))
## Error in extract_significant_genes(macro_nobatch_tables, excel = paste0("excel/macrophage_nobatch_significant-v", : object 'macro_nobatch_tables' not found
In this attempt, we add a batch factor in the experimental model and see how it does.
## Here just let all_pairwise run on filtered data and do its normal ~ 0 + condition + batch analyses
macro_batch <- sm(all_pairwise(macro_lowfilt))
## Error in exists(sym, env, mode = "function", inherits = FALSE): object 'macro_lowfilt' not found
medians_by_condition <- macro_batch$basic$medians
## Error in eval(expr, envir, enclos): object 'macro_batch' not found
macro_batch_tables <- sm(combine_de_tables(macro_batch, excel=paste0("excel/macrophage_batchmodel-v", ver, ".xlsx"),
keepers=my_contrasts,
extra_annot=medians_by_condition))
## Error in combine_de_tables(macro_batch, excel = paste0("excel/macrophage_batchmodel-v", : object 'macro_batch' not found
macro_batch_sig <- sm(extract_significant_genes(macro_batch_tables,
excel=paste0("excel/macrophage_batchmodel_significant-v", ver, ".xlsx"),
p_type="unadjusted",
according_to="all"))
## Error in extract_significant_genes(macro_batch_tables, excel = paste0("excel/macrophage_batchmodel_significant-v", : object 'macro_batch_tables' not found
## Here just let all_pairwise run on filtered data and do its normal ~ 0 + condition + batch analyses
macro_sva <- sm(all_pairwise(macro_lowfilt, model_batch="sva"))
## Error in get_model_adjust(input, estimate_type = model_batch, surrogates = surrogates): object 'macro_lowfilt' not found
medians_by_condition <- macro_sva$basic$medians
## Error in eval(expr, envir, enclos): object 'macro_sva' not found
macro_sva_tables <- sm(combine_de_tables(macro_sva, excel=paste0("excel/macrophage_sva-v", ver, ".xlsx"),
keepers=my_contrasts,
extra_annot=medians_by_condition))
## Error in combine_de_tables(macro_sva, excel = paste0("excel/macrophage_sva-v", : object 'macro_sva' not found
macro_sva_sig <- sm(extract_significant_genes(macro_sva_tables,
excel=paste0("excel/macrophage_sva_significant-v", ver, ".xlsx"),
p_type="unadjusted",
according_to="all"))
## Error in extract_significant_genes(macro_sva_tables, excel = paste0("excel/macrophage_sva_significant-v", : object 'macro_sva_tables' not found
## Here just let all_pairwise run on filtered data and do its normal ~ 0 + condition + batch analyses
## Bizarrely, sometimes if one runs this, it gives an error "Error in (function (classes, fdef, mtable) : unable to find an inherited method for function 'RUVr' for signature '"matrix", "logical", "numeric", "NULL"'" -- however, if one then simply runs it again it works fine.
## I am going to assume that it is because I do not explicitly invoke the library.
library(ruv)
macro_ruvres <- try(sm(all_pairwise(macro_lowfilt, model_batch="ruv_residuals")))
if (class(macro_ruvres) == "try-error") {
macro_ruvres <- sm(all_pairwise(macro_lowfilt, model_batch="ruv_residuals"))
}
## Error in get_model_adjust(input, estimate_type = model_batch, surrogates = surrogates): object 'macro_lowfilt' not found
medians_by_condition <- macro_ruvres$basic$medians
## Error in macro_ruvres$basic: $ operator is invalid for atomic vectors
macro_ruvres_tables <- sm(combine_de_tables(macro_ruvres, excel=paste0("excel/macrophage_ruvres-v", ver, ".xlsx"),
keepers=my_contrasts,
extra_annot=medians_by_condition))
## Error in all_pairwise_result[["limma"]]: subscript out of bounds
macro_ruvres_sig <- sm(extract_significant_genes(macro_ruvres_tables,
excel=paste0("excel/macrophage_ruvres_significant-v", ver, ".xlsx"),
p_type="unadjusted",
according_to="all"))
## Error in extract_significant_genes(macro_ruvres_tables, excel = paste0("excel/macrophage_ruvres_significant-v", : object 'macro_ruvres_tables' not found
## Here just let all_pairwise run on filtered data and do its normal ~ 0 + condition + batch analyses
macro_pca <- sm(all_pairwise(macro_lowfilt, model_batch="pca"))
## Error in get_model_adjust(input, estimate_type = model_batch, surrogates = surrogates): object 'macro_lowfilt' not found
medians_by_condition <- macro_pca$basic$medians
## Error in eval(expr, envir, enclos): object 'macro_pca' not found
macro_pca_tables <- sm(combine_de_tables(macro_pca, excel=paste0("excel/macrophage_pca-v", ver, ".xlsx"),
keepers=my_contrasts,
extra_annot=medians_by_condition))
## Error in combine_de_tables(macro_pca, excel = paste0("excel/macrophage_pca-v", : object 'macro_pca' not found
macro_pca_sig <- sm(extract_significant_genes(macro_pca_tables,
excel=paste0("excel/macrophage_pca_significant-v", ver, ".xlsx"),
p_type="unadjusted",
according_to="all"))
## Error in extract_significant_genes(macro_pca_tables, excel = paste0("excel/macrophage_pca_significant-v", : object 'macro_pca_tables' not found
## Here just let all_pairwise run on filtered data and do its normal ~ 0 + condition + batch analyses
macro_ruvemp <- sm(all_pairwise(macro_lowfilt, model_batch="ruv_empirical"))
## Error in get_model_adjust(input, estimate_type = model_batch, surrogates = surrogates): object 'macro_lowfilt' not found
medians_by_condition <- macro_ruvemp$basic$medians
## Error in eval(expr, envir, enclos): object 'macro_ruvemp' not found
macro_ruvemp_tables <- sm(combine_de_tables(macro_ruvemp, excel=paste0("excel/macrophage_ruvemp-v", ver, ".xlsx"),
keepers=my_contrasts,
extra_annot=medians_by_condition))
## Error in combine_de_tables(macro_ruvemp, excel = paste0("excel/macrophage_ruvemp-v", : object 'macro_ruvemp' not found
macro_ruvemp_sig <- sm(extract_significant_genes(macro_ruvemp_tables,
excel=paste0("excel/macrophage_ruvemp_significant-v", ver, ".xlsx"),
p_type="unadjusted",
according_to="all"))
## Error in extract_significant_genes(macro_ruvemp_tables, excel = paste0("excel/macrophage_ruvemp_significant-v", : object 'macro_ruvemp_tables' not found
Then repeat with the batch-corrected data and see the differences.
macro_combat <- sm(all_pairwise(macro_combat_norm, force=TRUE))
## Error in exists(sym, env, mode = "function", inherits = FALSE): object 'macro_combat_norm' not found
medians_by_condition <- macro_combat$basic$medians
## Error in eval(expr, envir, enclos): object 'macro_combat' not found
macro_combat_tables <- sm(combine_de_tables(macro_combat,
excel=paste0("excel/macrophage_combat-v", ver, ".xlsx"),
keepers=my_contrasts,
extra_annot=medians_by_condition))
## Error in combine_de_tables(macro_combat, excel = paste0("excel/macrophage_combat-v", : object 'macro_combat' not found
macro_combat_sig <- sm(extract_significant_genes(macro_combat_tables,
excel=paste0("excel/macrophage_combat_significant-v", ver, ".xlsx"),
p_type="unadjusted",
according_to="all"))
## Error in extract_significant_genes(macro_combat_tables, excel = paste0("excel/macrophage_combat_significant-v", : object 'macro_combat_tables' not found
I have 4 methods of performing this differential expression analysis. Each one comes with a set of metrics defining ‘significant’. Perhaps I can make a table of the # of genes defined as significant by contrast for each. In addition it may be worth while to do a scatter plots of the logFCs between these comparisons and see how well they agree?
macro_nobatch_sig$limma$counts
## Error in eval(expr, envir, enclos): object 'macro_nobatch_sig' not found
macro_batch_sig$limma$counts
## Error in eval(expr, envir, enclos): object 'macro_batch_sig' not found
macro_sva_sig$limma$counts
## Error in eval(expr, envir, enclos): object 'macro_sva_sig' not found
macro_ruvres_sig$limma$counts
## Error in eval(expr, envir, enclos): object 'macro_ruvres_sig' not found
macro_pca_sig$limma$counts
## Error in eval(expr, envir, enclos): object 'macro_pca_sig' not found
macro_ruvemp_sig$limma$counts
## Error in eval(expr, envir, enclos): object 'macro_ruvemp_sig' not found
macro_combat_sig$limma$counts
## Error in eval(expr, envir, enclos): object 'macro_combat_sig' not found
nobatch_basic <- merge(macro_nobatch$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$basic$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_nobatch$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$basic$all_tables$macro_sh_vs_macro_ch, : object 'macro_nobatch' not found
rownames(nobatch_basic) <- nobatch_basic[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'nobatch_basic' not found
nobatch_logfc <- nobatch_basic[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'nobatch_basic' not found
colnames(nobatch_logfc) <- c("nobatch","basic")
## Error in colnames(nobatch_logfc) <- c("nobatch", "basic"): object 'nobatch_logfc' not found
lfc_nb_b <- sm(plot_linear_scatter(nobatch_logfc, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'nobatch_logfc' not found
lfc_nb_b$scatter
## Error in eval(expr, envir, enclos): object 'lfc_nb_b' not found
lfc_nb_b$correlation
## Error in eval(expr, envir, enclos): object 'lfc_nb_b' not found
nobatch_p <- nobatch_basic[, c("P.Value","p")]
## Error in eval(expr, envir, enclos): object 'nobatch_basic' not found
nobatch_p[[2]] <- as.numeric(nobatch_p[[2]])
## Error in eval(expr, envir, enclos): object 'nobatch_p' not found
colnames(nobatch_p) <- c("nobatch","basic")
## Error in colnames(nobatch_p) <- c("nobatch", "basic"): object 'nobatch_p' not found
nobatch_p <- -1 * log(nobatch_p)
## Error in eval(expr, envir, enclos): object 'nobatch_p' not found
p_nb_b <- sm(plot_linear_scatter(nobatch_p, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'nobatch_p' not found
p_nb_b$scatter
## Error in eval(expr, envir, enclos): object 'p_nb_b' not found
p_nb_b$correlation
## Error in eval(expr, envir, enclos): object 'p_nb_b' not found
sva_batch <- merge(macro_sva$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_sva$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, : object 'macro_sva' not found
rownames(sva_batch) <- sva_batch[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'sva_batch' not found
sva_logfc <- sva_batch[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'sva_batch' not found
colnames(sva_logfc) <- c("sva","batch")
## Error in colnames(sva_logfc) <- c("sva", "batch"): object 'sva_logfc' not found
lfc_b_s <- sm(plot_linear_scatter(sva_logfc, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'sva_logfc' not found
lfc_b_s$scatter
## Error in eval(expr, envir, enclos): object 'lfc_b_s' not found
lfc_b_s$correlation
## Error in eval(expr, envir, enclos): object 'lfc_b_s' not found
sva_p <- sva_batch[, c("P.Value.x","P.Value.y")]
## Error in eval(expr, envir, enclos): object 'sva_batch' not found
sva_p[[2]] <- as.numeric(sva_p[[2]])
## Error in eval(expr, envir, enclos): object 'sva_p' not found
colnames(sva_p) <- c("sva","batch")
## Error in colnames(sva_p) <- c("sva", "batch"): object 'sva_p' not found
sva_p <- -1 * log(sva_p)
## Error in eval(expr, envir, enclos): object 'sva_p' not found
p_b_s <- sm(plot_linear_scatter(sva_p, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'sva_p' not found
p_b_s$scatter
## Error in eval(expr, envir, enclos): object 'p_b_s' not found
p_b_s$correlation
## Error in eval(expr, envir, enclos): object 'p_b_s' not found
Try putting some information of the p-values with the comparative log2fc
lfcp_b_s <- sva_batch[, c("logFC.x", "logFC.y", "P.Value.x", "P.Value.y")]
## Error in eval(expr, envir, enclos): object 'sva_batch' not found
colnames(lfcp_b_s) <- c("l2fcsva", "l2fcbatch", "psva", "pbatch")
## Error in colnames(lfcp_b_s) <- c("l2fcsva", "l2fcbatch", "psva", "pbatch"): object 'lfcp_b_s' not found
lfc_b_s$scatter
## Error in eval(expr, envir, enclos): object 'lfc_b_s' not found
cutoff <- 0.1
lfcp_b_s$state <- ifelse(lfcp_b_s$psva > cutoff & lfcp_b_s$pbatch > cutoff, "bothinsig",
ifelse(lfcp_b_s$psva <= cutoff & lfcp_b_s$pbatch <= cutoff, "bothsig",
ifelse(lfcp_b_s$psva <= cutoff, "svasig", "batchsig")))
## Error in ifelse(lfcp_b_s$psva > cutoff & lfcp_b_s$pbatch > cutoff, "bothinsig", : object 'lfcp_b_s' not found
##lfcp_b_s$lfcstate <- ifelse(lfcp_b_s$l2fcsva >= 0.75 & lfcp_b_s$l2fcbatch, "", "")
num_bothinsig <- sum(lfcp_b_s$state == "bothinsig")
## Error in eval(expr, envir, enclos): object 'lfcp_b_s' not found
num_bothsig <- sum(lfcp_b_s$state == "bothsig")
## Error in eval(expr, envir, enclos): object 'lfcp_b_s' not found
num_svasig <- sum(lfcp_b_s$state == "svasig")
## Error in eval(expr, envir, enclos): object 'lfcp_b_s' not found
num_batchsig <- sum(lfcp_b_s$state == "batchsig")
## Error in eval(expr, envir, enclos): object 'lfcp_b_s' not found
library(ggplot2)
aes_color = "(l2fcsva >= 0.75 | l2fcsva <= -0.75 | l2fcbatch >= 0.75 | l2fcbatch <= -0.75)"
plt <- ggplot2::ggplot(lfcp_b_s, aes_string(x="l2fcsva", y="l2fcbatch")) +
## ggplot2::geom_point(stat="identity", size=2, alpha=0.2, aes_string(shape="as.factor(aes_color)", colour="as.factor(state)", fill="as.factor(state)")) +
ggplot2::geom_abline(colour="blue", slope=1, intercept=0, size=0.5) +
ggplot2::geom_hline(yintercept=c(-0.75, 0.75), color="red", size=0.5) +
ggplot2::geom_vline(xintercept=c(-0.75, 0.75), color="red", size=0.5) +
ggplot2::geom_point(stat="identity", size=2, alpha=0.2, aes_string(colour="as.factor(state)", fill="as.factor(state)")) +
ggplot2::scale_color_manual(name="state", values=c("bothinsig"="grey", "bothsig"="forestgreen", "svasig"="darkred", "batchsig"="darkblue")) +
ggplot2::scale_fill_manual(name="state", values=c("bothinsig"="grey", "bothsig"="forestgreen", "svasig"="darkred", "batchsig"="darkblue"),
labels=c(
paste0("Both InSig.: ", num_bothinsig),
paste0("Both Sig.: ", num_bothsig),
paste0("Sva Sig.: ", num_svasig),
paste0("Batch Sig.: ", num_batchsig)),
guide=ggplot2::guide_legend(override.aes=aes(size=3, fill="grey"))) +
ggplot2::guides(fill=ggplot2::guide_legend(override.aes=list(size=3))) +
ggplot2::theme_bw()
## Error in ggplot2::ggplot(lfcp_b_s, aes_string(x = "l2fcsva", y = "l2fcbatch")): object 'lfcp_b_s' not found
plt
## Error in eval(expr, envir, enclos): object 'plt' not found
batch_ruvresid_deseq <- merge(macro_ruvres$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$basic$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in macro_ruvres$deseq: $ operator is invalid for atomic vectors
rownames(batch_ruvresid_deseq) <- batch_ruvresid_deseq[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_ruvresid_deseq' not found
batch_ruvresid_logfc <- batch_ruvresid_deseq[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_ruvresid_deseq' not found
colnames(batch_ruvresid_logfc) <- c("nobatch","basic")
## Error in colnames(batch_ruvresid_logfc) <- c("nobatch", "basic"): object 'batch_ruvresid_logfc' not found
lfc_ruv_bat <- plot_linear_scatter(batch_ruvresid_logfc, pretty_colors=FALSE)
## Error in data.frame(df[, c(1, 2)]): object 'batch_ruvresid_logfc' not found
lfc_ruv_bat$scatter
## Error in eval(expr, envir, enclos): object 'lfc_ruv_bat' not found
lfc_ruv_bat$correlation
## Error in eval(expr, envir, enclos): object 'lfc_ruv_bat' not found
batch_pca_deseq <- merge(macro_pca$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$basic$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_pca$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$basic$all_tables$macro_sh_vs_macro_ch, : object 'macro_pca' not found
rownames(batch_pca_deseq) <- batch_pca_deseq[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_pca_deseq' not found
batch_pca_logfc <- batch_pca_deseq[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_pca_deseq' not found
colnames(batch_pca_logfc) <- c("nobatch","basic")
## Error in colnames(batch_pca_logfc) <- c("nobatch", "basic"): object 'batch_pca_logfc' not found
lfc_pca_bat <- plot_linear_scatter(batch_pca_logfc, pretty_colors=FALSE)
## Error in data.frame(df[, c(1, 2)]): object 'batch_pca_logfc' not found
lfc_pca_bat$scatter
## Error in eval(expr, envir, enclos): object 'lfc_pca_bat' not found
lfc_pca_bat$correlation
## Error in eval(expr, envir, enclos): object 'lfc_pca_bat' not found
batch_ruvemp_deseq <- merge(macro_ruvemp$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$basic$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_ruvemp$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$basic$all_tables$macro_sh_vs_macro_ch, : object 'macro_ruvemp' not found
rownames(batch_ruvemp_deseq) <- batch_ruvemp_deseq[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_ruvemp_deseq' not found
batch_ruvemp_logfc <- batch_ruvemp_deseq[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_ruvemp_deseq' not found
colnames(batch_ruvemp_logfc) <- c("nobatch","basic")
## Error in colnames(batch_ruvemp_logfc) <- c("nobatch", "basic"): object 'batch_ruvemp_logfc' not found
lfc_ruvemp_bat <- sm(plot_linear_scatter(batch_ruvemp_logfc, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'batch_ruvemp_logfc' not found
lfc_ruvemp_bat$scatter
## Error in eval(expr, envir, enclos): object 'lfc_ruvemp_bat' not found
lfc_ruvemp_bat$correlation
## Error in eval(expr, envir, enclos): object 'lfc_ruvemp_bat' not found
combat_batch <- merge(macro_combat$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_combat$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, : object 'macro_combat' not found
rownames(combat_batch) <- combat_batch[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'combat_batch' not found
combat_batch <- combat_batch[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'combat_batch' not found
colnames(combat_batch) <- c("batch","combat")
## Error in colnames(combat_batch) <- c("batch", "combat"): object 'combat_batch' not found
b_c <- plot_linear_scatter(combat_batch, pretty_colors=FALSE)
## Error in data.frame(df[, c(1, 2)]): object 'combat_batch' not found
b_c$scatter
## Error in eval(expr, envir, enclos): object 'b_c' not found
b_c$correlation
## Error in eval(expr, envir, enclos): object 'b_c' not found
nobatch_batch <- merge(macro_nobatch$limma$all_tables$macro_sh_vs_macro_ch, macro_batch$limma$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_nobatch$limma$all_tables$macro_sh_vs_macro_ch, macro_batch$limma$all_tables$macro_sh_vs_macro_ch, : object 'macro_nobatch' not found
rownames(nobatch_batch) <- nobatch_batch[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'nobatch_batch' not found
nobatch_batch <- nobatch_batch[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'nobatch_batch' not found
colnames(nobatch_batch) <- c("nobatch","batch")
## Error in colnames(nobatch_batch) <- c("nobatch", "batch"): object 'nobatch_batch' not found
nb_b <- plot_linear_scatter(nobatch_batch, pretty_colors=FALSE)
## Error in data.frame(df[, c(1, 2)]): object 'nobatch_batch' not found
nb_b$scatter
## Error in eval(expr, envir, enclos): object 'nb_b' not found
nb_b$correlation
## Error in eval(expr, envir, enclos): object 'nb_b' not found
batch_sva <- merge(macro_batch$limma$all_tables$macro_sh_vs_macro_ch, macro_sva$limma$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_batch$limma$all_tables$macro_sh_vs_macro_ch, macro_sva$limma$all_tables$macro_sh_vs_macro_ch, : object 'macro_batch' not found
rownames(batch_sva) <- batch_sva[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_sva' not found
batch_sva <- batch_sva[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_sva' not found
colnames(batch_sva) <- c("batch","sva")
## Error in colnames(batch_sva) <- c("batch", "sva"): object 'batch_sva' not found
b_s <- plot_linear_scatter(batch_sva, pretty_colors=FALSE)
## Error in data.frame(df[, c(1, 2)]): object 'batch_sva' not found
b_s$scatter
## Error in eval(expr, envir, enclos): object 'b_s' not found
b_s$correlation
## Error in eval(expr, envir, enclos): object 'b_s' not found
batch_combat <- merge(macro_batch$limma$all_tables$macro_sh_vs_macro_ch, macro_combat$limma$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_batch$limma$all_tables$macro_sh_vs_macro_ch, macro_combat$limma$all_tables$macro_sh_vs_macro_ch, : object 'macro_batch' not found
rownames(batch_combat) <- batch_combat[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_combat' not found
batch_combat <- batch_combat[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_combat' not found
colnames(batch_combat) <- c("batch","combat")
## Error in colnames(batch_combat) <- c("batch", "combat"): object 'batch_combat' not found
b_c <- plot_linear_scatter(batch_combat, pretty_colors=FALSE)
## Error in data.frame(df[, c(1, 2)]): object 'batch_combat' not found
b_c$scatter
## Error in eval(expr, envir, enclos): object 'b_c' not found
b_c$correlation
## Error in eval(expr, envir, enclos): object 'b_c' not found
nobatch_batch <- merge(macro_nobatch$edger$all_tables$macro_sh_vs_macro_ch, macro_batch$edger$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_nobatch$edger$all_tables$macro_sh_vs_macro_ch, macro_batch$edger$all_tables$macro_sh_vs_macro_ch, : object 'macro_nobatch' not found
rownames(nobatch_batch) <- nobatch_batch[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'nobatch_batch' not found
nobatch_batch <- nobatch_batch[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'nobatch_batch' not found
colnames(nobatch_batch) <- c("nobatch","batch")
## Error in colnames(nobatch_batch) <- c("nobatch", "batch"): object 'nobatch_batch' not found
nb_b <- sm(plot_linear_scatter(nobatch_batch, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'nobatch_batch' not found
nb_b$scatter
## Error in eval(expr, envir, enclos): object 'nb_b' not found
nb_b$correlation
## Error in eval(expr, envir, enclos): object 'nb_b' not found
batch_sva <- merge(macro_batch$edger$all_tables$macro_sh_vs_macro_ch, macro_sva$edger$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_batch$edger$all_tables$macro_sh_vs_macro_ch, macro_sva$edger$all_tables$macro_sh_vs_macro_ch, : object 'macro_batch' not found
rownames(batch_sva) <- batch_sva[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_sva' not found
batch_sva <- batch_sva[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_sva' not found
colnames(batch_sva) <- c("batch","sva")
## Error in colnames(batch_sva) <- c("batch", "sva"): object 'batch_sva' not found
b_s <- plot_linear_scatter(batch_sva, pretty_colors=FALSE)
## Error in data.frame(df[, c(1, 2)]): object 'batch_sva' not found
b_s$scatter
## Error in eval(expr, envir, enclos): object 'b_s' not found
b_s$correlation
## Error in eval(expr, envir, enclos): object 'b_s' not found
batch_combat <- merge(macro_batch$edger$all_tables$macro_sh_vs_macro_ch, macro_combat$edger$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_batch$edger$all_tables$macro_sh_vs_macro_ch, macro_combat$edger$all_tables$macro_sh_vs_macro_ch, : object 'macro_batch' not found
rownames(batch_combat) <- batch_combat[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_combat' not found
batch_combat <- batch_combat[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_combat' not found
colnames(batch_combat) <- c("batch","combat")
## Error in colnames(batch_combat) <- c("batch", "combat"): object 'batch_combat' not found
b_c <- plot_linear_scatter(batch_combat, pretty_colors=FALSE)
## Error in data.frame(df[, c(1, 2)]): object 'batch_combat' not found
b_c$scatter
## Error in eval(expr, envir, enclos): object 'b_c' not found
b_c$correlation
## Error in eval(expr, envir, enclos): object 'b_c' not found
nobatch_batch <- merge(macro_nobatch$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_nobatch$deseq$all_tables$macro_sh_vs_macro_ch, macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, : object 'macro_nobatch' not found
rownames(nobatch_batch) <- nobatch_batch[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'nobatch_batch' not found
nobatch_batch <- nobatch_batch[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'nobatch_batch' not found
colnames(nobatch_batch) <- c("nobatch","batch")
## Error in colnames(nobatch_batch) <- c("nobatch", "batch"): object 'nobatch_batch' not found
nb_b <- sm(plot_linear_scatter(nobatch_batch, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'nobatch_batch' not found
nb_b$scatter
## Error in eval(expr, envir, enclos): object 'nb_b' not found
nb_b$correlation
## Error in eval(expr, envir, enclos): object 'nb_b' not found
batch_sva <- merge(macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, macro_sva$deseq$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, macro_sva$deseq$all_tables$macro_sh_vs_macro_ch, : object 'macro_batch' not found
rownames(batch_sva) <- batch_sva[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_sva' not found
batch_sva <- batch_sva[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_sva' not found
colnames(batch_sva) <- c("batch","sva")
## Error in colnames(batch_sva) <- c("batch", "sva"): object 'batch_sva' not found
b_s <- sm(plot_linear_scatter(batch_sva, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'batch_sva' not found
b_s$scatter
## Error in eval(expr, envir, enclos): object 'b_s' not found
b_s$correlation
## Error in eval(expr, envir, enclos): object 'b_s' not found
batch_combat <- merge(macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, macro_combat$deseq$all_tables$macro_sh_vs_macro_ch, by="row.names")
## Error in merge(macro_batch$deseq$all_tables$macro_sh_vs_macro_ch, macro_combat$deseq$all_tables$macro_sh_vs_macro_ch, : object 'macro_batch' not found
rownames(batch_combat) <- batch_combat[["Row.names"]]
## Error in eval(expr, envir, enclos): object 'batch_combat' not found
batch_combat <- batch_combat[, c("logFC.x","logFC.y")]
## Error in eval(expr, envir, enclos): object 'batch_combat' not found
colnames(batch_combat) <- c("batch","combat")
## Error in colnames(batch_combat) <- c("batch", "combat"): object 'batch_combat' not found
b_c <- sm(plot_linear_scatter(batch_combat, pretty_colors=FALSE))
## Error in data.frame(df[, c(1, 2)]): object 'batch_combat' not found
b_c$scatter
## Error in eval(expr, envir, enclos): object 'b_c' not found
b_c$correlation
## Error in eval(expr, envir, enclos): object 'b_c' not found
tmp <- sm(saveme(filename="macrophage_expression_parasite.rda.xz"))