Last updated: 2023-11-09

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 8a6ebc1. 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:    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/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/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/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/Seonane2019supp1.txt
    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/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/avgLD50.RDS
    Ignored:    data/avg_LD50.RDS
    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/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/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/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/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/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:  GWAS_list_of_interest.xlsx
    Untracked:  KEGGpathwaylist.R
    Untracked:  OmicNavigator_learn.R
    Untracked:  SigDoxtoplist.csv
    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:  individual-legenddark2.png
    Untracked:  installed_old.rda
    Untracked:  motif_ER.txt
    Untracked:  motif_LR.txt
    Untracked:  motif_NR.txt
    Untracked:  motif_TI.txt
    Untracked:  output/DNR_DEGlist.csv
    Untracked:  output/DNRvenn.RDS
    Untracked:  output/DOX_DEGlist.csv
    Untracked:  output/DOXvenn.RDS
    Untracked:  output/EPI_DEGlist.csv
    Untracked:  output/EPIvenn.RDS
    Untracked:  output/Figures/
    Untracked:  output/Knowles_log2cpm.csv
    Untracked:  output/MTX_DEGlist.csv
    Untracked:  output/MTXvenn.RDS
    Untracked:  output/TRZ_DEGlist.csv
    Untracked:  output/TableS8.csv
    Untracked:  output/Volcanoplot_10
    Untracked:  output/Volcanoplot_10.RDS
    Untracked:  output/allfinal_sup10.RDS
    Untracked:  output/endocytosisgenes.csv
    Untracked:  output/gene_corr_fig9.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/output-old/
    Untracked:  output/rank24genes.csv
    Untracked:  output/rank3genes.csv
    Untracked:  output/reneem@ls6.tacc.utexas.edu
    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/toptablebydrug.RDS
    Untracked:  output/trop_knowles_fun.csv
    Untracked:  output/tvl24hour.txt
    Untracked:  output/x_counts.RDS
    Untracked:  reneebasecode.R

