Last updated: 2024-02-06
Checks: 7 0
Knit directory: Cardiotoxicity/
This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20230109)
was run prior to running
the code in the R Markdown file. Setting a seed ensures that any results
that rely on randomness, e.g. subsampling or permutations, are
reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version e26b249. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for
the analysis have been committed to Git prior to generating the results
(you can use wflow_publish
or
wflow_git_commit
). workflowr only checks the R Markdown
file, but you know if there are other scripts or data files that it
depends on. Below is the status of the Git repository when the results
were generated:
Ignored files:
Ignored: .RData
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: analysis/figure/
Ignored: analysis/variance_values by gene.png
Ignored: data/41588_2018_171_MOESM3_ESMeQTL_ST2_for paper.csv
Ignored: data/Arr_GWAS.txt
Ignored: data/Arr_geneset.RDS
Ignored: data/BC_cell_lines.csv
Ignored: data/BurridgeDOXTOX.RDS
Ignored: data/CADGWASgene_table.csv
Ignored: data/CAD_geneset.RDS
Ignored: data/CALIMA_Data/
Ignored: data/CMD04_75DRCviability.csv
Ignored: data/CMD04_87DRCviability.csv
Ignored: data/CMD05_75DRCviability.csv
Ignored: data/CMD05_87DRCviability.csv
Ignored: data/Clamp_Summary.csv
Ignored: data/Cormotif_24_k1-5_raw.RDS
Ignored: data/Counts_RNA_ERMatthews.txt
Ignored: data/DAgostres24.RDS
Ignored: data/DAtable1.csv
Ignored: data/DDEMresp_list.csv
Ignored: data/DDE_reQTL.txt
Ignored: data/DDEresp_list.csv
Ignored: data/DEG-GO/
Ignored: data/DEG_cormotif.RDS
Ignored: data/DF_Plate_Peak.csv
Ignored: data/DRC48hoursdata.csv
Ignored: data/Da24counts.txt
Ignored: data/Dx24counts.txt
Ignored: data/Dx_reQTL_specific.txt
Ignored: data/EPIstorelist24.RDS
Ignored: data/Ep24counts.txt
Ignored: data/FC_necela.RDS
Ignored: data/FC_necela_names.RDS
Ignored: data/Full_LD_rep.csv
Ignored: data/GOIsig.csv
Ignored: data/GOplots.R
Ignored: data/GTEX_setsimple.csv
Ignored: data/GTEX_sig24.RDS
Ignored: data/GTEx_gene_list.csv
Ignored: data/HFGWASgene_table.csv
Ignored: data/HF_geneset.RDS
Ignored: data/Heart_Left_Ventricle.v8.egenes.txt
Ignored: data/Heatmap_mat.RDS
Ignored: data/Heatmap_sig.RDS
Ignored: data/Hf_GWAS.txt
Ignored: data/K_cluster
Ignored: data/K_cluster_kisthree.csv
Ignored: data/K_cluster_kistwo.csv
Ignored: data/Knowles_log2cpm_real.RDS
Ignored: data/Knowles_variation_data.RDS
Ignored: data/Knowles_variation_data_conc.RDS
Ignored: data/Knowlesvarlist.RDS
Ignored: data/LD50_05via.csv
Ignored: data/LDH48hoursdata.csv
Ignored: data/Mt24counts.txt
Ignored: data/NoRespDEG_final.csv
Ignored: data/RINsamplelist.txt
Ignored: data/RNA_seq_trial.RDS
Ignored: data/Schneider_GWAS.txt
Ignored: data/Seonane2019supp1.txt
Ignored: data/Sup_replicate_values.csv
Ignored: data/TMMnormed_x.RDS
Ignored: data/TOP2Bi-24hoursGO_analysis.csv
Ignored: data/TR24counts.txt
Ignored: data/TableS10.csv
Ignored: data/TableS11.csv
Ignored: data/TableS9.csv
Ignored: data/Top2_expression.RDS
Ignored: data/Top2biresp_cluster24h.csv
Ignored: data/Var_test_list.RDS
Ignored: data/Var_test_list24.RDS
Ignored: data/Var_test_list24alt.RDS
Ignored: data/Var_test_list3.RDS
Ignored: data/Vargenes.RDS
Ignored: data/Viabilitylistfull.csv
Ignored: data/allexpressedgenes.txt
Ignored: data/allfinal3hour.RDS
Ignored: data/allgenes.txt
Ignored: data/allmatrix.RDS
Ignored: data/allmymatrix.RDS
Ignored: data/annotation_data_frame.RDS
Ignored: data/averageviabilitytable.RDS
Ignored: data/averageviabilitytable.csv
Ignored: data/avgLD50.RDS
Ignored: data/avg_LD50.RDS
Ignored: data/avg_via_table.csv
Ignored: data/backGL.txt
Ignored: data/burr_genes.RDS
Ignored: data/calcium_data.RDS
Ignored: data/clamp_summary.RDS
Ignored: data/cormotif_3hk1-8.RDS
Ignored: data/cormotif_initalK5.RDS
Ignored: data/cormotif_initialK5.RDS
Ignored: data/cormotif_initialall.RDS
Ignored: data/cormotifprobs.csv
Ignored: data/counts24hours.RDS
Ignored: data/cpmcount.RDS
Ignored: data/cpmnorm_counts.csv
Ignored: data/crispr_genes.csv
Ignored: data/ctnnt_results.txt
Ignored: data/cvd_GWAS.txt
Ignored: data/dat_cpm.RDS
Ignored: data/data_outline.txt
Ignored: data/drug_noveh1.csv
Ignored: data/efit2.RDS
Ignored: data/efit2_final.RDS
Ignored: data/efit2results.RDS
Ignored: data/ensembl_backup.RDS
Ignored: data/ensgtotal.txt
Ignored: data/filcpm_counts.RDS
Ignored: data/filenameonly.txt
Ignored: data/filtered_cpm_counts.csv
Ignored: data/filtered_raw_counts.csv
Ignored: data/filtermatrix_x.RDS
Ignored: data/folder_05top/
Ignored: data/framefun24.RDS
Ignored: data/geneDoxonlyQTL.csv
Ignored: data/gene_corr_df.RDS
Ignored: data/gene_corr_frame.RDS
Ignored: data/gene_prob_tran3h.RDS
Ignored: data/gene_probabilityk5.RDS
Ignored: data/geneset_24.RDS
Ignored: data/gostresTop2bi_ER.RDS
Ignored: data/gostresTop2bi_LR
Ignored: data/gostresTop2bi_LR.RDS
Ignored: data/gostresTop2bi_TI.RDS
Ignored: data/gostrescoNR
Ignored: data/gtex/
Ignored: data/heartgenes.csv
Ignored: data/highly_var_genelist.RDS
Ignored: data/hsa_kegg_anno.RDS
Ignored: data/individualDRCfile.RDS
Ignored: data/individual_DRC48.RDS
Ignored: data/individual_LDH48.RDS
Ignored: data/indv_noveh1.csv
Ignored: data/kegglistDEG.RDS
Ignored: data/kegglistDEG24.RDS
Ignored: data/kegglistDEG3.RDS
Ignored: data/knowfig4.csv
Ignored: data/knowfig5.csv
Ignored: data/label_list.RDS
Ignored: data/ld50_table.csv
Ignored: data/mean_vardrug1.csv
Ignored: data/mean_varframe.csv
Ignored: data/mymatrix.RDS
Ignored: data/new_ld50avg.RDS
Ignored: data/nonresponse_cluster24h.csv
Ignored: data/norm_LDH.csv
Ignored: data/norm_counts.csv
Ignored: data/old_sets/
Ignored: data/organized_drugframe.csv
Ignored: data/pca_all_anno.csv
Ignored: data/plan2plot.png
Ignored: data/plot_intv_list.RDS
Ignored: data/plot_list_DRC.RDS
Ignored: data/qval24hr.RDS
Ignored: data/qval3hr.RDS
Ignored: data/qvalueEPItemp.RDS
Ignored: data/raw_counts.csv
Ignored: data/response_cluster24h.csv
Ignored: data/sampsettrz.RDS
Ignored: data/schneider_closest_output.RDS
Ignored: data/sigVDA24.txt
Ignored: data/sigVDA3.txt
Ignored: data/sigVDX24.txt
Ignored: data/sigVDX3.txt
Ignored: data/sigVEP24.txt
Ignored: data/sigVEP3.txt
Ignored: data/sigVMT24.txt
Ignored: data/sigVMT3.txt
Ignored: data/sigVTR24.txt
Ignored: data/sigVTR3.txt
Ignored: data/siglist.RDS
Ignored: data/siglist_final.RDS
Ignored: data/siglist_old.RDS
Ignored: data/slope_table.csv
Ignored: data/supp10_24hlist.RDS
Ignored: data/supp10_3hlist.RDS
Ignored: data/supp_normLDH48.RDS
Ignored: data/supp_pca_all_anno.RDS
Ignored: data/supp_viadata.csv
Ignored: data/table3a.omar
Ignored: data/test_run_sample_list.txt
Ignored: data/testlist.txt
Ignored: data/toplistall.RDS
Ignored: data/trtonly_24h_genes.RDS
Ignored: data/trtonly_3h_genes.RDS
Ignored: data/tvl24hour.txt
Ignored: data/tvl24hourw.txt
Ignored: data/venn_code.R
Ignored: data/viability.RDS
Untracked files:
Untracked: .RDataTmp
Untracked: .RDataTmp1
Untracked: .RDataTmp2
Untracked: .RDataTmp3
Untracked: 3hr all.pdf
Untracked: Code_files_list.csv
Untracked: Data_files_list.csv
Untracked: Doxorubicin_vehicle_3_24.csv
Untracked: Doxtoplist.csv
Untracked: EPIqvalue_analysis.Rmd
Untracked: Final.sup.pdf
Untracked: GWAS_list_of_interest.xlsx
Untracked: KEGGpathwaylist.R
Untracked: NA
Untracked: OmicNavigator_learn.R
Untracked: SNP_egenes_allfiles.RDS
Untracked: SNP_frame_pdf
Untracked: SNP_frame_pdf.pdf
Untracked: SigDoxtoplist.csv
Untracked: analysis/DRC_viability_check.Rmd
Untracked: analysis/New_code_dec-23.R
Untracked: analysis/cellcycle_kegg_genes.R
Untracked: analysis/ciFIT.R
Untracked: analysis/export_to_excel.R
Untracked: analysis/featureCountsPLAY.R
Untracked: cleanupfiles_script.R
Untracked: code/biomart_gene_names.R
Untracked: code/constantcode.R
Untracked: code/corMotifcustom.R
Untracked: code/cpm_boxplot.R
Untracked: code/extracting_ggplot_data.R
Untracked: code/movingfilesto_ppl.R
Untracked: code/pearson_extract_func.R
Untracked: code/pearson_tox_extract.R
Untracked: code/plot1C.fun.R
Untracked: code/spearman_extract_func.R
Untracked: code/venndiagramcolor_control.R
Untracked: cormotif_p.post.list_4.csv
Untracked: figS1024h.pdf
Untracked: final.pdf
Untracked: individual-legenddark2.png
Untracked: installed_old.rda
Untracked: listoftranscripts
Untracked: motif_ER.txt
Untracked: motif_LR.txt
Untracked: motif_NR.txt
Untracked: motif_TI.txt
Untracked: output/ABHD8_dif_values.RDS
Untracked: output/C3orf18_dif_values.RDS
Untracked: output/Cardiotox_dif_values.RDS
Untracked: output/DNR_DEGlist.csv
Untracked: output/DNRvenn.RDS
Untracked: output/DOX_DEGlist.csv
Untracked: output/DOX_de_goi.csv
Untracked: output/DOXvenn.RDS
Untracked: output/EEF1B2_dif_values.RDS
Untracked: output/EEIG1_dif_values.RDS
Untracked: output/EPI_DEGlist.csv
Untracked: output/EPIvenn.RDS
Untracked: output/ESGN_rds.RDS
Untracked: output/FC_necela.RDS
Untracked: output/FC_necela_names.RDS
Untracked: output/FRS2_dif_values.RDS
Untracked: output/Figures/
Untracked: output/GTEXv8_gene_median_tpm.RDS
Untracked: output/GTEXv8_gene_tpm_heart_left_ventricle.RDS
Untracked: output/HDDC2_dif_values.RDS
Untracked: output/HER2_gene.RDS
Untracked: output/KEGGcellcyclegenes.RDS
Untracked: output/Knowles_S13.csv
Untracked: output/Knowles_log2cpm.csv
Untracked: output/Knowles_supp13.csv
Untracked: output/LD50tox_table.RDS
Untracked: output/MTX_DEGlist.csv
Untracked: output/MTXvenn.RDS
Untracked: output/PEX16_dif_values.RDS
Untracked: output/RASIP1_dif_values.RDS
Untracked: output/RMI1_dif_values.RDS
Untracked: output/RSID_QTL_list_full.txt
Untracked: output/SETA_analysis_reyes.RDS
Untracked: output/SGWAS_top50_order.csv
Untracked: output/SLC27A1_dif_values.RDS
Untracked: output/SLC28A3_dif_values.RDS
Untracked: output/SNP_egenes_allfiles.RDS
Untracked: output/SNP_list_ID.RDS
Untracked: output/SNP_list_full.txt
Untracked: output/SNP_supp.RDS
Untracked: output/TGFBR3L_dif_values.RDS
Untracked: output/TNS2_dif_values.RDS
Untracked: output/TOP_50SNPreffile.csv
Untracked: output/TRZ_DEGlist.csv
Untracked: output/TableS8.csv
Untracked: output/Volcanoplot_10
Untracked: output/Volcanoplot_10.RDS
Untracked: output/ZNF740_dif_values.RDS
Untracked: output/allfinal_sup10.RDS
Untracked: output/counts_v8_heart_left_ventricle_gct.RDS
Untracked: output/crisprfoldchange.RDS
Untracked: output/endocytosisgenes.csv
Untracked: output/expre7k.csv
Untracked: output/expressed_egenes_by_RSID.csv
Untracked: output/gene_corr_fig9.RDS
Untracked: output/genes.RDS
Untracked: output/legend_b.RDS
Untracked: output/motif_ERrep.RDS
Untracked: output/motif_LRrep.RDS
Untracked: output/motif_NRrep.RDS
Untracked: output/motif_TI_rep.RDS
Untracked: output/near_genes_SNP1.RDS
Untracked: output/necela_list_test.RDS
Untracked: output/necela_val_genes.RDS
Untracked: output/output-old/
Untracked: output/rank24genes.csv
Untracked: output/rank3genes.csv
Untracked: output/sequencinginformationforsupp.csv
Untracked: output/sequencinginformationforsupp.prn
Untracked: output/sigVDA24.txt
Untracked: output/sigVDA3.txt
Untracked: output/sigVDX24.txt
Untracked: output/sigVDX3.txt
Untracked: output/sigVEP24.txt
Untracked: output/sigVEP3.txt
Untracked: output/sigVMT24.txt
Untracked: output/sigVMT3.txt
Untracked: output/sigVTR24.txt
Untracked: output/sigVTR3.txt
Untracked: output/supplementary_motif_list_GO.RDS
Untracked: output/test_biomart_run.RDS
Untracked: output/toptablebydrug.RDS
Untracked: output/trop_knowles_fun.csv
Untracked: output/tvl24hour.txt
Untracked: output/x_counts.RDS
Untracked: reneebasecode.R
Unstaged changes:
Modified: analysis/DRC_analysis.Rmd
Modified: analysis/Figure4.Rmd
Modified: analysis/Figure5.Rmd
Modified: analysis/GTEx_genes.Rmd
Deleted: analysis/Knowles2019.Rmd
Modified: output/daplot.RDS
Modified: output/dxplot.RDS
Modified: output/epplot.RDS
Modified: output/mtplot.RDS
Modified: output/plan2plot.png
Modified: output/trplot.RDS
Modified: output/veplot.RDS
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were
made to the R Markdown (analysis/Figure6.Rmd
) and HTML
(docs/Figure6.html
) files. If you’ve configured a remote
Git repository (see ?wflow_git_remote
), click on the
hyperlinks in the table below to view the files as they were in that
past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | e26b249 | reneeisnowhere | 2024-02-06 | updates |
html | ffba2b7 | reneeisnowhere | 2023-09-28 | Build site. |
Rmd | 87a496b | reneeisnowhere | 2023-09-28 | updates to figure links and CSS script |
html | 659fb87 | reneeisnowhere | 2023-08-15 | Build site. |
Rmd | ef9bad6 | reneeisnowhere | 2023-08-15 | update svg file |
html | c6faf91 | reneeisnowhere | 2023-07-28 | Build site. |
Rmd | f6abb9a | reneeisnowhere | 2023-07-28 | new figures update |
html | c40aced | reneeisnowhere | 2023-07-26 | Build site. |
Rmd | 58c7965 | reneeisnowhere | 2023-07-26 | updating figures |
html | ed18a48 | reneeisnowhere | 2023-07-07 | Build site. |
Rmd | 5930353 | reneeisnowhere | 2023-07-07 | code and plot updates done Friday before Michelle notes |
Rmd | 63d054a | reneeisnowhere | 2023-07-07 | Various changes to graphs. pending Monday-renames |
html | 2bcfa8d | reneeisnowhere | 2023-07-06 | Build site. |
Rmd | 19105b6 | reneeisnowhere | 2023-07-06 | update plots |
html | 89df05b | reneeisnowhere | 2023-06-27 | Build site. |
Rmd | ba2c143 | reneeisnowhere | 2023-06-27 | update the word figure5 to figure6 |
html | c22730e | reneeisnowhere | 2023-06-27 | Build site. |
Rmd | 00162ac | reneeisnowhere | 2023-06-27 | update in Fig6 |
library(tidyverse)
library(BiocGenerics)
library(data.table)
library(cowplot)
library(ggsignif)
library(RColorBrewer)
library(broom)
library(ggVennDiagram)
library(paletteer)
toplistall <- readRDS("data/toplistall.RDS")
siglist <- readRDS("data/siglist_final.RDS")
list2env(siglist, envir = .GlobalEnv)
<environment: R_GlobalEnv>
cpmcounts <- readRDS("data/cpmcount.RDS")
my_exp_genes <- read.csv("data/backGL.txt")
GTEx_genes <- read.csv("data/GTEx_gene_list.csv",row.names = 1)
not_eqtls <- read.csv("output/not_eqtls_GTEX.csv",row.names = 1)
heart_gtex <- read.csv("output/heart_gtex.csv",row.names = 1)
egenes <- read.csv("output/egenes.csv",row.names = 1)
plot_venn <- function (x, show_intersect, set_color, set_size, label, label_geom,
label_alpha, label_color, label_size, label_percent_digit,
label_txtWidth, edge_lty, edge_size, ...) {
venn <- ggVennDiagram::Venn(x)
data <- process_data(venn)
p <- ggplot() +
geom_sf(aes_string(fill = "count"), data = data@region) +
geom_sf(aes_string(color = "name"), data = data@setEdge, show.legend = F, lty = edge_lty, size = edge_size, color = set_color) +
geom_sf_text(aes_string(label = "name"), data = data@setLabel, size = set_size, color = set_color) +
theme_void()
if (label != "none" & show_intersect == FALSE) {
region_label <- data@region %>%
dplyr::filter(.data$component =="region") %>%
dplyr::mutate(percent = paste(round(.data$count * 100/sum(.data$count), digits = label_percent_digit),"%", sep = "")) %>% dplyr::mutate (both = paste(.data$count, paste0("(", .data$percent, ")"), sep = "\n"))
if (label_geom == "label") {
p <- p +
geom_sf_label(aes_string(label = label),data = region_label, alpha = label_alpha, color = label_color,size = label_size, lineheight = 0.85, label.size = NA)
}
if (label_geom == "text") {
p <- p +
geom_sf_text(aes_string(label = label),data = region_label, alpha = label_alpha, color = label_color, size = label_size, lineheight = 0.85)
}
}
if (show_intersect == TRUE) {
items <- data@region %>% dplyr::rowwise() %>% dplyr::mutate(text = stringr::str_wrap(paste0(.data$item, collapse = " "), width = label_txtWidth)) %>%
sf::st_as_sf()
label_coord = sf::st_centroid(items$geometry) %>%
sf::st_coordinates()
p <- ggplot(items) +
geom_sf(aes_string(fill = "count")) +
geom_sf_text(aes_string(label = "name"), data = data@setLabel,
inherit.aes = F) +
geom_text(aes_string(label = "count", text = "text"), x = label_coord[, 1], y = label_coord[,2], show.legend = FALSE) +
theme_void()
ax <- list(showline = FALSE)
p <- plotly::ggplotly(p, tooltip = c("text")) %>%
plotly::layout(xaxis = ax, yaxis = ax)
}
p
}
## create GTEx data set from my data
GTEx <- intersect(GTEx_genes$entrezgene_id,my_exp_genes$ENTREZID)
## exclude GTEX and create nQTL set with other expressed genes
nQTLmy <- my_exp_genes %>%
dplyr:: filter(!ENTREZID %in%GTEx)
drug_palspc <- c("darkblue","cornflowerblue","darkblue","cornflowerblue")
drug_pal_fact <- c("#8B006D" ,"#DF707E", "#F1B72B" ,"#3386DD", "#707031","#41B333")
#GET nQTL umbers
nQTLsum <- toplistall %>%
mutate(id =dplyr::case_match(id, "Daunorubicin"~"DNR",
"Doxorubicin"~"DOX",
"Epirubicin"~"EPI",
"Mitoxantrone"~"MTX",
"Trastuzumab"~"TRZ",
"Vehicle"~"VEH",
.default = id)) %>%
dplyr::filter(time=="24_hours") %>%
dplyr::filter(adj.P.Val <0.05) %>%
mutate(nQTL=if_else(ENTREZID %in% nQTLmy$ENTREZID,'nQTL_y','nQTL_no')) %>%
group_by(id,nQTL) %>%
tally() %>%
separate(nQTL, into=c('set', 'group')) %>%
mutate(total=length(nQTLmy$ENTREZID) - n) %>%
dplyr::filter(group=="y")
#GETx GTEX numbers
GTExsum <- toplistall %>%
mutate(id =dplyr::case_match(id, "Daunorubicin"~"DNR",
"Doxorubicin"~"DOX",
"Epirubicin"~"EPI",
"Mitoxantrone"~"MTX",
"Trastuzumab"~"TRZ",
"Vehicle"~"VEH",
.default = id)) %>%
dplyr::filter(time=="24_hours") %>%
dplyr::filter(adj.P.Val <0.05) %>%
mutate(GTEx=if_else(ENTREZID %in%GTEx,"GTEx_y","GTEx_no")) %>%
group_by(id,GTEx) %>%
tally() %>%
separate(GTEx, into=c('set', 'group')) %>%
mutate(total=length(GTEx) - n) %>%
dplyr::filter(group=="y")
##combine and create long data frame for plot
GTEXcr8z <- GTExsum %>%
rbind(., nQTLsum) %>%
dplyr::select(id,set, n,total) %>%
mutate(id=factor(id, levels = c('DOX','EPI','DNR','MTX','TRZ','VEH'))) %>%
pivot_longer(cols=n:total,
names_to="group",
values_to="total") %>%
mutate(group=factor(group,levels = c("total", "n"),labels=c("not DE","DE"))) %>%
mutate(set=factor(set,levels = c("GTEx","nQTL"), labels =c("eGene", "not eGene")))
GTEXcr8z %>%
ggplot(., aes(x=set,y=total, fill=group))+
geom_col(position='fill')+
facet_wrap(~id,nrow=2,ncol=4)+
theme_classic()+
scale_fill_manual(values=drug_palspc)+
ylab("Heart: left ventricle eGenes")+
xlab("")+
scale_y_continuous( expand = expansion(c(0, 0.01))) +
theme(strip.background = element_rect(fill = "white",
linetype=1,
linewidth = 0.5),
plot.title = element_text(size=12,
hjust = 0.5,
face="bold"),
axis.title = element_text(size = 12,
color = "black"),
axis.ticks = element_line(linewidth = 1.0),
axis.text = element_text(color = "black"),
panel.background = element_rect(colour = "black",
size=1),
strip.text.x = element_text(size=12,
face = "bold"))#+
Additonal GTEx analysis and code is found here
knowles4 <-readRDS("output/knowles4.RDS")
knowles5 <-readRDS("output/knowles5.RDS")
Knowles_count <-
toplistall %>%
mutate(id = dplyr::case_match(id, "Daunorubicin"~"DNR",
"Doxorubicin"~"DOX",
"Epirubicin"~"EPI",
"Mitoxantrone"~"MTX",
"Trastuzumab"~"TRZ",
"Vehicle"~"VEH",
.default = id)) %>%
filter(id!='TRZ') %>%
mutate(id=factor(id, levels = c('DOX','EPI','DNR','MTX','TRZ','VEH'))) %>%
mutate(time=factor(time, levels=c("3_hours","24_hours"))) %>%
group_by(time, id) %>%
mutate(K4 = if_else(ENTREZID %in% knowles4$entrezgene_id,1,0))%>%
mutate(K5 = if_else(ENTREZID %in% knowles5$entrezgene_id,1,0))%>%
filter(adj.P.Val<0.05) %>%
dplyr::summarize(n=n(), K4=sum(K4), K5=sum(K5)) %>%
as.tibble() %>%
dplyr::select(time,id,K4,K5) %>%
rename("K4_y"='K4',"K5_y"='K5') %>%
mutate(time = case_match(time, '3_hours'~'3 hrs',
'24_hours'~'24 hrs',
.default = time)) %>%
mutate(K4_n= 417-K4_y, K5_n=273-K5_y) %>%
pivot_longer(!c(time,id),
names_to='QTL',
values_to="gene_count") %>%
separate(QTL,into=c("QTL_type",'group'),sep = '_') %>%
mutate(QTL_type =case_match(QTL_type,
'K4'~'base\neGenes',
'K5'~'response\neGenes',.default = QTL_type)) %>%
mutate(time=factor(time, levels=c("3 hrs","24 hrs"))) %>%
group_by(id,time,QTL_type) %>%
mutate(percent=gene_count/sum(gene_count)*100) %>%
ungroup() %>%
filter(time=="24 hrs") %>%
mutate(id=factor(id, levels = c('DOX','EPI','DNR','MTX','TRZ','VEH'))) %>% mutate(group=factor(group, levels= c("n","y"), labels=c("not DE","DE")))
ggplot(Knowles_count, aes(x=QTL_type,y=gene_count, group=group, fill=group))+
geom_col(position='fill')+
facet_wrap(~id,nrow=1,ncol=4)+
theme_classic()+
ylab("iPSC-CM DOX eGenes ")+
xlab(" ")+
scale_color_manual(values=drug_palspc)+
scale_fill_manual(values=drug_palspc)+
scale_y_continuous( expand = expansion(c(0, 0.01))) +
theme(strip.background = element_rect(fill = "white",
linetype=1,
linewidth = 0.5),
plot.title = element_text(size=12,
hjust = 0.5,
face="bold"),
axis.title = element_text(size = 12,
color = "black"),
axis.ticks = element_line(linewidth = 1.0),
axis.text = element_text(color = "black"),
panel.background = element_rect(colour = "black",
size=1),
strip.text.x = element_text(size=12,
face = "bold"))
Additonal analysis and code for the Knowles data is found here
DOXreQTLs <- readRDS("output/DOXreQTLs.RDS")
# assignInNamespace(x = "plot_venn", value=plot_venn, ns="ggVennDiagram")
reQTL_overlapDE24 <- list(DOXreQTLs$ENTREZID,sigVDA24$ENTREZID, sigVEP24$ENTREZID, sigVMT24$ENTREZID)
re_incommon <- c(DOXreQTLs$ENTREZID,sigVDA24$ENTREZID, sigVEP24$ENTREZID, sigVMT24$ENTREZID)
names(reQTL_overlapDE24) <- c("Dox_reQTLS", "DNR DEGs","EPI DEGs","MTX DEGs")
DEG_incommon <-c(sigVDA24$ENTREZID, sigVEP24$ENTREZID, sigVMT24$ENTREZID)
uniqueDEGs_incommon <- unique(DEG_incommon)
two_venn <- list(DOXreQTLs$ENTREZID, uniqueDEGs_incommon)
ggVennDiagram(two_venn,
category.names = c("DOX egenes\nn = 142","union of TOP2i DEGs\n n = 7838"),
show_intersect = FALSE,
set_color = "black",
category_size = c(6,6),
label = "count",
label_percent_digit = 1,
label_size = 4,
label_alpha = 0,
label_color = "black",
edge_lty = "solid", set_size = 4.5)+
scale_x_continuous(expand = expansion(mult = .3))+
scale_y_continuous(expand = expansion(mult = .1))+
scale_fill_distiller(palette="Spectral", direction = -1, limits= c(1,200),oob=scales::squish)