From d71e97ebfca2ded9a9b364580954527255d18ed0 Mon Sep 17 00:00:00 2001 From: LMBradford <97983129+LMBradford@users.noreply.github.com> Date: Thu, 1 Aug 2024 11:57:52 -0400 Subject: [PATCH] TGx-HDACi reporting module (#252) * add tgx-hdaci report module * make tgx-hdaci report work in pipeline * fix gene names for hwt2.0 * fix typo * use ensembl IDs not gene symbols * uncomment summarize_across_facet lines * improve gene mismatch messages * tgx-hdaci for human datasets only * move bibtex files to their own folder --- R.ODAF.utils/R/write_reports.R | 25 + Rmd/DESeq2_report_new.Rmd | 3 +- Rmd/Sample_QC.Rmd | 2 +- Rmd/data_explorer_report.Rmd | 1 + Rmd/go_pathway_report.Rmd | 1 + Rmd/stats_report.Rmd | 1 + Rmd/tgx-hdaci.Rmd | 579 ++++++++++++++++++ Rmd/tgx_ddi.Rmd | 9 +- inputs/config/config.default.yaml | 1 + {Rmd => references}/references.bib | 0 {Rmd => references}/tgx-ddi-references.bib | 0 references/tgx-hdaci-references.bib | 17 + .../HDACi_classifier_TK6_wID_wlog2FC.txt | 82 +++ scripts/render_DESeq2_report.parallel.R | 25 +- 14 files changed, 737 insertions(+), 9 deletions(-) create mode 100644 Rmd/tgx-hdaci.Rmd rename {Rmd => references}/references.bib (100%) rename {Rmd => references}/tgx-ddi-references.bib (100%) create mode 100644 references/tgx-hdaci-references.bib create mode 100644 resources/HDACi_classifier_TK6_wID_wlog2FC.txt diff --git a/R.ODAF.utils/R/write_reports.R b/R.ODAF.utils/R/write_reports.R index e0bb7caa..b02961c0 100644 --- a/R.ODAF.utils/R/write_reports.R +++ b/R.ODAF.utils/R/write_reports.R @@ -127,3 +127,28 @@ make_tgxddi_reports <- function(pars, paths, facet) { render_report(tgxddi_report, tgxddi_file, pars) } } + +#' Generate TGx-HDACi Report +#' +#' Renders the TGx-HDACi report HTML file for a given facet using the specified parameters. +#' The function updates the `reports_filter` in `pars` based on the facet provided. +#' +#' @param pars A list of parameters used for report generation. +#' @param facet A character string specifying the facet for which to generate the report. +#' @param paths A list of paths used throughout the analysis. +#' @return Invisible NULL. The function is called for its side effect of rendering an HTML report. +#' @export +make_hdaci_reports <- function(pars, paths, facet) { + if (is.na(pars$deseq_facet) && is.na(pars$reports_facet)) { + pars$reports_filter <- NULL + } else { + pars$reports_filter <- facet + } + prefix <-get_prefix(prefix_pars = pars, prefix_facet = facet) + if (pars$generate_tgxhdaci_report) { + message("Generating TGX-HDACi report") + tgxhdaci_report <- file.path(paths$projectdir, "Rmd", "tgx-hdaci.Rmd") + tgxhdaci_file <- file.path(paths$reports_dir, paste0("tgxhdaci_", prefix, ".html")) + render_report(tgxhdaci_report, tgxhdaci_file, pars) + } +} \ No newline at end of file diff --git a/Rmd/DESeq2_report_new.Rmd b/Rmd/DESeq2_report_new.Rmd index dd569940..ce2f563d 100644 --- a/Rmd/DESeq2_report_new.Rmd +++ b/Rmd/DESeq2_report_new.Rmd @@ -57,6 +57,7 @@ params: generate_data_explorer_report: TRUE generate_go_pathway_report: TRUE generate_tgxddi_report: TRUE + generate_tgxhdaci_report: TRUE output_digits: 5 parallel: FALSE species_data: null @@ -74,7 +75,7 @@ output: code_folding: hide theme: spacelab # flatly spacelab sandstone cerulean code_download: true -bibliography: "`r file.path(params$projectdir, 'Rmd/references.bib')`" +bibliography: "`r file.path(params$projectdir, 'references/references.bib')`" --- diff --git a/Rmd/Sample_QC.Rmd b/Rmd/Sample_QC.Rmd index a7607225..248cf23b 100644 --- a/Rmd/Sample_QC.Rmd +++ b/Rmd/Sample_QC.Rmd @@ -43,7 +43,7 @@ output: code_folding: hide theme: spacelab # flatly spacelab sandstone cerulean code_download: true -bibliography: "`r file.path(params$projectdir, 'Rmd/references.bib')`" +bibliography: "`r file.path(params$projectdir, 'references/references.bib')`" --- ```{r setup, include=FALSE} diff --git a/Rmd/data_explorer_report.Rmd b/Rmd/data_explorer_report.Rmd index 8cbc36bc..89abf1ee 100644 --- a/Rmd/data_explorer_report.Rmd +++ b/Rmd/data_explorer_report.Rmd @@ -57,6 +57,7 @@ params: generate_data_explorer_report: TRUE generate_go_pathway_report: TRUE generate_tgxddi_report: TRUE + generate_tgxhdaci_report: TRUE output_digits: 5 parallel: FALSE species_data: null diff --git a/Rmd/go_pathway_report.Rmd b/Rmd/go_pathway_report.Rmd index 251293fd..e2b13555 100644 --- a/Rmd/go_pathway_report.Rmd +++ b/Rmd/go_pathway_report.Rmd @@ -57,6 +57,7 @@ params: generate_data_explorer_report: TRUE generate_go_pathway_report: TRUE generate_tgxddi_report: TRUE + generate_tgxhdaci_report: TRUE output_digits: 5 parallel: FALSE species_data: null diff --git a/Rmd/stats_report.Rmd b/Rmd/stats_report.Rmd index d052f8f2..71ba51d9 100644 --- a/Rmd/stats_report.Rmd +++ b/Rmd/stats_report.Rmd @@ -57,6 +57,7 @@ params: generate_data_explorer_report: TRUE generate_go_pathway_report: TRUE generate_tgxddi_report: TRUE + generate_tgxhdaci_report: TRUE output_digits: 5 parallel: FALSE species_data: null diff --git a/Rmd/tgx-hdaci.Rmd b/Rmd/tgx-hdaci.Rmd new file mode 100644 index 00000000..be0cbdb9 --- /dev/null +++ b/Rmd/tgx-hdaci.Rmd @@ -0,0 +1,579 @@ +--- +params: + projectdir: null # Use when loading. If null, here::here() will be used. Can also hard code if for some reason you need that + project_title: "Test" # Change depending on your project name + researcher_name: "Name" # Name of the researcher leading the project + bioinformatician_name: "Name" # Name of the person running the R-ODAF analyses + metadata_file: "metadata.txt" # Name of the metadata file. Must be in inputs/metadata/ + contrasts_file: "contrasts.txt" # Name of the contrasts file. Must be in inputs/contrasts/ + project_description: null # description of project for report, optional + analysis_name: "default" # short string identifying analysis settings. This will appear in the analysis directory and file names + batch_var: "batch" # For example, multiple plates + dose: "dose" # If there is a dose in the experiment; otherwise use NULL + platform: "TempO-Seq" # TempO-Seq Or RNA-Seq + nmr_threshold: 100000 # 10% of 1M reads for TempOSeq = 100,000; 10% of 10M reads for RNA-Seq = 1,000,000. + write_additional_output: FALSE # export BMD, biomarker, and biosets output? facet variable should contain chemical and timepoint information + celltype: "MCF7 cells" # only required for biosets output. Cell type or species used + units: "uM" # only required for biosets output. Units of dose + species: "human" # one of human, mouse, rat, hamster + design: "group" # single experimental group of interest; entries in this column must match the contrast names. + intgroup: ["group"] # experimental group of interest plus covariates; can be more than one + intgroup_to_plot: ["group"] # for PCA plots, add tabs for one or more groups to color + formula_override: null # e.g., "~batch + condition", to enable users to specify the DESeq2 formula to use + deseq_facet: "chemical" # If you have many different experimental groups, you may subset the report by specifying a column in the metadata to filter groups, and then setting the group of interest in deseq_filter + deseq_filter: null # Which group will this report be done on? + reports_facet: null # + reports_filter: null # + sortcol: "dose" # Optionally, a column by which to sort the contrasts + solvent_control: "solvent_control" + lenient_contrasts: FALSE # Use either column (exp, cont) of contrasts file to limit what is included in the report (instead of just exp column) + strict_contrasts: FALSE # Use BOTH columns (exp, cont) of contrasts file to limit what is included in the report + exclude_samples: null # Optionally, a vector of sample names to exclude from the analysis + exclude_groups: null # Optionally, a vector of groups to exclude from the analysis. By default this is assumed to be in the column specified by params$design. + include_only_column: null # Restrict analysis to group(s) in the column listed here based on params$include_only_group. + include_only_group: null # Restrict analysis to this/these group(s) within the column listed in params$include_only_column + cpus: 41 # Set to a lower number (e.g., 2 to 4) if you aren't working in a server environment + run_pathway_analysis: TRUE # Optionally disable pathway analysis if not available for your organism + wikipathways_directory: "~/shared/dbs/wikipathways" + linear_fc_filter_DEGs: 1.5 # Default 1.5 + linear_fc_filter_biosets: 1.2 # Default 1.2. Used for biosets output when write_additional_output=True + biospyder_dbs: "~/shared/dbs/biospyder/" + biospyder_manifest_file: "181019_Human_S1500_Surrogate_1.2_Manifest.txt" + # "191113_Human_S1500_Surrogate_2.0_Manifest.csv" + # "181019_Human_S1500_Surrogate_1.2_Manifest.txt" + # "191004_Human_Whole_Transcriptome_2.0_Manifest.txt" + wikipathways_filename: "wikipathways-20210810-gmt-Homo_sapiens.gmt" + KEGGpathways_filename: "c2.cp.kegg_medicus.v2023.2.Hs.symbols.gmt" + # "wikipathways-20210810-gmt-Mus_musculus.gmt" + # "wikipathways-20210810-gmt-Rattus_norvegicus.gmt" + nBestFeatures: 20 # The number of best features to make plots of their counts + nBest: 100 # Number of features to include in table and limiting PCA/clustering analysis + nHeatmap: 50 # Number of most variable genes for heatmap + nHeatmapDEGs: 50 # Number of DEGs for heatmap + cooks: FALSE # the DESeq Cook's distance cutoff, or FALSE to disable it + filter_gene_counts: FALSE # Filter genes to those with at least 1 count in 1 sample. Disabled by default for biomarker file output. Can enable to increase speed of analysis + generate_main_report: TRUE + generate_stats_report: TRUE + generate_data_explorer_report: TRUE + generate_go_pathway_report: TRUE + generate_tgxddi_report: TRUE + generate_tgxhdaci_report: TRUE + output_digits: 5 + parallel: FALSE + species_data: null + count_data_file: null + sampledata_sep: null + MinCount: null + alpha: 0.05 + feature_id: null + biospyder: null +output: + html_document: + toc: true + toc_float: true + number_sections: true + code_folding: hide + theme: spacelab # flatly spacelab sandstone cerulean + code_download: true +bibliography: "`r file.path(params$projectdir, 'references/tgx-hdaci-references.bib')`" + +--- + + +```{r docSetup, warning = FALSE, message = FALSE, include = F} +#### Record start time +startTime <- Sys.time() + +library(tidyverse) +library(cluster) +library(Cairo) +library(heatmap3) +library(dendextend) +library(ggplot2) +library(pheatmap) +library(viridis) +library(knitr) +library(kableExtra) +library(plotly) +library(gtable) +library(grid) +``` + + +--- +title: "`r params$platform` TGx-HDACi biomarker report" +--- + +# `r params$project_title` {-} + +Date report generated: `r format(Sys.time(), '%d %B, %Y')` + +Report prepared by: `r params$bioinformatician_name` + +Report prepared for: `r params$researcher_name` + +*** + + +WARNING: The TGx-HDACi biomarker was developed using the TK6 cell line after 4 hours of exposure [@cho_hdaci_2019]. +The results of this analysis may not be applicable to other cell lines, tissues, or experimental designs. + + +Cell line used in this study: `r params$celltype` + +This report shows the results of the TGx-HDACi biomarker analysis for the `r params$platform` platform. + +TGX-HDACi was developed as a toxicogenomics signature to identify chemicals that cause histone deacetylase inhibition (HDACi). +It uses an 81-gene classification tool generated from a training set of 20 chemicals: 10 HDACi and 10 non-HDACi chemicals. TK6 cells were exposed to specific doses of these chemicals for 4 hours, then the gene expression changes were measured using a whole-transcriptome TempO-Seq platform. + +The probability that a tested chemical is HDACi is calculated based on the similarity of its gene expression profile to the agents in the classifier. + +Three analyses are performed on test chemicals using the TGx-HDACi biomarker: + +1. Principal component analysis + +2. 2-dimensional hierarchical clustering + +3. Nearest Shrunken Centroids (NSC) probability analysis, visualized by heatmaps + +The test chemical is considered histone deacetylase inhibiting if it is positive in at least one of these analyses. +Results of all three analyses are summarized in a table at the end of this report. + + +```{r load_facet_data, include=FALSE} +# Load facet data. Gets allBiomarkers and contrasts_subset for current facet +load_facet_data(paths, params) + +# Have to deal with weird data setup in case2 +if (is.na(params$deseq_facet) && !is.na(params$reports_facet)) { + allBiomarkers <- allBiomarkers[["all"]] +} +# in case1 and case3, allBiomarkers is fine as is +``` + +```{r import_control_info} +# Get the control from the contrasts (first contrast) +# This will only work if there's just one control for all the groups in the report +control <- contrasts_subset %>% + dplyr::slice(1) %>% + pull(V2) +``` + +```{r get_IDs} +# Temposeq rows are named by gene symbol +# So get the ensembl IDs from the biospyder manifest + +if (params$platform == "TempO-Seq") { + biospyder_manifest_file <- paste0(params$biospyder_dbs, params$biospyder_manifest_file) + biospyder_manifest_file <- read.delim(biospyder_manifest_file, sep = ",") + + biospyder_IDs <- biospyder_manifest_file %>% + dplyr::select(Probe_Name, Ensembl_Gene_ID) + + # Can't just use the Gene_symbol column because sometimes that's an alias and won't match the sample data + + # Take the Probe_Name column, remove everything after the underscore, and group probes for same gene + biospyder_IDs$Probe_Name <- sub("_.*", "", biospyder_IDs$Probe_Name) + biospyder_IDs <- biospyder_IDs %>% + dplyr::distinct() %>% + dplyr::rename(SampleID = Probe_Name) + + df <- as.data.frame(allBiomarkers) %>% + merge(biospyder_IDs, by = "SampleID") %>% + dplyr::rename(ID = Ensembl_Gene_ID) %>% + dplyr::select(-SampleID) %>% + dplyr::select(ID, everything()) %>% + dplyr::distinct() +} else { + df <- as.data.frame(allBiomarkers) %>% + dplyr::rename(ID = SampleID) +} +``` + +```{r process_data} +# Convert all columns except ID to numeric, collapse replicate IDs +df <- df %>% + mutate(across(-ID, as.numeric)) %>% + group_by(ID) %>% + summarise_all(mean) + +## Average the dose replicates +# Replace sample names with info from the metadata column used for deseq2 design +designcol <- params$design +df_no_id <- dplyr::select(df, -ID) +name_mapping <- setNames(exp_metadata[[designcol]], exp_metadata$original_names) +colnames(df_no_id) <- name_mapping[colnames(df_no_id)] + +# Calculate the row-wise mean for each unique base name, add ID column back on +df_means <- df_no_id %>% + split.default(names(df_no_id)) %>% + map_df(rowMeans, na.rm = TRUE) +df_means <- bind_cols(df["ID"], df_means) + +# Subset dataframe to just the reports group in case2 +if (is.na(params$deseq_facet) && !is.na(params$reports_facet)) { + # Just want columns for the report facet plus the control + filter_columns <- contrasts_subset[[1]] + filter_columns <- c("ID", filter_columns, control) + #Replace "." with "-" in filter_columns + filter_columns <- gsub("\\.", "-", filter_columns) + + + # Subset the columns from the formatted df + df_means <- df_means %>% + select(all_of(filter_columns)) +} + +# Log2 ratios vs control (from contrasts) +log2ratios <- df_means +log2ratios[, -1] <- sweep(log2ratios[, -1], 1, log2ratios[[control]], `-`) +# Remove the control column +log2ratios <- dplyr::select(log2ratios, -one_of(control)) +``` + +```{r load_classifier} +# Classifier for TK6 cells +classifier_path <- file.path(params$projectdir, "resources", "HDACi_classifier_TK6_wID_wlog2FC.txt") +classifier <- read.delim(classifier_path, sep = "\t") + +# Save the classifier IDs for later +classifier_IDs <- classifier %>% + dplyr::select(ID, Entrez_ID, Ensembl_Gene_ID) %>% + dplyr::rename(Gene_Symbol = ID) + +classifier <- classifier %>% + dplyr::select(-ID) %>% + dplyr::rename(ID = Ensembl_Gene_ID) %>% + dplyr::select(ID, everything()) %>% + distinct() %>% + dplyr::rename("5-FU" = X5.FU, + "2-DG" = X2.DG) + +HDACi_chems <- c("Api", "Mo", "Oxa", "Pan", "SBHA", "Scr", "Sodbuty", "Tac", "TSA", "Vor") + +nHDACi_chems <- c("2-DG", "5-FU", "Ant", "Ble", "CdCl2", "Cisp", "CPT", "HU", "Tun", "Vin") +``` + +```{r merge} +merged <- merge(classifier, log2ratios, by = "ID") + +nmatched <- nrow(merged) + +missed <- setdiff(classifier$ID, merged$ID) +``` + +### Mismatches +There are **81** genes in the biomarker and your data matched **`r nmatched`** of them. + +The following genes were not found in your data: **`r missed`**. + +Mismatches can happen because of differences in gene annotation between temposeq platforms. + +# Principal Component Analysis + +The PCA plot is interactive. Hover over the points on the PCA plot to see chemical names. + +```{r PCA, warning=FALSE} +# Done on log2 ratios + +# Save the ID column +id_column <- merged$ID + +# Save just the log2FC columns +merged_log2 <- merged %>% + dplyr::select(-c(1:9)) + +# Calculate PCA using the classifier's mean and standard deviation +pc_calc <- (merged_log2 - merged$pc.mean) / merged$pc.sd +rownames(pc_calc) <- id_column + +pc1 <- as.vector(merged$pcl.1) %*% as.matrix(pc_calc) +pc2 <- as.vector(merged$pcl.2) %*% as.matrix(pc_calc) + +df_pca <- data.frame(PC1 = t(pc1), PC2 = t(pc2)) + +# Add group column +df_pca <- df_pca %>% mutate(Group = case_when( + rownames(df_pca) %in% HDACi_chems ~ "HDACi", + rownames(df_pca) %in% nHDACi_chems ~ "Non-HDACi", + TRUE ~ "Test" +)) + +# Add a new column with the row names +df_pca$Label <- rownames(df_pca) + +testchem_pc1 <- df_pca[21:nrow(df_pca), ] %>% + dplyr::select(PC1, Label) %>% + dplyr::rename(ID = Label) + +all_pc1 <- df_pca %>% + dplyr::select(PC1, Label) %>% + dplyr::rename(ID = Label) + +# Plot +p <- ggplot(df_pca, aes(PC1, PC2)) + + geom_point(aes(color = Group, shape = Group, size = 1.2, text = Label)) + + scale_shape_manual(values = c("HDACi" = 19, "Non-HDACi" = 19, "Test" = 17)) + + scale_color_manual(values = c("HDACi" = "red", "Non-HDACi" = "blue", "Test" = "darkorange"), name = "Group") + + geom_text(data = subset(df_pca, Group == "Test"), aes(label = Label), nudge_y = 0.1, nudge_x = 0) + + geom_vline(xintercept = 0, linetype = "dashed", color = "darkgrey") + + theme_bw() + +# Convert to plotly object +p <- ggplotly(p, tooltip = "text") # Hover text shows chemical names + +# Remove the legend title +p <- p %>% layout(legend = list(title = list(text = ""))) + +# Adjust point size, test chemical points are a bit bigger +p$x$data[[1]]$marker$size <- p$x$data[[1]]$marker$size / 2 +p$x$data[[2]]$marker$size <- p$x$data[[2]]$marker$size / 2 +p$x$data[[3]]$marker$size <- p$x$data[[3]]$marker$size / 1.5 + +p + +# Add the ID column back to merged_log2 +merged_log2 <- merged_log2 %>% + mutate(ID = id_column) %>% + select(ID, everything()) +``` + + +# Hierarchical Clustering {.tabset .tabset-pills} +```{r Dendrograms, results='asis'} +# Done on centred and scaled log2 ratios + +# Initialize a data frame to store the HC grouping results +dendro_results_testchems <- data.frame(ID = character(), HC = character(), stringsAsFactors = FALSE) +dendro_biomarker <- data.frame(ID = names(pc_calc[, 1:20]), + HC = ifelse(names(pc_calc[, 1:20]) %in% HDACi_chems, "HDACi", "Non-HDACi"), + stringsAsFactors = FALSE) + +# Dendrogram for each dose +for (j in 21:ncol(pc_calc)){ + cat(paste0("## ", colnames(pc_calc)[j], "\n")) + dendro <- dist(t(pc_calc[, c(1:20, j)])) + dendro <- hclust(dendro, method = "average") + dendro <- as.dendrogram(dendro) + labels_colors(dendro) <- c(rep("red", 10), + rep("blue", 10), + "darkorange")[order.dendrogram(dendro)] + + # Increase the bottom margin to make room for x-axis labels + par(mar = c(10, 4, 4, 2)) # Default is c(5, 4, 4, 2) + 0.1 + + plot(dendro, horiz = FALSE, main = paste("Euclidean, Average Linkage (log2),", colnames(pc_calc)[j])) + cat("\n\n") + + # Reset to default margins + par(mar = c(5, 4, 4, 2) + 0.1) + + # Cut the dendrogram into 2 groups + dendro_groups <- cutree(dendro, k = 2) + test_sample_group <- dendro_groups[length(dendro_groups)] + + # Count the number of HDACi chemicals that are in the same group as the test sample + same_group_count <- sum(dendro_groups[names(dendro_groups) %in% HDACi_chems] == test_sample_group) + + # Find if test sample is in the same group as all HDACi chemicals + if (same_group_count == length(HDACi_chems)) { + result <- "HDACi" + } else if (same_group_count > 0) { + result <- "UNCERTAIN" + } else { + result <- "Non-HDACi" + } + + # Save results for summary table + dendro_results_testchems <- rbind(dendro_results_testchems, data.frame(ID = colnames(pc_calc)[j], HC = result, stringsAsFactors = FALSE)) +} + +# Save results for all chemicals +dendro_results_all <- rbind(dendro_biomarker, dendro_results_testchems) +``` + + +# Nearest Shrunken Centroid Prediction and Heatmap +```{r NSC} +# Calculate probabilities of HDACi vs non-HDACi +my_pred <- data.frame(samples = names(merged)[-c(1:9)], probH = 0, probNH = 0) +for (k in 1:(ncol(merged) - 9)){ + #k <- 1 + H <- sum(((merged[, k + 9] - merged$HDACi.score) / merged$std.dev)^2) - 2 * log(0.5) + NH <- sum(((merged[, k + 9] - merged$NonHDACi.score) / merged$std.dev)^2) - 2 * log(0.5) + probH <- 1 / (1 + exp(H / 2 - NH / 2)) + probNH <- 1 - probH + + my_pred[k, 2] <- floor(100 * probH) / 100 + my_pred[k, 3] <- floor(100 * probNH) / 100 +} + +# Save prediction info for summary table +pred <- my_pred[21:nrow(my_pred), ] %>% + dplyr::select(samples, probH) %>% + dplyr::rename(ID = samples) + +pred_all <- my_pred %>% + dplyr::select(samples, probH) %>% + dplyr::rename(ID = samples) +``` + +```{r HM_annotations} +# Make summary table for all chemicals, used for annotation bars on heatmap +t1 <- all_pc1 %>% + merge(dendro_results_all, by = "ID") %>% + merge(pred_all, by = "ID") %>% + dplyr::rename(PCA = PC1, NSC = probH) + +t2 <- t1 + +t2$PCA <- ifelse(sign(t1$PCA) == -1, "HDACi", "Non-HDACi") +t2$NSC <- ifelse(t1$NSC > 0.5, "HDACi", "Non-HDACi") +t2$Overall <- apply(t2[, c("PCA", "HC", "NSC")], 1, function(x) ifelse("HDACi" %in% x, "HDACi", "Non-HDACi")) + +rownames(t2) <- t2$ID +t2 <- t2[, c("PCA", "HC", "NSC", "Overall")] + +# Convert all columns to factor +t2[] <- lapply(t2, factor) +``` + +```{r setup_heatmap, fig.show='hide'} + +winsorize_sd <- function(x) { + mn <- mean(x) + sd <- sd(x) + x <- (x - mn) / sd + x[x > 3] <- 3 + x[x < -3] <- -3 + return(x) +} + +# Standardize against PC.mn and PC.std from classifier, transform to log10 +standardized_log2 <- as.matrix(merged_log2[, -1]) +standardized_log2 <- (standardized_log2 - merged$pc.mean) / merged$pc.sd + +# Add the ID column back, column name "ID" +standardized_log2 <- cbind(ID = merged_log2$ID, standardized_log2) + +# Change the IDs to gene symbol +standardized_log2 <- standardized_log2 %>% + merge(classifier_IDs, by.x = "ID", by.y = "Ensembl_Gene_ID") %>% + select(-ID, -Entrez_ID) %>% + select(Gene_Symbol, everything()) + +rownames(standardized_log2) <- standardized_log2$Gene_Symbol +standardized_log2 <- standardized_log2[, -1] + +# Don't know why everything is chr now, but make it numeric +standardized_log2[] <- lapply(standardized_log2, as.numeric) + +# Winsorize because temposeq data can be very bright on heatmap +# What about RNA-seq data? Should I do a conditional? Should talk to Andrew +std_win_log2 <- apply(standardized_log2, 2, winsorize_sd) + +# Calculate the color scale using the full data set +breaks <- seq(min(std_win_log2, na.rm = TRUE), max(std_win_log2, na.rm = TRUE), length.out = 17) +color_scale <- colorRampPalette(c("blue", "white", "gold1"))(17) +#color_scale <- viridis(17, option = "magma") #will play with colour scale + +# Define the color mapping for each annotation bar +annotation_colors <- list( + PCA = c("Non-HDACi" = "blue", "HDACi" = "red"), + HC = c("Non-HDACi" = "blue", "UNCERTAIN" = "yellow", "HDACi" = "red"), + NSC = c("Non-HDACi" = "blue", "HDACi" = "red"), + Overall = c("Non-HDACi" = "blue", "HDACi" = "red") +) + +# Reorder the rows in the annotation to match the matrix +t2 <- t2[match(colnames(std_win_log2), rownames(t2)), ] + +# Create the heatmap +p <- pheatmap(std_win_log2, + cluster_cols = FALSE, + # cluster_rows = FALSE, + gaps_col = 20, + color = color_scale, + breaks = breaks, + clustering_method = "average", + clustering_distance_rows = "correlation", + clustering_distance_cols = "correlation", + annotation_col = t2, + annotation_colors = annotation_colors) +``` + +```{r display_heatmap, fig.width=8, fig.height=12} +# This is necessary to make a heatmap with a reasonable legend +# Remove the legends for PCA, HC, and NSC +gt <- p$gtable + +# Change the legend title +annlegend_grob <- gt$grobs[[7]] +annlegend_grob$children[[1]]$label <- "Prediction" + +# Create the new gTree +new_annlegend_grob <- gTree(children = gList(annlegend_grob$children[[1]], annlegend_grob$children[[2]], annlegend_grob$children[[3]]), cl = "gTree") +new_annlegend_grob$widths <- annlegend_grob$widths +new_annlegend_grob$heights <- annlegend_grob$heights +new_annlegend_grob$vp <- annlegend_grob$vp + +# Replace the original legend with the modified one +gt$grobs[[7]] <- new_annlegend_grob + +# Display the modified heatmap +plot.new() +grid::grid.draw(gt) +``` + +# Summary Table + +```{r summary} +# Create a summary table of test chemicals +summary_table1 <- testchem_pc1 %>% + merge(dendro_results_testchems, by = "ID") %>% + merge(pred, by = "ID") %>% + dplyr::rename(PCA = PC1, NSC = probH) + +# Initialize +summary_table2 <- summary_table1 + +# Assign "HDACi" or "Non-HDACi" based on results in the three tests +summary_table2$PCA <- ifelse(sign(summary_table1$PCA) == -1, "HDACi", "Non-HDACi") +summary_table2$HC <- summary_table1$HC +summary_table2$NSC <- ifelse(summary_table1$NSC == 1, "HDACi", "Non-HDACi") +summary_table2$Overall <- apply(summary_table2[, c("PCA", "HC", "NSC")], 1, function(x) ifelse("HDACi" %in% x, "HDACi", "Non-HDACi")) + +# Color table cells +color_cells <- function(x) { + ifelse(x == "HDACi", cell_spec(x, "html", color = "red"), cell_spec(x, "html", color = "blue")) +} +summary_table2$Overall <- sapply(summary_table2$Overall, color_cells) + +# Print the formatted table +kable(summary_table2, caption = "Summary Table", escape = FALSE) %>% + kable_styling("striped", full_width = FALSE) + + +# Output the summary table to a file +# Remove HTML tags from the 'Overall' column +summary_table2$Overall <- gsub("<.*?>", "", summary_table2$Overall) + +write.csv(summary_table2, file = file.path(paths$reports_dir, paste0(params$reports_filter, "_tgx-HDACi_results.csv")), row.names = FALSE) +``` + + +# References + +--- +nocite: '@*' +--- + + +
+ + +```{r, child=file.path(paths$projectdir,'Rmd','session_info.Rmd')} +``` + + + \ No newline at end of file diff --git a/Rmd/tgx_ddi.Rmd b/Rmd/tgx_ddi.Rmd index af7c9e28..601165e1 100644 --- a/Rmd/tgx_ddi.Rmd +++ b/Rmd/tgx_ddi.Rmd @@ -57,6 +57,7 @@ params: generate_data_explorer_report: TRUE generate_go_pathway_report: TRUE generate_tgxddi_report: TRUE + generate_tgxhdaci_report: TRUE output_digits: 5 parallel: FALSE species_data: null @@ -74,7 +75,7 @@ output: code_folding: hide theme: spacelab # flatly spacelab sandstone cerulean code_download: true -bibliography: "`r file.path(params$projectdir, 'Rmd/tgx-ddi-references.bib')`" +bibliography: "`r file.path(params$projectdir, 'references/tgx-ddi-references.bib')`" --- @@ -297,8 +298,10 @@ missed <- setdiff(classifier$ID, merged_log10$ID) # classifier_IDs %>% dplyr::filter(Ensembl_Gene_ID %in% missed) ``` -There are 64 genes in the biomarker and your data matched `r nmatched` of them. -The following genes were not found in your data: `r missed`. +### Mismatches +There are **64** genes in the biomarker and your data matched **`r nmatched`** of them. + +The following genes were not found in your data: **`r missed`.** Mismatches can happen because of differences in gene annotation between temposeq platforms. diff --git a/inputs/config/config.default.yaml b/inputs/config/config.default.yaml index e58406d3..00e704d8 100644 --- a/inputs/config/config.default.yaml +++ b/inputs/config/config.default.yaml @@ -90,5 +90,6 @@ DESeq2: generate_data_explorer_report: TRUE generate_go_pathway_report: FALSE generate_tgxddi_report: FALSE + generate_tgxhdaci_report: FALSE output_digits: 5 # control rounding of DEG output. Primarily used to suppress RNG variability so our tests don't fail :) parallel: FALSE diff --git a/Rmd/references.bib b/references/references.bib similarity index 100% rename from Rmd/references.bib rename to references/references.bib diff --git a/Rmd/tgx-ddi-references.bib b/references/tgx-ddi-references.bib similarity index 100% rename from Rmd/tgx-ddi-references.bib rename to references/tgx-ddi-references.bib diff --git a/references/tgx-hdaci-references.bib b/references/tgx-hdaci-references.bib new file mode 100644 index 00000000..d75424db --- /dev/null +++ b/references/tgx-hdaci-references.bib @@ -0,0 +1,17 @@ +@article{cho_hdaci_2019, + title = {Assessment of the performance of the {TGx}‐{DDI} biomarker to detect {DNA} damage‐inducing agents using quantitative {RT}‐{PCR} in {TK6} cells}, + volume = {60}, + issn = {0893-6692}, + url = {https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6588084/}, + doi = {10.1002/em.22257}, + number = {2}, + urldate = {2024-06-24}, + journal = {Environmental and Molecular Mutagenesis}, + author = {Cho, Eunnara and Buick, Julie K. and Williams, Andrew and Chen, Renxiang and Li, Heng‐Hong and Corton, J. Christopher and Fornace, Albert J. and Aubrecht, Jiri and Yauk, Carole L.}, + month = mar, + year = {2019}, + pmid = {30488505}, + pmcid = {PMC6588084}, + keywords = {tgx-ddi, HC, tgx}, + pages = {122--133}, +} diff --git a/resources/HDACi_classifier_TK6_wID_wlog2FC.txt b/resources/HDACi_classifier_TK6_wID_wlog2FC.txt new file mode 100644 index 00000000..86baa0cd --- /dev/null +++ b/resources/HDACi_classifier_TK6_wID_wlog2FC.txt @@ -0,0 +1,82 @@ +ID Ensembl_Gene_ID Entrez_ID pcl.1 pcl.2 pc.mean pc.sd NonHDACi.score HDACi.score std.dev Api Mo Oxa Pan SBHA Scr Sodbuty Tac TSA Vor X2.DG X5.FU Ant Ble CdCl2 Cisp CPT HU Tun Vin +AKAP8 ENSG00000105127 10270 0.115859770739922 -0.138421527463321 -0.92165828112778 0.947987624394474 -0.085666477 -1.757650085 0.930348038 -1.80990180021116 -0.902281794815164 -1.78282862275653 -2.17182875889112 -2.04941500589546 -2.28634847796368 -1.7246166868828 -0.796392801046356 -1.94451204575672 -2.10837486056958 -0.267875026261747 0.170296162939418 0.12973289763948 -0.372494789404157 -0.201635143916079 0.0258788855112313 0.438617432008389 -0.421825902594567 -0.384331524262062 0.0269722405730661 +AP5S1 ENSG00000125843 55317 0.11595360370849 -0.121343545727294 -0.876345955892737 1.10258022412672 0.048784837 -1.801476749 1.091951269 -1.90523446982151 -0.319943553906973 -2.16879030962848 -2.41439126808957 -1.97426238190666 -2.5214798264613 -1.68454609671011 -0.505775843695639 -2.2291083222361 -2.29123542005034 0.352453140181404 -0.30152249612238 0.16687563635385 0.360262643990298 -0.084883812214965 -0.289294539867159 0.0495775481110412 0.108184114439983 0.326582467263338 -0.200386327483467 +ATP1B1 ENSG00000143153 481 -0.107855588904442 -0.102955577825268 0.311601979887496 1.04967146676658 -0.645081646 1.268285605 0.897743325 1.89241542928173 0.953699742538177 1.58511259405767 0.809696061753205 0.993817113487322 1.11800315355616 1.2560883332636 1.88711543008855 1.25902867389169 0.927879521575813 -0.665259592081634 -0.400290496817061 -0.952747360561048 -0.875158826811167 -0.676947355882386 0.00646054149037623 -0.285980521821657 -0.862392008306592 -1.27126447277617 -0.46723636217666 +BMF ENSG00000104081 90427 -0.116715104178636 -0.0560085432699146 1.84970450630023 1.87095899407299 0.135304768 3.564104244 1.170680954 3.34700479235924 2.51531016171849 3.24868361488142 4.47466492483518 4.03183896045518 4.41529144559086 2.73202262836304 3.34252983497908 3.70656895281459 3.82712712528591 -0.227004862169451 -0.309619202382523 -0.542015882288924 -0.10089553197272 -0.990820241253614 0.518076809700435 0.90010804850286 0.534401656261773 0.666936562103603 0.903880328220142 +BNIP1 ENSG00000113734 662 0.111960126503611 -0.0468629611944358 -0.217157882673267 0.769277521845119 0.464348467 -0.898664232 0.845091166 -0.665315702108007 -0.482470558178822 -0.80214237360902 -1.0059635790914 -1.00131606367685 -1.3784825303205 -0.640012001919188 -0.688848725206258 -1.04777826760432 -1.27431252031384 -0.102123793976483 0.824128110885472 0.700399255036531 0.0306953775591014 0.848991097212763 0.319898907927956 0.942258534620934 0.306033135598763 0.209194271889612 0.564009771808209 +C9orf69 ENSG00000238227 NA 0.113553192224616 0.0665640465918842 -0.548760126972285 0.947484179098044 0.244559458 -1.342079712 1.013845903 -1.47646637884909 -0.63954571613176 -1.37681306515381 -1.6819128483941 -1.33273447272076 -1.86811333647517 -1.42301732979568 -0.729072302584902 -1.42860571922445 -1.46451595173134 0.807936611597533 -0.344433134528286 -0.366568178595455 1.03973846717839 0.160985580545463 0.134127848355251 0.723596649232702 0.976576984638689 -0.258665177388054 -0.427701069420874 +CCDC144NL ENSG00000205212 339184 -0.110308239006416 -0.0441253151553521 0.55147753139759 1.64072301447962 -0.852005126 1.954960189 1.323555371 3.0896945346627 0.61313351089874 2.32797099722984 1.84035092415902 1.8918533100394 2.09922227309357 2.04684446053128 1.39534301730433 2.20785873133414 2.03733012644617 -0.809017812842854 -0.794853673540899 0.922089925303996 -0.671595358793107 -2.85370065005405 -0.627634640954242 -0.421391122445308 -1.20957571379148 -1.51595439383324 -0.538417816796211 +CDK5R1 ENSG00000176749 8851 0.113678732420909 -0.151019607299035 -0.749518953639277 0.917929702285931 0.042625827 -1.541663735 0.953929064 -1.64414242498978 -0.642664489121737 -1.90212780376715 -1.62818193003971 -1.78864251158722 -1.99538855245458 -1.59220295435527 -0.507062969096927 -1.83100172833452 -1.88522198211609 0.340716897459824 0.199019558757816 0.187242560661834 0.116932869213782 -0.598415494682729 -0.414387416985718 0.220053499430467 -0.0899978673496196 0.433782452863804 0.0313112137079775 +CEP68 ENSG00000011523 23177 -0.101535902637366 -0.113773473358221 0.575491030676457 1.31137140475822 -0.508016145 1.658998206 1.230237815 0.974176492049851 1.51606477285506 0.87684270171603 1.87365251244482 2.06892134155989 2.46818124970864 0.928803378807022 2.05332769788202 1.80351798177071 2.02649393056122 -0.947318855004843 -0.661280467604359 0.574816533405787 -1.17936662735214 -1.36532760310219 0.247374745054832 0.867541899631119 -0.628835403809208 -1.64793061927696 -0.339835047768165 +COIL ENSG00000121058 8161 0.117177284546795 -0.0843816474268829 -0.801683104216662 1.15403451608762 0.190939196 -1.794305405 1.073213766 -1.78809362878888 -0.691599441447359 -1.73445913803988 -2.15386274786357 -2.18624663390705 -2.75654474782672 -1.49843982170043 -0.397861924340187 -2.27605715048434 -2.45988881350392 0.563151154798879 0.203175082936679 0.366973118930345 0.426014291296234 0.18757799249182 0.0390864055441029 0.118063087521228 0.227358029068776 -0.0107810065881659 -0.211226192430808 +CPEB4 ENSG00000113742 80315 -0.110784088926371 -0.0256962854943266 0.654911901904206 1.23006529765735 -0.370405666 1.680229469 1.170540829 1.25102668503607 0.748363153847769 1.08094309875945 2.00401399806854 1.79606187025515 2.37967976243238 2.23429209394501 0.881537908855967 2.31118461811643 2.11519150456646 -1.11251209468679 -0.0513547449716091 0.747453960447968 -0.573262658509253 -0.857566624980449 -1.28880208332358 -0.13768057273277 -0.732347498329465 0.608315326525757 -0.306299665238924 +DMXL1 ENSG00000172869 1657 -0.117229867573605 0.026095309613864 0.509544601600794 1.17038400325092 -0.496039683 1.515128886 1.083286109 1.58367097130746 -0.0187525093624211 1.59566938025278 1.92411604802826 1.78064467864 2.12202351375272 2.11208692899333 0.75797049087447 1.42122497386684 1.87263438708376 -0.551609794267578 -0.390561006536631 0.0270191010862703 -0.531481433860874 -1.09562892481257 -0.459350071420792 -1.27057089233653 -0.671250203463307 -0.0788416556851499 0.0618780498758459 +DTWD1 ENSG00000104047 56986 0.105481550554621 -0.0152698817965754 -0.426753080588313 0.748006722863828 0.227369844 -1.080876005 0.854914264 -0.481255495242793 -0.939320560384244 -0.549337106501515 -1.60600284789455 -0.998008666667176 -1.06845117815398 -1.49036350375909 -1.17154176096493 -1.22258878764324 -1.28189014439951 -0.10949591676742 0.426583937096676 0.555610408967419 0.129655191870007 -0.368316583757954 0.260369120144386 0.682097068004162 0.312398286078424 0.349093952605826 0.0357029756032339 +DYRK3 ENSG00000143479 8444 -0.117438768630885 0.0542101011050083 0.869165805765749 0.98218436764526 -0.030766832 1.769098443 0.85964732 1.86422754813974 0.844048379594601 1.84416202259817 2.04985798097167 2.00637254836798 1.96402056252602 1.92688649241753 1.26739295617695 1.89594246068775 2.02807348308815 0.141642959043604 -0.100257956055151 -0.487067364013293 -0.0585314981728196 -0.371595083204415 0.186051308936427 0.486180822224416 0.153141841673756 -0.153732337885591 -0.103501011800512 +E2F8 ENSG00000129173 79733 0.113082507575848 0.013995283986726 -0.635244297290653 0.994983852999771 0.226441342 -1.496929937 0.984564218 -1.98878454735252 -1.10518824584196 -1.83623614818628 -1.69978247406669 -1.46267005587183 -1.68518974578224 -1.74479931623855 -0.549771240471098 -1.47682547777816 -1.42005211497778 0.344218898424835 0.0078247092479995 -0.166975417187894 0.422842780153401 0.0232572534679472 0.221733713751551 0.962363419823129 1.14077279045129 -0.543080819298219 -0.148543908079988 +EAF2 ENSG00000145088 55840 -0.117415525372472 0.0821715791448977 0.588025705654047 0.736420565941719 -0.05837635 1.234427761 0.844443644 1.34551143960939 0.162106530311275 1.42276661056908 1.34054178599933 1.53895241402856 1.63955814615922 1.23809051895568 0.839092869841899 1.34099010442872 1.47666719116361 -0.258340759855735 0.0264060545986993 -0.000409263138653119 -0.085685337106199 -0.198113381156636 -0.125928612176105 -0.238851992808822 0.259541259320317 0.149578137679166 -0.111959603341848 +ERRFI1 ENSG00000116285 54206 -0.107949141231499 -0.203471717903297 0.662231817963452 0.957984148759186 -0.133882619 1.458346254 1.02982749 1.904049571921 1.02937669988561 1.43278290595251 1.59565414259718 1.14586051069086 1.9334577339747 1.33210347963422 1.59865768304063 1.42868280370606 1.18283701297588 -0.794415084741465 -0.0229639179276393 -0.358614733023249 -0.789774620308456 -0.673126622938245 0.355640304675895 0.434352943063346 -0.911572204614213 0.477863449481017 0.9437843012234 +FAM117A ENSG00000121104 81558 -0.10569408665768 -0.0692846428828312 0.865638487531706 1.75833649662909 -0.457793897 2.189070872 1.663326543 3.05359284237826 0.382132473757657 2.95164636101528 2.55524769029328 2.38762738984384 2.80949870472836 2.52474729157128 0.4466074349925 2.33251430136364 2.4470942329456 -1.83961868986524 0.0172859720768344 0.561221328456953 -1.54401935822227 -2.50974283264963 0.858489375054082 1.00020468913047 -1.58550014954925 -0.351253232715406 0.814993926027871 +FAM217B ENSG00000196227 63939 0.112507452036389 -0.0420455487801605 -0.534442947307867 1.06670641577396 0.351797109 -1.420683003 1.088583532 -1.8494315222607 -0.545253858998946 -1.43422045383444 -1.41005106907136 -2.3050882874042 -1.7779700478396 -1.64341213555133 -0.0572910575194069 -1.56466512109469 -1.61944647819434 0.910831434056582 0.0917919288861412 -0.293714744425309 1.01557662502102 0.0576301170354243 0.692693470386569 0.558787705531648 0.68380079290251 0.101535653685396 -0.3009618974683 +FAS ENSG00000026103 355 0.110886529137565 -0.141954936892785 -0.482134315794947 0.980904987988725 0.352668889 -1.31693752 1.006755574 -1.789059812345 0.00738905285192164 -1.32290740402882 -1.76388844931027 -1.33591358174114 -1.56239661001442 -1.69030749878696 -0.751522440510122 -1.56615253154965 -1.39461592694804 -0.200652653589602 0.740753870388639 -0.231515981582097 0.435004854888791 0.00731731813585079 0.254942572657477 0.149405179670854 0.733833934903056 0.928785318502856 0.708814472507738 +GLDC ENSG00000178445 2731 -0.11313157636042 -0.0800838545676559 0.467704500322342 1.11243018643088 -0.492736755 1.428145756 1.045919298 1.36312497528559 0.479998046865112 1.10172979236638 1.59676659319655 1.13559808238628 1.96475886862743 1.63376822768482 1.51967009889824 2.04709010637957 1.43895276419926 -0.990824518726672 0.256878885125209 -0.458204842437248 -1.28073427875058 -0.428074280173746 0.553696132737972 -0.671091646732424 -1.23624815517095 -0.49933889205274 -0.173425953261215 +GNAZ ENSG00000128266 2781 -0.112985889326669 0.0432555564574036 0.587617248425133 0.728973897548896 -0.068189278 1.243423775 0.803727959 1.31957524219493 0.957961494859274 1.01223083813553 1.66411995899349 1.15640269567069 1.63444090811668 1.36284008157626 0.812968449945857 1.30267661660909 1.21102146649827 -0.0936329022414784 0.127522435484452 0.105034415119357 -0.317459546311124 0.135850064192507 -0.0509791665262289 0.426342294335284 -0.355828750577251 -0.0327579002961942 -0.625983727276744 +GPR183 ENSG00000169508 1880 0.113651897162077 -0.0309360810157645 -1.49533249919785 1.44943028344933 -0.278955847 -2.711709152 1.272892342 -2.92274437566481 -0.92703284372664 -2.49343393770002 -3.21017091663172 -2.60753037687343 -3.56318287427935 -3.53687328709787 -1.72434332720331 -3.31565974289616 -2.81611983513659 0.841394771187953 0.0690161357189476 -0.766527379431401 0.524571170886852 -0.866419193433293 -0.277961972752157 -0.386008964866593 0.0480451294972344 -1.3773720599014 -0.598296103653276 +HEY1 ENSG00000164683 23462 -0.106321613402467 -0.046037873756005 0.395510803703787 0.753263210355833 -0.262421649 1.053443257 0.858979913 0.722132014107287 0.68045594014232 0.678712533199213 0.894845451187677 1.08576910472869 1.19232275018311 1.41157013826778 1.38828225812806 1.21369994376834 1.26664243145019 0.280373064933789 -0.218914822047617 0.477792604436663 -0.155432034417314 -0.641892570585086 -0.35441711974148 -0.513602519622196 -0.430333566386198 -0.788720357282113 -0.279069170375382 +HIP1 ENSG00000127946 3092 -0.118395395582503 0.0139642756969387 0.630454804394845 1.34525071565238 -0.583987041 1.844896649 1.036585044 2.57813074706716 0.709886798129986 2.40704174093162 2.07143640250982 1.66449249485694 2.40548251883532 2.00034894992173 0.842618880906127 2.03570967126957 1.73381828918123 -0.802557525886872 -0.106781964503498 -0.575954956400499 -0.740823005020555 -1.00864571274213 -0.965416471836693 -0.901107993630009 -0.348488881271492 -0.499078218362779 0.108984323941934 +HMCES ENSG00000183624 56941 -0.108322554626517 -0.0297756258342635 0.405213784234334 1.49677862275646 -0.864514836 1.674942405 1.272807675 1.73137368793027 0.967692761031481 1.68778472804836 2.0164892247457 1.74896959194438 2.0672646786163 2.10027766300056 1.15507793117617 1.61466578505582 1.65982799725684 -0.817526162378949 -1.60974070163245 -2.48953328185216 -1.6812054837099 -0.682286479642749 0.798442250127273 -0.5626755426181 -0.930329480771469 -1.27534849550009 0.605055013859399 +ID1 ENSG00000125968 3397 -0.0957006823215091 -0.242635260503384 0.129376571779309 3.0075006640676 -2.028600408 2.287353552 2.606769569 1.73536830796611 1.32130399348304 1.8564778223768 2.73469162467644 2.07180696238295 3.46077028046887 2.83767327863126 2.17647361740899 2.39761396940399 2.28135566145907 -6.66700799474966 -1.01278922011553 -0.79625584146256 -4.60327248766613 -4.37435869210577 0.84557459880386 0.857115912893573 -5.3080881469084 0.123408229229336 0.649669559409934 +IFI6 ENSG00000126709 2537 -0.108563737867068 -0.00263938103237698 0.774842899675119 0.836307629444949 0.043925419 1.505760381 0.895883282 1.59939822469821 0.843250439088635 1.19277472038634 1.68177895428808 1.12542142823777 2.28504343174045 1.95917391069764 1.75629513404907 1.25514672422128 1.35932084012501 0.164071493676273 -0.172711600915919 -0.281063996747023 0.189981358214215 0.325592975513557 -0.337667597938472 0.513452557519377 -0.251862170883326 0.445796902000695 -0.156335734469474 +IL3RA ENSG00000185291 3563 -0.101359008778434 -0.0838085061586147 0.323058824684575 1.16071868812577 -0.645183257 1.291300907 1.132345573 0.257444479439334 1.18595038794527 0.49710093406408 1.91437553769509 1.26644398852946 1.7951570894486 1.32640597901404 1.96029901602216 1.4743054579566 1.23552619626092 0.228432124652763 -0.572678278099442 -1.62393604658206 -0.0680969525516741 -1.65504168135364 0.161726084816856 -1.10552793226629 -0.572478481186482 -0.796456951623272 -0.447774458490814 +INO80D ENSG00000114933 54891 0.116642891515682 -0.105346042240414 -0.896909703996641 0.936541168137376 -0.06993643 -1.723882978 0.922922036 -1.90156406003547 -0.772191329435336 -2.13050512287047 -2.13145484132826 -1.77689603020688 -2.5150373785545 -1.67092979143664 -0.905150353630941 -1.72067693483366 -1.71442394257573 0.048166116470914 0.0170471258686538 0.217445953487283 -0.191689955455187 -0.239983860887735 -0.495533429089901 -0.217744968616372 0.13281429792884 -0.0566939994092799 0.0868084246778521 +INPP5F ENSG00000198825 22876 -0.117623635064692 0.059602005304549 0.60785992327896 1.05916581866928 -0.344967832 1.560687679 0.934340887 1.5209349643018 0.297538055374159 1.52049483626382 1.88942717236191 1.73281801416518 1.93596285615326 2.17028180693865 1.13424626163017 1.67993223123232 1.72524058808007 -0.0952992462316128 -0.343688686969758 0.264385260021869 -0.327293443035739 -0.532277426231096 -0.30594185055549 -0.723945873636846 -0.538944877070273 -0.320699008405938 -0.525973168807251 +JADE2 ENSG00000043143 23338 0.111426479471607 -0.140182619915012 -0.942609793277259 0.997465643462594 -0.113271175 -1.771948412 1.050310707 -2.65691670511292 -0.34015924481566 -2.23703197158703 -2.06306217621092 -1.7173912028994 -1.84709517762765 -2.53749814752962 -0.728605742205504 -1.95424377860367 -1.63747996984153 -0.065999947779811 0.0471266458005646 -0.0437913481069625 -0.0828075314798071 -0.223395673129842 -0.44914164197456 -0.0882178956973911 -0.106837120079732 -0.298489834238674 0.178842597574929 +JARID2 ENSG00000008083 3720 -0.10214061746881 -0.103894178628551 0.285242736948863 1.39964994428993 -0.813654818 1.384140292 1.367650261 1.41256843379551 1.14766069642387 1.35054595400986 1.41658469558511 1.74595102175513 1.79222572335959 1.44477034426126 0.700893795609875 1.28031610898642 1.5498861420341 -1.21706228287114 -0.585734929452608 0.599885314802178 -1.417196514662 -1.60114416403528 -2.11861643721991 -2.6052302405388 -0.156067469351105 0.0927968111179257 0.871821735367284 +KLHL42 ENSG00000087448 57542 0.117672166100889 -0.041867411723608 -0.487589338704035 1.00214625036891 0.392587415 -1.367766093 0.961964899 -1.34904346476075 -0.436243488165201 -1.54727521014443 -1.94161220096146 -1.71844223672847 -1.7379271178579 -1.56422841660548 -0.355162294440104 -1.32001373741678 -1.70771276099429 0.494823346626934 0.323837228903575 0.319019952883855 0.721648500756499 0.472526878737168 0.606232000881228 0.39939458899543 0.753191082744656 -0.359708806101549 0.194909379566363 +LIPH ENSG00000163898 200879 -0.0969637572779244 -0.331438447027387 0.290058771927502 1.36403972756411 -0.818911091 1.399028635 1.288521633 1.02324620764784 2.16067993859555 0.857376027724635 1.2541076016915 1.08540320912621 1.3534919091669 1.07002932658611 2.47081267247142 1.43992867864316 1.27521078054292 -1.81792303471994 -0.542928417861116 -0.486524415036762 -1.99393972873164 -1.45271791607006 -0.992101421384272 -0.540736401353585 -1.68600835075855 0.403750982425991 0.920017789843727 +MEPCE ENSG00000146834 56257 0.110857201173279 -0.105842025647151 -0.684464617913118 1.05728081957286 0.186865871 -1.555795107 1.095508082 -2.10610329942071 -0.83603167671867 -1.74018342505172 -1.75018697115322 -2.40412399989682 -1.52232770804514 -1.31745555867311 0.124774451099305 -2.0728991383638 -1.93341374047123 0.0178622168441258 -0.381020778506975 0.109430037048068 0.522681100407985 0.384160889629007 0.107569778809508 0.589165221770078 0.425907747869008 -0.38750634979037 0.48040884435232 +MSL1 ENSG00000188895 339287 0.116932802272074 -0.0468825813543564 -0.864476499113158 1.08399288832714 0.164010747 -1.892963745 0.770489707 -2.1531810814423 -1.42521565235589 -1.98538720010537 -1.91757133490487 -1.95883395464567 -2.05788987900323 -1.80258241580201 -1.45782397474086 -2.02252000067324 -2.14863196012883 0.104826933861855 0.221404991011183 -0.0433757269796358 0.0634205576249918 -0.258706029151719 0.509487665513796 0.531097749494029 0.021859190046744 0.108784772039193 0.381307368078671 +MXI1 ENSG00000119950 4601 -0.114846560990416 0.0118598256275476 0.790574137035891 1.24801604859971 -0.244456996 1.82560527 1.189144869 1.87677952642934 0.21570594965085 1.68195852298058 2.04681284213998 2.31881463494466 2.65808639875246 2.08627332960386 0.859769373798028 2.25350122422558 2.25835089709459 -0.953153827658053 -0.123311547306751 0.719400921642893 -1.15542326554997 -0.460362641168396 0.0774597632328693 -0.228940762913584 -0.750711794802246 0.428461534561082 0.00201166106004314 +MYBL1 ENSG00000185697 4603 -0.110466827816625 0.0402491292742214 1.31159308939054 1.15468607913503 0.344209781 2.278976397 1.121800911 2.86732363647397 0.714063511930641 2.6510875505656 2.41925012162932 2.0719792511889 2.66613039367622 3.42866015940106 1.71589246006171 2.15773406966993 2.09764281881353 -0.0164196175426683 0.695130034614665 0.411458386457 0.0894244738743599 -0.394027790736873 0.460180817915631 1.13044642194118 0.769968839213129 0.262306573239519 0.0336296754240652 +MYO1E ENSG00000157483 4643 -0.112656353572728 -0.171621235318336 0.2989530835195 0.856690999459654 -0.437888866 1.035795033 0.929574849 1.00953004166855 0.707510322901922 0.897709061025451 1.12073587728241 1.08028286605381 1.25384233645997 1.06329466755561 0.967704272586711 1.16816586254817 1.08917502310248 -0.880148559290309 0.0927954907313553 -0.231258097420665 -1.01703487255673 -0.812988089195517 -0.139875195429891 -1.03153085955808 -0.952475012009702 0.0799079024423304 0.513718631492132 +NEDD9 ENSG00000111859 4739 -0.0970544171968109 -0.0657032529891685 0.961270425894652 1.29209678040918 -0.074623964 1.997164816 1.270488093 2.41152788322203 1.49958285535195 2.24657761399917 2.20295535070588 1.93088783870701 2.1194755534331 1.07366869838731 2.36493890276413 2.08541813833089 2.03661532757524 0.596007541103242 -0.37327000882496 -0.387216694141054 0.78259181323579 -2.17643038614113 -1.02941620041172 0.589238806645725 0.874036104525092 0.707816873083354 -0.329597493658015 +NRROS ENSG00000174004 375387 0.115770087612186 0.0208927136949524 -1.27282630508851 1.44019366883588 0.005915733 -2.551568343 1.125878017 -3.02982492156927 -0.743758834296455 -2.56026355888602 -2.70562633918611 -1.74768959457613 -3.07706214664088 -3.25840668852618 -2.55816029084162 -3.34857257902405 -2.4863184806352 0.237499641289924 0.00865748703867231 -0.19906036220309 0.273156981640458 0.349079209203935 -0.169962791561363 -0.207828760888307 0.456630972684842 -0.740088264959843 0.0510732201665554 +PAPD5 ENSG00000121274 NA -0.112009533328939 -0.0542406604065523 0.319208856928514 0.994265798404055 -0.496620968 1.135038682 1.066852782 1.35790139204344 0.370222703170411 1.25662593715666 1.19751536219436 1.28270587555193 1.50527995075441 1.38792459060474 0.0800528093570884 1.46602044484322 1.44613775663107 -1.42689356330901 0.0408021588398375 -0.104013510973429 -1.01980610429189 -1.3499317960353 -0.19518373715585 0.0945425196335686 -0.714046909554162 -0.4862487875699 0.194570046679091 +POTEM ENSG00000222036 641455 -0.104011418724721 -0.130688893837088 0.526829041783364 0.861497099591138 -0.219905948 1.273564032 0.920303707 0.921093986149298 1.6416594594658 1.0594337735871 1.01568488059228 1.38040150748179 1.75090829375321 0.93485016611622 1.40913890805631 1.04744353133045 1.57502581169344 -0.0869371114282117 0.434132560510882 -0.910787875802013 -0.399882669803007 -0.520920006709995 0.128044665494482 -0.115229416489107 -0.27617369862387 -0.889583706499716 0.438277776791932 +PPIL1 ENSG00000137168 51645 0.113070304484894 -0.153327980697907 -0.81512200092636 1.0212757155144 0.078382147 -1.708626149 0.978019504 -1.90004309449921 -0.63470241130443 -2.08706923085572 -2.03509192548364 -2.11154848318235 -1.45503405966649 -1.8286963332162 -0.64407855879651 -2.23749806305205 -2.15249932692431 0.00391512450669196 0.210728129634777 0.317295618039463 0.0380474922609191 -0.308120504523424 0.137674484887091 -0.00777430576804172 -0.226283284339008 0.551896967857203 0.0664417458980455 +PSD3 ENSG00000156011 23362 -0.104114207866508 -0.178160650794428 0.411515228799268 1.23355764023349 -0.629348791 1.452379249 1.149903688 1.61243429042437 1.59166921431361 1.72575203786902 1.32663244659203 1.37983841892003 1.63753018383187 1.00499957622894 1.87995082561885 1.10416014270573 1.2608253500738 -0.621567752694693 0.392003743435951 -1.15709293374909 -0.676911894472577 -1.23242985307235 -0.106493234903827 -2.18566971564953 -0.927338136492997 -0.581590120792607 0.803601987798828 +PYM1 ENSG00000170473 84305 0.114796921816521 -0.0997975914465534 -0.751188241976306 1.04615492750201 0.120997023 -1.623373507 1.072320604 -1.72418330707826 -0.335259926209934 -1.78077671357962 -2.13859820546852 -1.77641060609166 -2.77714584514589 -1.54014716388136 -0.547208687082485 -1.72475426852057 -1.88925034665065 0.652152855924468 -0.331107921629436 0.0706783644272984 0.511709696887026 -0.161474667477413 -0.176452742948874 -0.0954735612125284 0.290092017012144 0.462533265713949 -0.0126870765137982 +RAB11FIP1 ENSG00000156675 80223 -0.11571098270342 -0.0833290354493941 0.390719016499154 1.32280766123462 -0.785514792 1.566952825 1.072113167 1.16502607657694 1.02522854834701 1.33645263176701 2.52008215485858 1.8473121211521 2.02861975153812 1.18389746857971 1.07901832037104 1.67416759335339 1.8097235867145 -0.715224172404131 -1.02667832624903 -0.339374665900769 -1.72864813577895 -1.73261091692488 -0.236785275959419 -0.868818282347208 -0.802884224709751 -0.634885107065547 0.230761184064369 +RBM22 ENSG00000086589 55696 0.114189701122207 -0.0599835779601613 -0.433180571289005 0.762480562468712 0.235696064 -1.102057207 0.856954781 -0.727437255890293 -0.35518440265208 -1.28917290185674 -1.53987569818867 -1.3288333803745 -1.6103635511967 -0.831864878178367 -0.894017276229118 -1.02059568265038 -1.42322703897109 -0.168122107521946 -0.147416910187546 0.303460742170593 0.20881619919004 0.110827146076116 0.462676533182483 0.607981900241607 0.546274447268146 0.117687679241472 0.314775010746864 +RIPK1 ENSG00000137275 8737 0.111646416287812 -0.151210892086948 -0.63427769800376 1.22165033256193 0.346430353 -1.614985749 1.227353855 -2.16601403159476 -0.0734467289674963 -1.92084949037301 -2.42502127868305 -2.18185128900038 -2.19862719713138 -1.14037355015724 0.0355670275087105 -2.36551273248006 -1.713728223847 0.0183977937256923 0.255278250504282 -0.0410038766254225 0.36929195021783 0.319273413935221 -0.121726859949551 0.930316613248821 1.06392657098578 0.0491881883318221 0.621361490275983 +RNF24 ENSG00000101236 11237 -0.110272517007253 -0.062982602141912 0.740497897826146 1.28125451463835 -0.306602512 1.787598308 1.23286871 1.92564050334233 0.332456453041566 2.03500264445619 2.2532616416118 1.61399126896636 2.31515312673329 2.6403992387021 1.26157770434215 1.72049379955029 1.77800669831672 -1.11790650314326 -0.377145394016563 0.271594868060207 -0.888495093797778 -0.801163494967177 -0.514197382549681 0.132218492222662 -1.14724403211865 1.40529759376096 -0.0289841759905937 +RWDD3 ENSG00000122481 25950 0.113168751711264 -0.0960288447842325 -0.382879691475563 0.868325871716423 0.376919884 -1.142679267 0.908520245 -0.901921958933728 -0.898548087090907 -0.638022511288669 -1.44558986357152 -1.5286378247805 -1.66949145570025 -1.0662017470917 -0.191577041256347 -1.48893057583077 -1.59787160369776 0.503573240599843 0.14219452919428 0.47207951659741 0.54552032963527 -0.0044844542881355 0.265815350324897 0.867611569149815 0.0455607208820445 0.563417856043821 0.36791018159164 +SESN3 ENSG00000149212 143686 -0.115843751139025 0.00274726817238892 0.40430822623324 0.742533634819208 -0.253750134 1.062366586 0.833071624 1.11127202405147 0.467691404188594 1.10987967444611 1.19233139211805 1.1906167129132 1.60661971856923 0.76646832335798 0.824054292931303 1.12447822866425 1.23025409004867 0.122700705662282 -0.128215638063881 -0.263666742160304 0.108415454734223 -0.796625483447211 -0.189396272444793 -0.698295093992135 -0.452986144362518 -0.331711243489711 0.0922791209399965 +SGTB ENSG00000197860 54557 -0.11456347298121 0.096648561915271 0.541032084315284 1.03152101870423 -0.314418609 1.396482778 1.072347498 1.91490767853161 -0.0727497362231441 1.98909650426687 1.51065905377136 1.67878642898379 1.66099259229853 1.66548448071473 0.145822371186158 1.75629767509073 1.71553072698174 -0.614835228125111 0.123369602654612 -0.532272143805167 -0.566523790867178 -0.631493525054093 0.173191270436678 -0.252165466567524 -0.369011362268054 -0.341363382897598 -0.133082062803261 +SLC12A6 ENSG00000140199 9990 -0.11358468311874 0.0448771101569697 0.712329154216324 1.12212818062305 -0.215033304 1.639691612 1.126735972 1.87625448810951 0.630146653237944 1.97780416737572 2.20627824658073 1.81396520809747 2.38305839140705 1.13483344480889 0.521062540739823 1.94209073306001 1.91142225155369 -0.000359295097564966 -0.266573989050545 0.191862071434292 -0.719066098171281 -0.690411996041506 0.714530217924477 -1.2322367408388 -0.285584408157995 -0.247566251240723 0.385073448595298 +SMIM14 ENSG00000163683 201895 -0.102420469019492 -0.0919341155203945 0.301578614255917 0.92408237396598 -0.511914229 1.115071457 0.923047643 1.13487833374197 1.2862395573668 0.778149686795043 1.01658764196313 0.89493400419795 1.25534626928157 0.912128649069267 1.6392594909138 1.33523764080173 0.897953296787432 -0.260974119595178 -0.557831414130239 -1.55087009791298 -0.192836094442804 -0.647778759003938 -0.277652660760614 -0.573487382455468 -0.066877532984787 -1.14138846027672 0.150554235762382 +SRGAP3 ENSG00000196220 9901 -0.096967719935634 -0.0489508168143786 0.0905676044930637 1.45305476818893 -1.021147886 1.202283095 1.440428644 2.04005876404991 0.339393237098264 1.80921714901694 0.847159931133155 1.27181546133541 1.56046112278174 1.37966494816462 1.32890743030808 1.08991377811342 0.356239131281975 -1.61808296780599 -0.236747345844681 -2.59268789344583 -0.243510833076679 -1.31347482271908 -1.30940461870101 -3.06158678209835 0.242098754165028 -0.606900421907814 0.528818068012165 +SRSF4 ENSG00000116350 6429 0.115758338479034 0.00465455574382241 -0.645733263223268 0.909683904035991 0.175001354 -1.46646788 0.869154554 -1.37248813973075 -0.6032257857285 -1.47566684172439 -1.6303111448225 -1.3505752998409 -2.2315823789811 -1.57890446122009 -1.51759956406327 -1.54331416692212 -1.36101101752224 -0.0786138569113874 0.0738556224997808 0.391077822084405 -0.0550851991622114 0.535720188780904 0.242951787824876 0.232124472026988 0.40609614983415 -0.453274124059304 0.4551606731723 +ST3GAL5 ENSG00000115525 8869 -0.115816759011828 0.00111887350333869 0.421429446854057 0.937824087824182 -0.414040601 1.256899495 0.906441145 0.786576641119842 0.737583340751888 0.840109363018157 1.75370681930038 1.52120729590649 1.72185945636627 1.29952897183328 0.689859821307484 1.85228420991824 1.36627903042208 -0.398047172430935 -0.234106874354983 0.147682304373335 -0.986692192243534 -0.439325024527266 -0.768726572282727 -0.396507520779672 -0.535301033708083 -0.288518500502567 -0.240863426406545 +SUV39H1 ENSG00000101945 6839 0.116245475917133 -0.0561633505063655 -0.935487192140996 1.11344717457971 -0.003484377 -1.867490008 1.101619215 -1.98196779739734 -0.702791398322507 -2.04569665795221 -2.38750120176226 -2.30177630511242 -2.70087219908843 -1.71824536171903 -0.39542531274804 -2.10658412598834 -2.33403971637315 0.564304175913833 -0.325530270079264 -0.179747063572005 0.409441161565861 0.362096030091796 -0.189426365320517 -0.291068440113996 0.258364953071446 -0.237020424862632 -0.40625752305072 +SWT1 ENSG00000116668 54823 -0.109124795366451 -0.0687862132972214 0.444209302759354 1.70241379356046 -0.866150392 1.754568998 1.588566059 2.7022610868961 -0.461513451811438 2.45327125668153 2.01180268316847 1.91073197482178 2.17609424847096 2.70933163522712 0.360861621050548 1.93410319047456 1.74874573095063 -1.46546112744847 -0.401714491067565 -0.367564406632074 -1.58954681336819 -2.76255410754864 -0.750688022328468 -1.21720368586911 -1.6918165696806 0.72335613607434 0.86168916712559 +TBC1D16 ENSG00000167291 125058 -0.117807809877502 -0.0194807919953607 0.266260862256129 0.811359130994247 -0.444939523 0.977461247 0.88004577 1.08285956634671 0.296063755523387 0.872149095284953 1.32401946768416 1.12257010587165 1.39252082527627 1.20578539330653 0.421613524754419 0.986278810107057 1.07075192643571 -0.687707178889573 -0.146813942615512 -0.792453646699627 -0.883085561954978 -0.583062051684348 0.0773531609975098 -0.688391774303377 -0.598777419184428 -0.30789877406584 0.161441962931898 +TMCC2 ENSG00000133069 9911 -0.109580177163419 -0.0500627586249602 1.0561205384496 1.08665839622907 0.067776909 2.044464168 0.916867113 1.82334620632524 1.60599117432848 1.80474919611095 1.99924449144238 2.02948703644784 2.31556422922357 2.16834764437457 2.42604659214077 2.223136245917 2.04872886323484 0.511119374697938 -0.25379040680848 -0.798557393282312 0.307675099413977 -0.604467379209877 0.0768037623838658 0.873692913094471 0.417463944938163 0.0798988843953886 0.0679302898231469 +TMCC3 ENSG00000057704 57458 -0.10406811776048 -0.268330562490066 0.398254263700737 1.41387807832414 -0.814184731 1.610693259 1.206016401 1.47505264567782 1.99288646338923 1.07814288991497 1.57049880725517 1.62025162824799 1.46901725786914 1.29558392156426 2.42616296967763 1.57796044274339 1.60137556257619 -1.80566501975385 -0.31504592763967 -0.37921008598796 -1.52098515983324 -1.54936452938471 -1.4282372398877 -1.22887426491086 -1.08055444682484 0.158431750039187 1.0076576092826 +TMEM2 ENSG00000135048 NA -0.104642494153204 -0.181365357260652 0.385860197101723 1.00685208238134 -0.464914581 1.236634975 1.031118994 0.956039309276942 0.808715249927528 1.18044883377672 1.36269633436076 1.03193951428966 1.86497159120603 0.854034148278684 2.08601605160765 0.986239019934263 1.23524969849683 -0.493841151125819 0.212506150035793 -0.852278836724219 -0.545970835903414 -1.54207859949032 -0.117922356406604 0.140748023457281 -1.03848911447895 0.246724702886289 -0.658543791370634 +TMEM87A ENSG00000103978 25963 0.111167184059806 -0.131886383617334 -0.745158237294426 0.876045589321424 -0.002803 -1.487513474 0.960245073 -1.22419448436073 -0.451152031409357 -1.22771482743513 -1.57134735578803 -1.85841219998584 -2.36727926552615 -1.39491355143601 -1.04988614760329 -2.09507138409502 -1.63516349733413 -0.0765066516560908 -0.0812107576094481 0.29374150255037 -0.155338032461432 -0.040805555762857 -0.318204471276945 -0.393320252154501 -0.179993832981288 0.465640101950121 0.457967948487244 +TMOD2 ENSG00000128872 29767 -0.114624757453467 0.042663584291205 0.784030295658191 0.942468661699027 -0.020300088 1.588360679 0.983255169 2.25952259303781 0.625248812931562 1.86312881989556 1.59914082128788 1.55133253161819 1.77147227966315 2.06151437704912 0.584048288707535 2.11813500782508 1.45006325845504 0.0276971756632189 0.0264191035331783 0.411594316737363 -0.0122419046747426 -0.285008409187616 -0.203683565209589 -0.313502117895326 -0.43737670568816 0.00199871100871503 0.581102518405858 +TNFRSF19 ENSG00000127863 55504 -0.104153533101265 0.13042949165798 1.23671996116514 1.214948311046 0.263153561 2.210286362 1.226137713 1.93512767259722 1.09047928028092 1.82257186273115 3.13603849107181 2.09242537469708 3.25105600131924 1.82942928807878 1.82552661716289 2.38142199735747 2.73878703231657 1.33935789061342 0.879845422696482 -0.669277380292548 1.18243902796047 0.0779050034348614 0.256697359629068 -0.51979886229815 0.620216632353369 -0.748268107346347 0.212418618939091 +TPCN1 ENSG00000186815 53373 -0.108250707614084 -0.0662847041985858 0.506136766179283 0.704014691382904 -0.12464156 1.136915092 0.800281738 0.685925672635674 1.46490890733012 0.844112838288798 1.26813762467656 1.20935569399353 1.43077407772143 1.09050555827395 0.941180776375894 1.19922199760607 1.23502777186721 -0.0469360635808745 -0.155712019385466 0.344865071087471 -0.155889661485929 -0.286592095131397 -0.108270936051708 -0.507556496536372 -0.287273581141203 0.45319654338283 -0.496246356340926 +TRIM8 ENSG00000171206 81603 0.116174787253591 -0.0480135530430373 -0.643069320687886 0.880006547247261 0.127704527 -1.413843169 0.912183934 -1.69841376326169 -0.819289229606462 -1.64744933033699 -1.57944168485357 -1.47369745538592 -1.69104635623747 -1.58549453893317 -0.371050405307364 -1.57433196611966 -1.69821695829714 0.562401270134465 0.10033893732151 -0.429885008606474 0.412826110650992 -0.00677246403593856 0.173403865872017 0.632251422464174 0.122668238477289 -0.0900518015687727 -0.20013529612755 +TUBB2A ENSG00000137267 7280 -0.106072318828512 0.0989495147762541 0.442592742804574 0.955547419693442 -0.358129226 1.243314712 1.016933084 0.633945328565739 0.462656842934685 0.48030895329207 1.80030955664763 1.42742005754151 2.14949190990896 1.41392658875885 1.11352594392813 1.41486814867488 1.53669378621475 -0.0376368857543304 -0.458300132905683 -0.902828655655838 0.00291142589294768 -0.239233031925052 -0.330902704149092 0.194411491836726 -0.0898855358001361 -1.17617350474338 -0.54365472717188 +TULP4 ENSG00000130338 56995 -0.112705290795693 -0.0843324495612053 -0.0664895947340188 0.882330026985372 -0.832893844 0.699914655 0.926771832 0.734948188752572 0.271423872777295 0.670688023671465 0.937013483546324 0.850452977417604 0.788160626121593 0.638865268941213 0.5105149973896 0.762821486178853 0.834257622821759 -0.924500851714939 -0.0603029840595104 -0.733778680778632 -0.859011893417096 -1.18525076171509 -0.972994140401127 -1.94246851173293 -1.01273225334564 -0.600729564482136 -0.0371688006515528 +UGCG ENSG00000148154 7357 -0.110401432511903 -0.162688040656041 0.348258591665568 0.807096981347818 -0.395372021 1.091889204 0.786024059 1.22631575198262 1.33514558250329 1.03282933384475 0.981460975100967 1.07495045548928 0.990097922522802 0.716274395260178 1.28685557673281 1.0717471906147 1.20321485598627 -0.561084476459815 -0.0938851814370223 -0.197828371646125 -0.882939230031379 -0.534634422560634 0.013890326669308 -0.578950465880735 -0.555995520238094 -0.701810879955807 0.139518014814004 +YARS2 ENSG00000139131 51067 0.117283421381352 -0.0236930857924905 -0.800930295866305 0.959319348424595 0.034972352 -1.636832944 0.95717873 -1.79248194703197 -0.754580424624325 -1.85567914251188 -1.91253501058333 -2.101262139145 -2.07182237767349 -1.72992782599772 -0.651225155369326 -1.68900084300383 -1.80981457368122 0.536284261436444 -0.362431317080951 -0.112757358164488 0.574096065506085 0.227686519875822 0.0296173232023644 -0.0918210623485467 -0.0693409812448635 0.18267253170634 -0.564282460592211 +YES1 ENSG00000176105 7525 -0.114055335670007 -0.0720984983169298 -0.101045323832636 1.12684491647082 -1.066686994 0.864596346 1.067123487 0.932188976405415 0.0754169991211152 1.03840365481684 0.967312809767319 1.0926617493808 1.07877649173691 0.998788225750827 0.0665682468474849 1.23636836404743 1.15947794563262 -1.76064520728391 -1.00892624031373 -1.49441173064163 -1.7352427852479 -1.67504302119043 -1.00165825009822 -0.828433163576943 -1.09704706960235 0.237006404573579 -0.302468876777942 +ZBTB1 ENSG00000126804 22890 0.11234831846302 -0.180742191453739 -0.721673682496061 0.890498678151005 0.040590229 -1.483937594 0.953066987 -1.97925512646172 -0.651186677781044 -1.74587661010427 -1.83862315487785 -1.71351897233554 -1.6417184467918 -1.44089574660485 -0.336210002067086 -1.710875991302 -1.78121520705647 -0.121962728187988 0.0102072064120253 0.134861822830987 -0.256156346626695 -0.343332617203705 0.26960653727597 0.590945019755427 -0.222701639010958 0.322228453885628 0.0222065763307115 +ZFX ENSG00000005889 7543 0.111809345690194 -0.192640284128349 -1.20389518761952 1.16140300981912 -0.261680495 -2.14610988 1.176883318 -2.59272447160442 -0.483611767904587 -2.23205456496228 -2.87069107848749 -2.27192239719118 -3.51777070199779 -2.14715017721576 -0.82489855283218 -2.22267520412108 -2.29759988246655 -0.524976311651757 -0.115321824588328 0.3041260738562 -0.539244782188214 -0.431471407423881 -0.478876690370256 -0.235056444443734 -0.379244678408484 -0.308346975698575 0.0916080873098547 +ZFY ENSG00000067646 7544 0.108434379214724 -0.22701303872214 -1.46036152122849 1.49413322339815 -0.256848084 -2.663874959 1.379868394 -2.3424055397872 -0.839856896857111 -2.0563067282924 -3.34708790637885 -3.87451800280626 -4.19607521661711 -2.88348538589511 -0.960337889897596 -2.90787490941914 -3.23080111205558 -0.69157194212626 0.0930836684854476 0.0446385757117031 -0.768443074618561 -0.857382852300512 -0.109632994680598 -0.0298914228176335 -0.811446147138391 0.119300151709157 0.442865201212179 +ZNF280C ENSG00000056277 55609 -0.10901448269288 -0.211047961749763 0.139457503560985 0.880404171332318 -0.620689178 0.899604185 0.935232767 0.961611841415977 0.493117266462745 0.923071753156949 0.917133327665193 0.806595168807596 0.943128119624359 0.958580653239129 1.41124746186979 0.843506767023505 0.738049494839476 -0.680245504802492 -0.18525732779693 -0.18197583464248 -0.927102995221188 -1.58537782076283 -0.47771475791831 -0.997937289663422 -1.14990709275341 0.211246900521402 -0.232620059845354 +ZNF282 ENSG00000170265 8427 0.115053404298516 -0.0120868757435613 -0.545678447343974 0.605935725075445 0.009663416 -1.101020311 0.727391679 -1.3316277363857 -0.910823341072612 -1.12733797736612 -1.22651266574232 -0.880160756590216 -1.40130518809238 -1.07664718650575 -0.848650956175081 -1.16353604542517 -1.04360125451607 -0.196817532573303 0.241861823483116 -0.0832274815680343 -0.0928042015202604 -0.0279712987774829 -0.0398723924986975 0.533274634388996 0.0756895277118665 -0.294976706270746 -0.0185222113835219 +ZNF383 ENSG00000188283 163087 0.1054993201924 -0.0956893578778185 -0.499682429493632 0.962250935171608 0.300588452 -1.299953311 1.031066406 -1.32364791195613 -0.922389300822329 -1.31410255458144 -1.51531072276698 -1.46537208483228 -1.47040184009961 -1.10830602537613 -0.682599774539738 -1.57837470665135 -1.61902818965651 -0.386593808790548 0.275993952279023 1.0731394834613 0.0702894602140562 -0.38303435907183 0.176493332208175 1.78476797753015 0.302853216447656 0.083232178496063 0.00874308863581004 diff --git a/scripts/render_DESeq2_report.parallel.R b/scripts/render_DESeq2_report.parallel.R index 63ce3387..51bc4a2f 100644 --- a/scripts/render_DESeq2_report.parallel.R +++ b/scripts/render_DESeq2_report.parallel.R @@ -117,11 +117,28 @@ if (params$generate_tgxddi_report) { } } +if (params$generate_tgxhdaci_report) { + if (params$species == "human") { + base::mapply(FUN = make_hdaci_reports, facet = facets, MoreArgs = list(pars = params, paths = paths)) + # Concatenate all the TGxHDACi output csv files into one + tgxhdaci_files <- list.files(paths$reports_dir, pattern = "_tgx-HDACi_results.csv", full.names = TRUE) + tgxhdaci_df <- readr::read_csv(tgxhdaci_files[1], show_col_types = FALSE) + for (i in 2:length(tgxhdaci_files)) { + tgxhdaci_df <- dplyr::bind_rows(tgxhdaci_df, readr::read_csv(tgxhdaci_files[i], show_col_types = FALSE)) + } + # Write out the concatenated file + readr::write_csv(tgxhdaci_df, file.path(paths$reports_dir, paste0("tgx-hdaci_results_summary.csv"))) + # Delete the individual files + file.remove(tgxhdaci_files) + } + else { + message("TGx-HDACi report generation is currently only human datasets. Your parameters indicate that the data is from", params$species, ". Skipping TGx-HDACi analysis.") + } +} -# Add back after troubleshooting above code... -# if (!is.na(params$reports_facet)) { -# summarize_across_facets(overallResListAll, overallResListDEGs, filtered_table, facets, params) -# } +if (!is.na(params$reports_facet)) { + summarize_across_facets(overallResListAll, overallResListDEGs, filtered_table, facets, params) +} # NOTE Manually clean up temporary files # This is required because of the clean_tmpfiles_mod() workaround!