Unstaged changes:
    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/Knowels_trop_analysis.Rmd) and HTML (docs/Knowels_trop_analysis.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 8a6ebc1 reneeisnowhere 2023-11-09 updates on plots
html 9af9df6 reneeisnowhere 2023-11-09 Build site.
Rmd 60c64d1 reneeisnowhere 2023-11-09 adding boxplots
html d12232a reneeisnowhere 2023-11-07 Build site.
Rmd 441f82b reneeisnowhere 2023-11-07 adding more code
html cae46a9 reneeisnowhere 2023-11-07 Build site.
html bd0342c reneeisnowhere 2023-11-07 Build site.
Rmd 453ebe6 reneeisnowhere 2023-11-07 adding code
Rmd d6ecce9 reneeisnowhere 2023-11-07 adding code
html ae9124e reneeisnowhere 2023-10-30 Build site.
Rmd 74c2dc1 reneeisnowhere 2023-10-30 updated
Rmd d970e84 reneeisnowhere 2023-10-30 adding more analysis

library(tidyverse)
library(ggsignif)
library(cowplot)
library(ggpubr)
library(scales)
library(sjmisc)
library(kableExtra)
library(broom)
library(ComplexHeatmap)
library(ggVennDiagram)
library(biomaRt)
library(limma)
library(edgeR)
library(RColorBrewer)
palette_colors_mine <- colorRampPalette(colors = c("green","white","purple","red" ))(60)
scales::show_col(palette_colors_mine)

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Here I will attempt to recreate my correlation analysis on the knowles data using their troponin and RNAseq log2cpm.

### genes I want to know about
interest_genes <- read.csv("output/GOI_genelist.txt", row.names = 1)
trop_knowles <- read.csv("output/trop_knowles_fun.csv", row.names = 1)
Knowles_log2cpm <- readRDS("data/Knowles_log2cpm_real.RDS")
trop0.625 <- trop_knowles %>% 
  filter(dosage <1) 
store <- Knowles_log2cpm %>% 
  dplyr::select( 'ESGN',ends_with(c('0.625', '0'))) %>% 
  dplyr::filter(ESGN %in% interest_genes$ensembl_gene_id) %>% 
  pivot_longer(cols=!ESGN, names_to = "ind", values_to = "counts") %>% 
  separate(ind,into=c("cell_line","dosage"), sep = ":") %>%
  mutate(dosage = as.numeric(dosage)) %>% 
  full_join(., trop0.625, by=c("cell_line", "dosage")) %>% 
  group_by(cell_line) %>% 
  full_join(., interest_genes, by = c("ESGN" = "ensembl_gene_id"))
  
  
  ###new graph stuff
  for (gene in interest_genes$ensembl_gene_id){
    gene_plot <- store %>% 
      dplyr::filter(ESGN == gene) %>%
      ggplot(., aes(x=troponin, y=counts))+
      geom_point(aes(col=cell_line))+
      geom_smooth(method="lm")+
      facet_wrap(hgnc_symbol~dosage, scales="free")+
      theme_classic()+
      xlab("troponin I expression") +
      ylab("Gene counts in log2 cpm") +
      ggtitle(expression(paste("Correlation between counts and troponin I Knowles")))+
      scale_color_manual(values = palette_colors_mine, aesthetics = c("color", "fill"))+
     ggpubr:: stat_cor(method="spearman",
                       # cor.coef.name="rho",
               aes(label = paste(..r.label.., ..p.label.., sep = "~`,\n`~")),
               color = "red",
               label.x.npc = 0.01,
               label.y.npc=0.01, 
               size = 3)+
      theme(plot.title = element_text(size = rel(1.5), hjust = 0.5,face = "bold"),
            axis.title = element_text(size = 15, color = "black"),
            axis.ticks = element_line(size = 1.5),
            axis.text = element_text(size = 8, color = "black", angle = 20),
            strip.text.x = element_text(size = 12, color = "black", face = "italic"))
   print(gene_plot)
   
  }

Version Author Date
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Version Author Date
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
bd0342c reneeisnowhere 2023-11-07

Knowles Boxplots of Fig9 genes

Knowles_log2cpm_box <- readRDS("data/Knowles_log2cpm_real.RDS")

store_box <- Knowles_log2cpm_box %>% 
  # dplyr::select( 'ESGN',ends_with(c('0.625', '0'))) %>% 
  dplyr::filter(ESGN %in% interest_genes$ensembl_gene_id) %>% 
  pivot_longer(cols=!ESGN, names_to = "ind", values_to = "counts") %>% 
  separate(ind,into=c("cell_line","dosage"), sep = ":") %>%
  mutate(dosage = as.numeric(dosage)) %>% 
  # full_join(., trop0.625, by=c("cell_line", "dosage")) %>% 
  group_by(cell_line) %>% 
  full_join(., interest_genes, by = c("ESGN" = "ensembl_gene_id"))
store_box %>% 
  mutate(dosage=factor(dosage, levels=c('0','0.000', '0.625','1.25', '2.5','5'))) %>% 
  ggplot(., aes(x=dosage,y=counts), group=dosage)+
  geom_boxplot()+
  facet_wrap(~hgnc_symbol)

Version Author Date
9af9df6 reneeisnowhere 2023-11-09

RNA-seq trial analysis

Analysis of expressed genes

RNA_seq_trial<- readRDS("data/RNA_seq_trial.RDS")

all_cpmcount <-  read_table("data/Counts_RNA_ERMatthews.txt")
cpm_count_main <- readRDS("data/cpmcount.RDS") %>% rownames_to_column(var = "ENTREZID")
colnames(cpm_count_main) <- colnames(all_cpmcount)


test_run_sample_list <- read.csv("data/test_run_sample_list.txt", row.names = 1)

colnames(RNA_seq_trial) <- c("ENTREZID",test_run_sample_list$Sample_ID)

lcpm_trial <- RNA_seq_trial %>% 
  column_to_rownames("ENTREZID") %>% 
  cpm(., log=TRUE) %>% 
  as.data.frame() #%>% 
 

row_means <- rowMeans(lcpm_trial)
x_trial <- lcpm_trial[row_means > 0,]
dim(x_trial)
[1] 13277     4
list_genes_trial <- rownames(x_trial)
ggVennDiagram::ggVennDiagram(list(list_genes_trial, cpm_count_main$ENTREZID),
                             category.names = c("Trialgenes","Maingenes"),
              show_intersect = TRUE,
              set_color = "black",
              label = "count",
              label_percent_digit = 1,
              label_size = 4,
              label_alpha = 0,
              label_color = "black",
              edge_lty = "solid", set_size = 4.5)#+

Correlation of counts files

lcpm_trial_full <- RNA_seq_trial %>% 
  column_to_rownames("ENTREZID") %>% 
  cpm(., log=TRUE) %>% 
  as.data.frame() %>% 
  rownames_to_column(var = "ENTREZID")

lcpm_trial_full %>%
  column_to_rownames(var="ENTREZID") %>%
  cor(.) %>% 
  Heatmap(.,layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(., i, j)), x, y, 
            gp = gpar(fontsize = 10))})

Version Author Date
ae9124e reneeisnowhere 2023-10-30
lcpm_main <- all_cpmcount %>% 
  column_to_rownames("ENTREZID") %>% 
  cpm(., log=TRUE) %>% 
  as.data.frame() %>% 
  rownames_to_column(var = "ENTREZID") %>% 
  dplyr::select(ENTREZID, all_of(starts_with("DOX"))) %>% 
  dplyr::select(ENTREZID, all_of(ends_with("3h")))  
  
combined_data <- lcpm_main %>%
  full_join(., lcpm_trial_full, by= "ENTREZID") %>% 
  column_to_rownames("ENTREZID") %>% 
  cor(.,) 


  
  Heatmap(combined_data,column_title = "Full gene list",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(combined_data, i, j)), x, y, 
            gp = gpar(fontsize = 10))})

Version Author Date
ae9124e reneeisnowhere 2023-10-30
  only79_ind <- lcpm_main %>%
  full_join(., lcpm_trial_full, by= "ENTREZID") %>% 
    dplyr::select(ENTREZID,'3hr_0.5',"DOX.4.3h") %>% 
    column_to_rownames("ENTREZID") %>% 
  cor(.,) 

  
  Heatmap(only79_ind,column_title = "Full gene list_79",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(only79_ind, i, j)), x, y, 
            gp = gpar(fontsize = 10))})

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
ae9124e reneeisnowhere 2023-10-30
lcpm_main_veh <- all_cpmcount %>% 
  column_to_rownames("ENTREZID") %>% 
  cpm(., log=TRUE) %>% 
  as.data.frame() %>% 
  rownames_to_column(var = "ENTREZID") %>% 
  dplyr::select(ENTREZID, all_of(c(starts_with("DOX"),starts_with("VEH")))) %>% 
   dplyr::select(ENTREZID, all_of(ends_with("3h")))  
  

combined_data_veh<- lcpm_main_veh %>%
  full_join(., lcpm_trial_full, by= "ENTREZID") %>% 
  column_to_rownames("ENTREZID") %>% 
  cor(.,) 
  
  
  
  Heatmap(combined_data_veh, column_title = "all genes in list, no filtering",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(combined_data_veh, i, j)), x, y, 
            gp = gpar(fontsize = 8))})

Version Author Date
ae9124e reneeisnowhere 2023-10-30
lcpm_trial_filter_main <- lcpm_trial_full %>% 
  filter(ENTREZID %in% cpm_count_main$ENTREZID)
 


lcpm_trial_filter_main %>% 
column_to_rownames(var="ENTREZID") %>%
  cor(.) %>% 
  Heatmap(.,column_title = "Using 14,084 expressed genes from Main data",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(., i, j)), x, y, 
            gp = gpar(fontsize = 8))})

Version Author Date
ae9124e reneeisnowhere 2023-10-30
lcpm_trial_filter <- lcpm_trial_full %>% 
  filter(ENTREZID %in% list_genes_trial)
 

lcpm_trial_filter %>% 
column_to_rownames(var="ENTREZID") %>%
  cor(.) %>% 
  Heatmap(.,column_title = "Using 13277 expressed genes",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(., i, j)), x, y, 
            gp = gpar(fontsize = 8))})

Version Author Date
ae9124e reneeisnowhere 2023-10-30
lcpm_main_filter_trial <- lcpm_main_veh %>% 
  filter(ENTREZID %in% list_genes_trial)

lcpm_trial_filter %>% 
  full_join(., lcpm_main_filter_trial, by = "ENTREZID") %>% 
  column_to_rownames(var="ENTREZID") %>%
  cor(.) %>% 
  Heatmap(.,column_title = "Using 13277 expressed genes",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(., i, j)), x, y, 
            gp = gpar(fontsize = 8))})

Version Author Date
ae9124e reneeisnowhere 2023-10-30
lcpm_trial_filter_main %>% 
  left_join(., lcpm_main, by = "ENTREZID") %>% 
  column_to_rownames(var="ENTREZID") %>%
  dplyr::select(DOX.4.3h,starts_with(("3hr")))%>% 
  cor(.) %>% 
  Heatmap(.,column_title = "Using 14084 expressed genes, just 79-1",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(., i, j)), x, y, 
            gp = gpar(fontsize = 8))})

Version Author Date
bd0342c reneeisnowhere 2023-11-07
hr3_indv4 <- lcpm_trial_filter_main %>% 
  left_join(., lcpm_main, by = "ENTREZID") %>% 
  column_to_rownames(var="ENTREZID") %>%
  dplyr::select(DOX.4.3h,`3hr_0.5`,`3hr_0.0`)%>% 
  cor(.) %>% 
  Heatmap(.,column_title = "Using 14084 expressed genes, just 79-1",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(., i, j)), x, y, 
            gp = gpar(fontsize = 8))})
  
plot(hr3_indv4)

Version Author Date
bd0342c reneeisnowhere 2023-11-07

corrlation heatmap of 3hr Dox 1-6 individuals and trial data

lcpm_trial_filter_main %>% 
  left_join(., lcpm_main, by = "ENTREZID") %>% 
  column_to_rownames(var="ENTREZID") %>%
  dplyr::select(starts_with("DOX"),`3hr_0.5`)%>% 
  cor(.) %>% 
  Heatmap(.,column_title = "Using 14084 expressed genes, just 79-1 with all 3 hour samples",
          layer_fun = function(j, i, x, y, width, height, fill) {
              grid.text(sprintf("%.3f", pindex(., i, j)), x, y, 
            gp = gpar(fontsize = 8))})

Version Author Date
9af9df6 reneeisnowhere 2023-11-09
  #  all3hrdata <- lcpm_main %>%
  # full_join(., lcpm_trial_full, by= "ENTREZID") %>% 
  #   dplyr::select(ENTREZID,'3hr_0.5',start) %>% 
  #   column_to_rownames("ENTREZID") %>% 
  # cor(.,) 

barplots

GOI_genelist <- read.csv("output/GOI_genelist.txt", row.names = 1)

cpm_boxplot_trial <-function(lcpm_trial, GOI, ylab) {
    ##GOI needs to be ENTREZID
  df_plot <- lcpm_trial %>% 
    dplyr::filter(rownames(.)== GOI) %>%
    pivot_longer(everything(),
                 names_to = "treatment",
                 values_to = "counts") %>%
    separate(treatment, c("time","conc"), sep= "_") %>%
    mutate(conc = factor(conc,levels=c('0.0','0.1','0.5','1.0'), labels = c ("NT", "0.1 uM", "0.5 uM", "1.0 uM")))
  
 plota <-  ggplot2::ggplot(df_plot, aes(x=conc, y= counts))+
    geom_col(position="identity")+
    theme_bw()+
    ylab(ylab)+
    xlab("")+
     ggtitle(paste(GOI))+
      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 = 10, color = "black"),
          axis.ticks = element_line(linewidth = 1.0),
          panel.background = element_rect(colour = "black", size=1),
          # axis.text.x = element_blank(),
          strip.text.x = element_text(margin = margin(2,0,2,0, "pt"),face = "bold"))
    print(plota)
}
  



for (g in seq(1:11)){
  datafilter <- GOI_genelist
  a <- GOI_genelist[g,3]
  # b <- datafilter[g,1]
  cpm_boxplot_trial(lcpm_trial,GOI=datafilter[g,1],
                           ylab =bquote(~italic(.(a))~log[2]~"cpm "))
  
}  

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

Version Author Date
d12232a reneeisnowhere 2023-11-07

expression of trial RNA seq data


sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
 [1] RColorBrewer_1.1-3    edgeR_3.42.4          limma_3.56.2         
 [4] biomaRt_2.56.1        ggVennDiagram_1.2.3   ComplexHeatmap_2.16.0
 [7] broom_1.0.5           kableExtra_1.3.4      sjmisc_2.8.9         
[10] scales_1.2.1          ggpubr_0.6.0          cowplot_1.1.1        
[13] ggsignif_0.6.4        lubridate_1.9.3       forcats_1.0.0        
[16] stringr_1.5.0         dplyr_1.1.3           purrr_1.0.2          
[19] readr_2.1.4           tidyr_1.3.0           tibble_3.2.1         
[22] ggplot2_3.4.4         tidyverse_2.0.0       workflowr_1.7.1      

loaded via a namespace (and not attached):
  [1] rstudioapi_0.15.0       jsonlite_1.8.7          shape_1.4.6            
  [4] magrittr_2.0.3          magick_2.8.1            farver_2.1.1           
  [7] rmarkdown_2.25          GlobalOptions_0.1.2     fs_1.6.3               
 [10] zlibbioc_1.46.0         vctrs_0.6.4             memoise_2.0.1          
 [13] RCurl_1.98-1.13         rstatix_0.7.2           webshot_0.5.5          
 [16] htmltools_0.5.7         progress_1.2.2          curl_5.1.0             
 [19] sass_0.4.7              KernSmooth_2.23-22      bslib_0.5.1            
 [22] htmlwidgets_1.6.2       plotly_4.10.3           cachem_1.0.8           
 [25] whisker_0.4.1           lifecycle_1.0.3         iterators_1.0.14       
 [28] pkgconfig_2.0.3         Matrix_1.6-1.1          sjlabelled_1.2.0       
 [31] R6_2.5.1                fastmap_1.1.1           GenomeInfoDbData_1.2.10
 [34] clue_0.3-65             digest_0.6.33           colorspace_2.1-0       
 [37] AnnotationDbi_1.62.2    S4Vectors_0.38.2        ps_1.7.5               
 [40] rprojroot_2.0.4         crosstalk_1.2.0         RSQLite_2.3.3          
 [43] labeling_0.4.3          filelock_1.0.2          fansi_1.0.5            
 [46] timechange_0.2.0        mgcv_1.9-0              httr_1.4.7             
 [49] abind_1.4-5             compiler_4.3.1          proxy_0.4-27           
 [52] bit64_4.0.5             withr_2.5.2             doParallel_1.0.17      
 [55] backports_1.4.1         carData_3.0-5           DBI_1.1.3              
 [58] highr_0.10              rappdirs_0.3.3          classInt_0.4-10        
 [61] rjson_0.2.21            units_0.8-4             tools_4.3.1            
 [64] httpuv_1.6.12           glue_1.6.2              callr_3.7.3            
 [67] nlme_3.1-163            promises_1.2.1          sf_1.0-14              
 [70] getPass_0.2-2           cluster_2.1.4           generics_0.1.3         
 [73] gtable_0.3.4            tzdb_0.4.0              class_7.3-22           
 [76] data.table_1.14.8       hms_1.1.3               xml2_1.3.5             
 [79] car_3.1-2               utf8_1.2.4              XVector_0.40.0         
 [82] BiocGenerics_0.46.0     foreach_1.5.2           pillar_1.9.0           
 [85] yulab.utils_0.1.0       later_1.3.1             splines_4.3.1          
 [88] circlize_0.4.15         lattice_0.22-5          BiocFileCache_2.8.0    
 [91] bit_4.0.5               tidyselect_1.2.0        locfit_1.5-9.8         
 [94] Biostrings_2.68.1       knitr_1.45              git2r_0.32.0           
 [97] IRanges_2.34.1          svglite_2.1.2           stats4_4.3.1           
[100] xfun_0.41               Biobase_2.60.0          matrixStats_1.0.0      
[103] stringi_1.7.12          lazyeval_0.2.2          yaml_2.3.7             
[106] evaluate_0.23           codetools_0.2-19        RVenn_1.1.0            
[109] cli_3.6.1               systemfonts_1.0.5       munsell_0.5.0          
[112] processx_3.8.2          jquerylib_0.1.4         Rcpp_1.0.11            
[115] GenomeInfoDb_1.36.4     dbplyr_2.4.0            png_0.1-8              
[118] XML_3.99-0.15           parallel_4.3.1          ellipsis_0.3.2         
[121] blob_1.2.4              prettyunits_1.2.0       bitops_1.0-7           
[124] viridisLite_0.4.2       e1071_1.7-13            insight_0.19.6         
[127] crayon_1.5.2            GetoptLong_1.0.5        rlang_1.1.2            
[130] KEGGREST_1.40.1         rvest_1.0.3