Source: https://github.com/markziemann/lungbrain
Eslam’s Summary of RNA seq
Project title: Characterization any gene expression changes in the mice brain in response to peripheral inflammation in the lung (asthma).
Methodology: Mice were divided into three groups (1 control group and 2 asthmatic groups OVA and LPS). At the end of the experiment, RNA was isolated from 5 different mice brain regions (Hypothalamus, Amygdala, Hippocampus, PAG, and NI) (n=7 per group) using (Qiagen RNAeasy Mini kit 250) (Cat# 74106, Hilden, Germany). In total 104 RNA samples. Afterward, RNA quality control was checked using Qubit4 and 4200 Tapestation. Then RNA sequencing was done using NEBNext® Ultra™ II Directional RNA Library Prep Kit for Illumina.
Data form: FASTQ raw data (FYI, RNA-seq reads table is attached in a separate page).
ID: (1-104)
Aim: Detection of the differences in gene expression for each brain region between our 3 different groups?
Fastqc (v0.11.9) was used to inspect sequence quality[1].
The mouse transcriptome was downloaded from GENCODE version 28[2].
Skewer (v0.2.2) was used to trim low quality bases (qual<20) from the 3’ end of the read[3].
Kallisto (0.46.1) was used to map RNA-seq reads to the transcriptome [4].
Multiqc was used to tabulate sequence quality, trimming and mapping statistics [5].
Data were read into R v4.1.2 and duplicate lane data were aggregated, and transcript level counts were aggregated to gene level counts.
Genes with an average of less than 10 reads across samples were excluded from downstream analysis.
DESeq (1.32.0) was used with default settings to assay differential expression between control and treatment groups for all tissues [6].
Pathway analysis was performed with reactome gene sets obtained from MSigDB and converted to mouse gene identifiers with the msigdbr package (performed on 16-02-2022) [7,8,9].
Differential pathway analysis was performed with the “mitch” bioconductor package [10].
Genes and pathways with false discovery rate (FDR)<0.05 were considered significant.
suppressPackageStartupMessages({
library("zoo")
library("tidyverse")
library("reshape2")
library("DESeq2")
library("gplots")
library("fgsea")
library("MASS")
library("mitch")
library("eulerr")
library("limma")
library("topconfects")
library("kableExtra")
library("vioplot")
library("pkgload")
library("beeswarm")
})
Importing RNA-seq data
tmp <- read.table("3col.tsv.gz",header=F)
x <- as.matrix(acast(tmp, V2~V1, value.var="V3", fun.aggregate = sum))
x <- as.data.frame(x)
accession <- sapply((strsplit(rownames(x),"\\|")),"[[",2)
symbol<-sapply((strsplit(rownames(x),"\\|")),"[[",6)
x$geneid <- paste(accession,symbol)
xx <- aggregate(. ~ geneid,x,sum)
rownames(xx) <- xx$geneid
xx$geneid = NULL
xx <- round(xx)
xx <- xx[,which(colnames(xx)!="test")]
xx[1:6,1:6]
## EA11-1_S4_L001 EA11-1_S4_L002 EA11-2_S28_L001
## ENSMUSG00000000001.5 Gnai3 288 331 302
## ENSMUSG00000000003.16 Pbsn 0 0 0
## ENSMUSG00000000028.16 Cdc45 23 12 15
## ENSMUSG00000000031.17 H19 8 13 2
## ENSMUSG00000000037.18 Scml2 11 9 5
## ENSMUSG00000000049.12 Apoh 2 3 2
## EA11-2_S28_L002 EA11-3_S52_L001 EA11-3_S52_L002
## ENSMUSG00000000001.5 Gnai3 315 270 276
## ENSMUSG00000000003.16 Pbsn 0 0 0
## ENSMUSG00000000028.16 Cdc45 23 32 15
## ENSMUSG00000000031.17 H19 4 3 5
## ENSMUSG00000000037.18 Scml2 3 5 9
## ENSMUSG00000000049.12 Apoh 0 4 3
dim(xx)
## [1] 55357 208
Fix the sample names.
They are duplicated for lane 1 and 2, which I will aggregate.
txx <- as.data.frame(t(xx))
txx$label <- sapply(strsplit(rownames(txx),"_"),"[[",1)
txx[1:3,c(1:4,ncol(txx))]
## ENSMUSG00000000001.5 Gnai3 ENSMUSG00000000003.16 Pbsn
## EA11-1_S4_L001 288 0
## EA11-1_S4_L002 331 0
## EA11-2_S28_L001 302 0
## ENSMUSG00000000028.16 Cdc45 ENSMUSG00000000031.17 H19 label
## EA11-1_S4_L001 23 8 EA11-1
## EA11-1_S4_L002 12 13 EA11-1
## EA11-2_S28_L001 15 2 EA11-2
txx2 <- aggregate(. ~ label,txx,sum)
txx2[1:3,1:4]
## label ENSMUSG00000000001.5 Gnai3 ENSMUSG00000000003.16 Pbsn
## 1 EA11-1 619 0
## 2 EA11-2 617 0
## 3 EA11-3 546 0
## ENSMUSG00000000028.16 Cdc45
## 1 35
## 2 38
## 3 47
rownames(txx2) <- txx2[,1]
txx2[,1] = NULL
xx <- as.data.frame(t(txx2))
xx[1:4,1:5]
## EA11-1 EA11-2 EA11-3 EA11-4 EA11-5
## ENSMUSG00000000001.5 Gnai3 619 617 546 577 622
## ENSMUSG00000000003.16 Pbsn 0 0 0 0 0
## ENSMUSG00000000028.16 Cdc45 35 38 47 30 54
## ENSMUSG00000000031.17 H19 21 6 8 32 51
write.table(xx,file="lungbrain_counts.tsv",sep="\t",quote=FALSE)
rxx <- xx/colSums(xx) *1e6
rxx[1:4,1:5]
## EA11-1 EA11-2 EA11-3 EA11-4 EA11-5
## ENSMUSG00000000001.5 Gnai3 32.468943 31.6977874 30.2891348 26.133490 29.561201
## ENSMUSG00000000003.16 Pbsn 0.000000 0.0000000 0.0000000 0.000000 0.000000
## ENSMUSG00000000028.16 Cdc45 1.932574 2.0954246 2.6917763 1.428374 2.851489
## ENSMUSG00000000031.17 H19 1.181065 0.2705589 0.3625887 1.480344 2.481030
Samplesheet.
Need to delete “EA13-4”.
ss <- read.table("lungbrain_samplesheet.tsv",header=TRUE)
rownames(ss) <- gsub('\\.','-',paste("EA",as.character(ss$OriginalID),sep=""))
ss <- ss[order(rownames(ss)),]
rownames(ss) == colnames(rxx)
## [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [16] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [31] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [46] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [61] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [76] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [91] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
ss %>% kbl(caption = "Sample sheet") %>%
kable_paper("hover", full_width = F)
Region | Treatment | SampleNum | OriginalID | InternalID | PercentReads | NumReads | Gbases | |
---|---|---|---|---|---|---|---|---|
EA11-1 | hyp | OVA | 4 | 11.1 | CSEA004 | 0.5566 | 40914716 | 4.091472 |
EA11-2 | amy | OVA | 28 | 11.2 | CSEA028 | 0.6315 | 46420487 | 4.642049 |
EA11-3 | hip | OVA | 52 | 11.3 | CSEA052 | 0.5436 | 39959108 | 3.995911 |
EA11-4 | pag | OVA | 76 | 11.4 | CSEA076 | 0.5279 | 38805028 | 3.880503 |
EA11-5 | NI | OVA | 32 | 11.5 | CSEA032 | 0.6059 | 44538674 | 4.453867 |
EA12-1 | hyp | OVA | 5 | 12.1 | CSEA005 | 0.6140 | 45134092 | 4.513409 |
EA12-2 | amy | OVA | 29 | 12.2 | CSEA029 | 0.6140 | 45134092 | 4.513409 |
EA12-3 | hip | OVA | 53 | 12.3 | CSEA053 | 0.4697 | 34526845 | 3.452684 |
EA12-4 | pag | OVA | 77 | 12.4 | CSEA077 | 0.6622 | 48677191 | 4.867719 |
EA12-5 | NI | OVA | 40 | 12.5 | CSEA040 | 0.6281 | 46170558 | 4.617056 |
EA13-1 | hyp | Control | 20 | 13.1 | CSEA020 | 0.6535 | 48037669 | 4.803767 |
EA13-2 | amy | Control | 43 | 13.2 | CSEA043 | 0.6126 | 45031180 | 4.503118 |
EA13-3 | hip | Control | 68 | 13.3 | CSEA068 | 0.6158 | 45266406 | 4.526641 |
EA13-4 | pag | Control | 92 | 13.4 | CSEA092 | 0.5902 | 43384594 | 4.338459 |
EA13-5 | NI | Control | 100 | 13.5 | CSEA100 | 0.5576 | 40988224 | 4.098822 |
EA14-1 | hyp | Control | 21 | 14.1 | CSEA021 | 0.6006 | 44149080 | 4.414908 |
EA14-2 | amy | Control | 44 | 14.2 | CSEA044 | 0.6354 | 46707169 | 4.670717 |
EA14-4 | pag | Control | 93 | 14.4 | CSEA093 | 0.6229 | 45788315 | 4.578832 |
EA14-5 | NI | Control | 101 | 14.5 | CSEA101 | 0.4591 | 33747657 | 3.374766 |
EA15-3 | hip | Control | 69 | 15.3 | CSEA069 | 0.6063 | 44568078 | 4.456808 |
EA16-2 | amy | Control | 45 | 16.2 | CSEA045 | 0.5070 | 37268704 | 3.726870 |
EA19-1 | hyp | Control | 22 | 19.1 | CSEA022 | 0.5334 | 39209323 | 3.920932 |
EA19-2 | amy | Control | 46 | 19.2 | CSEA046 | 0.5431 | 39922354 | 3.992235 |
EA19-3 | hip | Control | 70 | 19.3 | CSEA070 | 0.4972 | 36548323 | 3.654832 |
EA19-4 | pag | Control | 94 | 19.4 | CSEA094 | 0.6218 | 45707456 | 4.570746 |
EA19-5 | NI | Control | 102 | 19.5 | CSEA102 | 0.5271 | 38746221 | 3.874622 |
EA20-1 | hyp | Control | 23 | 20.1 | CSEA023 | 0.5896 | 43340489 | 4.334049 |
EA20-2 | amy | Control | 47 | 20.2 | CSEA047 | 0.5473 | 40231088 | 4.023109 |
EA20-3 | hip | Control | 71 | 20.3 | CSEA071 | 0.5420 | 39841494 | 3.984149 |
EA20-4 | pag | Control | 95 | 20.4 | CSEA095 | 0.6251 | 45950034 | 4.595003 |
EA20-5 | NI | Control | 103 | 20.5 | CSEA103 | 0.5385 | 39584215 | 3.958422 |
EA22-5 | NI | LPS | 56 | 22.5 | CSEA056 | 0.5462 | 40150229 | 4.015023 |
EA23-5 | NI | LPS | 64 | 23.5 | CSEA064 | 0.7148 | 52543727 | 5.254373 |
EA24-1 | hyp | LPS | 9 | 24.1 | CSEA009 | 0.6135 | 45097337 | 4.509734 |
EA24-2 | amy | LPS | 33 | 24.2 | CSEA033 | 0.6361 | 46758625 | 4.675862 |
EA24-3 | hip | LPS | 57 | 24.3 | CSEA057 | 0.5850 | 43002351 | 4.300235 |
EA24-4 | pag | LPS | 81 | 24.4 | CSEA081 | 0.5860 | 43075859 | 4.307586 |
EA24-5 | NI | LPS | 72 | 24.5 | CSEA072 | 0.5553 | 40819155 | 4.081915 |
EA25-1 | hyp | LPS | 10 | 25.1 | CSEA010 | 0.6531 | 48008266 | 4.800827 |
EA25-2 | amy | LPS | 34 | 25.2 | CSEA034 | 0.5554 | 40826506 | 4.082651 |
EA25-3 | hip | LPS | 58 | 25.3 | CSEA058 | 0.5951 | 43744785 | 4.374478 |
EA25-4 | pag | LPS | 82 | 25.4 | CSEA082 | 0.5224 | 38400732 | 3.840073 |
EA25-5 | NI | LPS | 80 | 25.5 | CSEA080 | 0.5595 | 41127890 | 4.112789 |
EA26-1 | hyp | LPS | 11 | 26.1 | CSEA011 | 0.5547 | 40775050 | 4.077505 |
EA26-2 | amy | LPS | 35 | 26.2 | CSEA035 | 0.5051 | 37129038 | 3.712904 |
EA26-3 | hip | LPS | 59 | 26.3 | CSEA059 | 0.5320 | 39106412 | 3.910641 |
EA26-4 | pag | LPS | 83 | 26.4 | CSEA083 | 0.5903 | 43391945 | 4.339195 |
EA26-5 | NI | LPS | 88 | 26.5 | CSEA088 | 0.5439 | 39981160 | 3.998116 |
EA28-1 | hyp | LPS | 12 | 28.1 | CSEA012 | 0.5116 | 37606842 | 3.760684 |
EA28-2 | amy | LPS | 36 | 28.2 | CSEA036 | 0.6100 | 44840058 | 4.484006 |
EA28-3 | hip | LPS | 60 | 28.3 | CSEA060 | 0.5066 | 37239301 | 3.723930 |
EA28-4 | pag | LPS | 84 | 28.4 | CSEA084 | 0.6240 | 45869174 | 4.586917 |
EA29-1 | hyp | LPS | 13 | 29.1 | CSEA013 | 0.5781 | 42495144 | 4.249514 |
EA29-2 | amy | LPS | 37 | 29.2 | CSEA037 | 0.5550 | 40797102 | 4.079710 |
EA29-3 | hip | LPS | 61 | 29.3 | CSEA061 | 0.6357 | 46729221 | 4.672922 |
EA29-4 | pag | LPS | 85 | 29.4 | CSEA085 | 0.5473 | 40231088 | 4.023109 |
EA29-5 | NI | LPS | 96 | 29.5 | CSEA096 | 0.6012 | 44193185 | 4.419319 |
EA3-1 | hyp | OVA | 1 | 3.1 | CSEA001 | 0.7106 | 52234993 | 5.223499 |
EA3-2 | amy | OVA | 25 | 3.2 | CSEA025 | 0.5306 | 39003500 | 3.900350 |
EA3-3 | hip | OVA | 49 | 3.3 | CSEA049 | 0.6483 | 47655426 | 4.765543 |
EA3-4 | pag | OVA | 73 | 3.4 | CSEA073 | 0.5320 | 39106412 | 3.910641 |
EA3-5 | NI | OVA | 8 | 3.5 | CSEA008 | 0.6426 | 47236429 | 4.723643 |
EA30-1 | hyp | LPS | 14 | 30.1 | CSEA014 | 0.5787 | 42539249 | 4.253925 |
EA30-2 | amy | LPS | 38 | 30.2 | CSEA038 | 0.5688 | 41811517 | 4.181152 |
EA30-3 | hip | LPS | 62 | 30.3 | CSEA062 | 0.6359 | 46743923 | 4.674392 |
EA30-4 | pag | LPS | 86 | 30.4 | CSEA086 | 0.6063 | 44568078 | 4.456808 |
EA30-5 | NI | LPS | 104 | 30.5 | CSEA104 | 0.5692 | 41840920 | 4.184092 |
EA31-1 | hyp | LPS | 15 | 31.1 | CSEA015 | 0.5738 | 42179058 | 4.217906 |
EA31-2 | amy | LPS | 39 | 31.2 | CSEA039 | 0.5634 | 41414572 | 4.141457 |
EA31-3 | hip | LPS | 63 | 31.3 | CSEA063 | 0.6144 | 45163495 | 4.516349 |
EA31-4 | pag | LPS | 87 | 31.4 | CSEA087 | 0.5989 | 44024116 | 4.402412 |
EA34-1 | hyp | OVA | 6 | 34.1 | CSEA006 | 0.6620 | 48662490 | 4.866249 |
EA34-2 | amy | OVA | 30 | 34.2 | CSEA030 | 0.5227 | 38422784 | 3.842278 |
EA34-3 | hip | OVA | 54 | 34.3 | CSEA054 | 0.6550 | 48147932 | 4.814793 |
EA34-4 | pag | OVA | 78 | 34.4 | CSEA078 | 0.6248 | 45927981 | 4.592798 |
EA35-1 | hyp | OVA | 7 | 35.1 | CSEA007 | 0.5053 | 37143740 | 3.714374 |
EA35-2 | amy | OVA | 31 | 35.2 | CSEA031 | 0.5840 | 42928843 | 4.292884 |
EA35-3 | hip | OVA | 55 | 35.3 | CSEA055 | 0.5617 | 41289608 | 4.128961 |
EA35-4 | pag | OVA | 79 | 35.4 | CSEA079 | 0.6147 | 45185547 | 4.518555 |
EA35-5 | NI | OVA | 48 | 35.5 | CSEA048 | 0.6017 | 44229940 | 4.422994 |
EA4-1 | hyp | OVA | 2 | 4.1 | CSEA002 | 0.5883 | 43244928 | 4.324493 |
EA4-2 | amy | OVA | 26 | 4.2 | CSEA026 | 0.5446 | 40032616 | 4.003262 |
EA4-3 | hip | OVA | 50 | 4.3 | CSEA050 | 0.5873 | 43171420 | 4.317142 |
EA4-4 | pag | OVA | 74 | 4.4 | CSEA074 | 0.5389 | 39613619 | 3.961362 |
EA4-5 | NI | OVA | 16 | 4.5 | CSEA016 | 0.6581 | 48375807 | 4.837581 |
EA5-1 | hyp | Control | 17 | 5.1 | CSEA017 | 0.5628 | 41370467 | 4.137047 |
EA5-2 | amy | Control | 41 | 5.2 | CSEA041 | 0.5405 | 39731232 | 3.973123 |
EA5-3 | hip | Control | 65 | 5.3 | CSEA065 | 0.6693 | 49199100 | 4.919910 |
EA5-4 | pag | Control | 89 | 5.4 | CSEA089 | 0.5372 | 39488655 | 3.948865 |
EA5-5 | NI | Control | 97 | 5.5 | CSEA097 | 0.6432 | 47280534 | 4.728053 |
EA6-1 | hyp | Control | 18 | 6.1 | CSEA018 | 0.6405 | 47082061 | 4.708206 |
EA6-2 | amy | Control | 42 | 6.2 | CSEA042 | 0.5692 | 41840920 | 4.184092 |
EA6-3 | hip | Control | 66 | 6.3 | CSEA066 | 0.6563 | 48243492 | 4.824349 |
EA6-4 | pag | Control | 90 | 6.4 | CSEA090 | 0.5525 | 40613332 | 4.061333 |
EA6-5 | NI | Control | 98 | 6.5 | CSEA098 | 0.5549 | 40789751 | 4.078975 |
EA7-1 | hyp | Control | 19 | 7.1 | CSEA019 | 0.5891 | 43303735 | 4.330374 |
EA7-3 | hip | Control | 67 | 7.3 | CSEA067 | 0.6897 | 50698669 | 5.069867 |
EA7-4 | pag | Control | 91 | 7.4 | CSEA091 | 0.5014 | 36857058 | 3.685706 |
EA7-5 | NI | Control | 99 | 7.5 | CSEA099 | 0.6789 | 49904780 | 4.990478 |
EA9-1 | hyp | OVA | 3 | 9.1 | CSEA003 | 0.5619 | 41304309 | 4.130431 |
EA9-2 | amy | OVA | 27 | 9.2 | CSEA027 | 0.4965 | 36496867 | 3.649687 |
EA9-3 | hip | OVA | 51 | 9.3 | CSEA051 | 0.4721 | 34703265 | 3.470326 |
EA9-4 | pag | OVA | 75 | 9.4 | CSEA075 | 0.6358 | 46736572 | 4.673657 |
EA9-5 | NI | OVA | 24 | 9.5 | CSEA024 | 0.5248 | 38577152 | 3.857715 |
Here I’ll look at a few different quality control measures.
The simplest is the number and proportion of reads that are assigned to genes.
par(mar=c(5,8,3,1))
barplot(colSums(xx),horiz=TRUE,las=1,xlab="num reads",col=ss$cols)
sums <- colSums(xx)
sums <- sums[order(sums)]
barplot(sums,horiz=TRUE,las=1,xlab="num reads",cex.names=0.8)
abline(v=15000000,col="red")
which(sums<15000000)
## EA9-5
## 1
barplot(head(sums,6),horiz=TRUE,las=1,xlab="num reads",cex.names=1)
abline(v=15000000,col="red")
which(sums<15000000)
## EA9-5
## 1
pdf("plot01_qc01.pdf")
par(mar=c(5,8,3,1))
barplot(colSums(xx),horiz=TRUE,las=1,xlab="num reads",col=ss$cols)
sums <- colSums(xx)
sums <- sums[order(sums)]
barplot(sums,horiz=TRUE,las=1,xlab="num reads",cex.names=0.8)
abline(v=15000000,col="red")
which(sums<15000000)
## EA9-5
## 1
barplot(head(sums,6),horiz=TRUE,las=1,xlab="num reads",cex.names=1)
abline(v=15000000,col="red")
which(sums<15000000)
## EA9-5
## 1
dev.off()
## png
## 2
Now to look at the rRNA content.
rrna <- read.table("https://raw.githubusercontent.com/markziemann/lung_brain/main/rrna_res.tsv")
myrrna <- rrna$V2/10000
names(myrrna) <- rrna$V1
myrrna <- myrrna[order(myrrna)]
barplot(myrrna,horiz=TRUE,las=1,xlab="percent rRNA reads",cex.names=0.8)
abline(v=10,col="red")
barplot(tail(myrrna),horiz=TRUE,las=1,xlab="percent rRNA reads",cex.names=0.8)
abline(v=10,col="red")
pdf("plot02_rrna01.pdf")
barplot(myrrna,horiz=TRUE,las=1,xlab="percent rRNA reads",cex.names=0.8)
abline(v=10,col="red")
barplot(tail(myrrna),horiz=TRUE,las=1,xlab="percent rRNA reads",cex.names=0.8)
abline(v=10,col="red")
dev.off()
## png
## 2
myrrna[which(myrrna>10)]
## EA29-5 EA23-5 EA3-1 EA9-5
## 10.1406 15.5685 18.0218 25.9348
Multidimensional scaling plot to show the variation between all samples, very similar to PCA.
par(mar=c(5.1,4.1,4.1,2.1))
mds <- cmdscale(dist(t(xx)))
cols <- as.numeric(as.factor(ss$Region))+1
pchs <- as.numeric(factor(ss$Treatment))+14
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=pchs, cex=4 ,col=cols )
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="tissue",
legend=unique(as.factor(ss$Region)) , fill=unique(cols), cex=1.2)
legend("left", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=unique(pchs), cex=1.2)
pdf("plot03_mds01.pdf")
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=pchs, cex=4 ,col=cols )
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="tissue",
legend=unique(as.factor(ss$Region)) , fill=unique(cols), cex=1.2)
legend("left", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=unique(pchs), cex=1.2)
dev.off()
## png
## 2
heatmap.2(cor(xx),trace="n",main="Pearson correlation heatmap",margin=c(8,8),cexRow=0.7,cexCol=0.7)
heatmap.2(cor(xx),trace="n",main="Pearson correlation heatmap",margin=c(8,8),cexRow=0.7,cexCol=0.7)
pdf("plot04_cor01.pdf")
heatmap.2(cor(xx),trace="n",main="Pearson correlation heatmap",margin=c(8,8),cexRow=0.7,cexCol=0.7)
heatmap.2(cor(xx),trace="n",main="Pearson correlation heatmap",margin=c(8,8),cexRow=0.7,cexCol=0.7)
dev.off()
## png
## 2
Here, I’ll give an example on how to separate the data matrix by tissue and then evaluate differential expression.
Don’t forget to remove poorly detected genes from the matrix with a threshold of 10 reads per sample on average.
There are 5 contrasts to set up, one for each tissue.
The separate sample sheets are called s1, s2, etc.
The separate counts tables are called x1, x2, etc.
I will begin with hypothalamus and leave the rest to Craig’s team.
# hyp 1
ss1 <- ss[which(ss$Region=="hyp"),]
xx1 <- xx[which(colnames(xx) %in% rownames(ss1))]
xx1 <- xx1[which(rowMeans(xx1)>=10),]
rpm1 <- xx1/colSums(xx1) *1e6
ss1_l <- ss[which(ss$Region=="hyp" & ss$Treatment != "OVA"),]
xx1_l <- xx[which(colnames(xx) %in% rownames(ss1_l))]
xx1_l <- xx1_l[which(rowMeans(xx1_l)>=10),]
rpm1_l <- xx1_l/colSums(xx1_l) *1e6
ss1_o <- ss[which(ss$Region=="hyp" & ss$Treatment != "LPS"),]
xx1_o <- xx[which(colnames(xx) %in% rownames(ss1_o))]
xx1_o <- xx1_o[which(rowMeans(xx1_o)>=10),]
rpm1_o <- xx1_o/colSums(xx1_o) *1e6
# amy 2
ss2 <- ss[which(ss$Region=="amy"),]
xx2 <- xx[which(colnames(xx) %in% rownames(ss2))]
xx2 <- xx2[which(rowMeans(xx2)>=10),]
rpm2 <- xx2/colSums(xx2) *1e6
ss2_l <- ss[which(ss$Region=="amy" & ss$Treatment != "OVA"),]
xx2_l <- xx[which(colnames(xx) %in% rownames(ss2_l))]
xx2_l <- xx2_l[which(rowMeans(xx2_l)>=10),]
rpm2_l <- xx2_l/colSums(xx2_l) *1e6
ss2_o <- ss[which(ss$Region=="amy" & ss$Treatment != "LPS"),]
xx2_o <- xx[which(colnames(xx) %in% rownames(ss2_o))]
xx2_o <- xx2_o[which(rowMeans(xx2_o)>=10),]
rpm1_o <- xx2_o/colSums(xx2_o) *1e6
# hip 3
ss3 <- ss[which(ss$Region=="hip"),]
xx3 <- xx[which(colnames(xx) %in% rownames(ss3))]
xx3 <- xx3[which(rowMeans(xx3)>=10),]
rpm3 <- xx3/colSums(xx3) *1e6
ss3_l <- ss[which(ss$Region=="hip" & ss$Treatment != "OVA"),]
xx3_l <- xx[which(colnames(xx) %in% rownames(ss3_l))]
xx3_l <- xx3_l[which(rowMeans(xx3_l)>=10),]
rpm3_l <- xx3_l/colSums(xx3_l) *1e6
ss3_o <- ss[which(ss$Region=="hip" & ss$Treatment != "LPS"),]
xx3_o <- xx[which(colnames(xx) %in% rownames(ss3_o))]
xx3_o <- xx3_o[which(rowMeans(xx3_o)>=10),]
rpm3_o <- xx3_o/colSums(xx3_o) *1e6
# pag 4
ss4 <- ss[which(ss$Region=="pag"),]
xx4 <- xx[which(colnames(xx) %in% rownames(ss4))]
xx4 <- xx4[which(rowMeans(xx4)>=10),]
rpm4 <- xx4/colSums(xx4) *1e6
ss4_l <- ss[which(ss$Region=="pag" & ss$Treatment != "OVA"),]
xx4_l <- xx[which(colnames(xx) %in% rownames(ss4_l))]
xx4_l <- xx4_l[which(rowMeans(xx4_l)>=10),]
rpm4_l <- xx4_l/colSums(xx4_l) *1e6
ss4_o <- ss[which(ss$Region=="pag" & ss$Treatment != "LPS"),]
xx4_o <- xx[which(colnames(xx) %in% rownames(ss4_o))]
xx4_o <- xx4_o[which(rowMeans(xx4_o)>=10),]
rpm4_o <- xx4_o/colSums(xx4_o) *1e6
# ni 5
ss5 <- ss[which(ss$Region=="NI"),]
xx5 <- xx[which(colnames(xx) %in% rownames(ss5))]
xx5 <- xx5[which(rowMeans(xx5)>=10),]
rpm5 <- xx5/colSums(xx5) *1e6
ss5_l <- ss[which(ss$Region=="NI" & ss$Treatment != "OVA"),]
xx5_l <- xx[which(colnames(xx) %in% rownames(ss5_l))]
xx5_l <- xx5_l[which(rowMeans(xx5_l)>=10),]
rpm5_l <- xx5_l/colSums(xx5_l) *1e6
ss5_o <- ss[which(ss$Region=="NI" & ss$Treatment != "LPS"),]
xx5_o <- xx[which(colnames(xx) %in% rownames(ss5_o))]
xx5_o <- xx5_o[which(rowMeans(xx5_o)>=10),]
rpm5_o <- xx5_o/colSums(xx5_o) *1e6
message("dimensions of objects: n genes, n samples")
## dimensions of objects: n genes, n samples
l <- list("xx"=xx,"xx1"=xx1,"xx1 l"= xx1_l,"xx1 o"=xx1_o,
"xx2"=xx2,"xx2 l"=xx2_l,"xx2 o"=xx2_o,
"xx3"=xx3,"xx3 l"=xx3_l,"xx3 o"=xx3_o,
"xx4"=xx4,"xx4 l"=xx4_l,"xx4 o"=xx5_o,
"xx5"=xx5,"xx5 l"=xx5_l,"xx5 o"=xx5_o)
lapply(l,dim)
## $xx
## [1] 55357 104
##
## $xx1
## [1] 17091 21
##
## $`xx1 l`
## [1] 17095 14
##
## $`xx1 o`
## [1] 17114 14
##
## $xx2
## [1] 16681 21
##
## $`xx2 l`
## [1] 16818 14
##
## $`xx2 o`
## [1] 16624 14
##
## $xx3
## [1] 16897 21
##
## $`xx3 l`
## [1] 16927 14
##
## $`xx3 o`
## [1] 16953 14
##
## $xx4
## [1] 17570 21
##
## $`xx4 l`
## [1] 17612 14
##
## $`xx4 o`
## [1] 17391 13
##
## $xx5
## [1] 17474 20
##
## $`xx5 l`
## [1] 17490 14
##
## $`xx5 o`
## [1] 17391 13
par(mar=c(5.1,4.1,4.1,2.1))
# hyp 1
mds <- cmdscale(dist(t(xx1)))
cols <- as.numeric(factor(ss1$Treatment))+1
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "hyp")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
pdf("plot05_mds02.pdf")
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "hyp")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
dev.off()
## png
## 2
# Sample 3.1à has high rRNA content
# Sample 9.1à no problem in its QC but will look for other explanation
rpm1m <- rowMeans(rpm1)
de1_inv <- data.frame(rpm1$EA9-1 , rpm1m )
colnames(de1_inv) <- c("ea9.1","mean")
de1_inv$ratio <- de1_inv$ea9.1 / de1_inv$mean
de1_inv <- de1_inv[order(-de1_inv$ratio),]
head(de1_inv,20)
## ea9.1 mean ratio
## ENSMUSG00000114436.2 Gm48283 5.460395 0.7938065 6.878748
## ENSMUSG00000099702.2 Gm29013 82.670670 12.1364486 6.811768
## ENSMUSG00000117748.2 Derpc 13.085689 2.0042898 6.528841
## ENSMUSG00000098975.8 Gm27177 5.749449 0.8876523 6.477141
## ENSMUSG00000092006.2 Gm17139 3.303794 0.6135307 5.384887
## ENSMUSG00000070343.4 Gm10288 25.019303 5.5587802 4.500862
## ENSMUSG00000098650.2 Commd1b 4.798293 1.2601104 3.807835
## ENSMUSG00000090207.3 4930524O07Rik 4.117273 1.2305351 3.345921
## ENSMUSG00000085543.2 Gm13568 7.429474 2.3912860 3.106895
## ENSMUSG00000102275.2 Gm37144 28.250022 9.4983644 2.974199
## ENSMUSG00000067038.7 Rps12-ps3 32.339252 10.9069365 2.965017
## ENSMUSG00000109168.2 Gm44709 3.050830 1.0810081 2.822208
## ENSMUSG00000047215.15 Rpl9 1155.582499 441.8288801 2.615453
## ENSMUSG00000064363.1 mt-Nd4 11528.972674 4420.5103731 2.608064
## ENSMUSG00000064341.1 mt-Nd1 9034.061500 3531.6208812 2.558050
## ENSMUSG00000064358.1 mt-Co3 17027.003003 6765.6965712 2.516667
## ENSMUSG00000064345.1 mt-Nd2 5394.822980 2151.2994247 2.507704
## ENSMUSG00000064337.1 mt-Rnr1 7039.600878 2822.1194872 2.494438
## ENSMUSG00000064368.1 mt-Nd6 1669.480601 669.8970307 2.492145
## ENSMUSG00000028459.12 Cd72 2.021702 0.8130221 2.486651
Remove 3.1 as it has high rRNA content. Sample 9.1 appears as possible outlier, but no obvious reason to exclude it from the analysis. EG no problem with QC and no gene expression profile features that indicate tissue contamination.
Then repeat the MDS.
ss1 <- ss1[rownames(ss1)!="EA3-1",]
xx1 <- xx1[,colnames(xx1) %in% rownames(ss1)]
# hyp 1
mds <- cmdscale(dist(t(xx1)))
cols <- as.numeric(factor(ss1$Treatment))+1
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "hyp")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
pdf("plot06_mds03.pdf")
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "hyp")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
dev.off()
## png
## 2
# amy 2
mds <- cmdscale(dist(t(xx2)))
cols <- as.numeric(factor(ss2$Treatment))+1
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "amy")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
pdf("plot07_mds04.pdf")
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "amy")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
dev.off()
## png
## 2
# hip 3
mds <- cmdscale(dist(t(xx3)))
cols <- as.numeric(factor(ss3$Treatment))+1
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "hip")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
pdf("plot08_mds05.pdf")
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "hip")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
dev.off()
## png
## 2
# pag 4
mds <- cmdscale(dist(t(xx4)))
cols <- as.numeric(factor(ss4$Treatment))+1
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "pag")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
pdf("plot09_mds06.pdf")
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "pag")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
dev.off()
## png
## 2
# ni 5
mds <- cmdscale(dist(t(xx5)))
cols <- as.numeric(factor(ss5$Treatment))+1
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "ni")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
pdf("plot10_mds07.pdf")
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n",pch=19, cex=4 ,col=cols , main = "ni")
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss$Treatment)) , pch=19,col=unique(cols), cex=1.2)
dev.off()
## png
## 2
For each brain region, there are two treatments, and so two contrasts are performed.
Before we do that, let’s look at the MDS plot of the hypothalamus data.
par(mar=c(5.1,4.1,4.1,2.1))
mds <- cmdscale(dist(t(xx1)))
cols <- as.numeric(factor(ss1$Treatment))+1
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n", pch=19, cex=4 ,col=cols )
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss1$Treatment)) , col=unique(cols), pch=19, cex=1.2)
pdf("plot11_mds08.pdf")
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2",
type = "p",bty="n", pch=19, cex=4 ,col=cols )
text(mds, labels=rownames(mds) ,col="black")
legend("bottomleft", inset=.02, title="treatment",
legend=unique(as.factor(ss1$Treatment)) , col=unique(cols), pch=19, cex=1.2)
dev.off()
## png
## 2
Now run DESeq2 for all contrasts.
# 1 hyp
dds <- DESeqDataSetFromMatrix(countData = xx1_l , colData = ss1_l , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 7 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge1_l <- dge
d1up_l <- rownames(subset(dge1_l,padj <= 0.05 & log2FoldChange > 0))
d1dn_l <- rownames(subset(dge1_l,padj <= 0.05 & log2FoldChange < 0))
write.table(dge1_l,file="dge1_l.tsv",quote=FALSE,sep="\t")
dds <- DESeqDataSetFromMatrix(countData = xx1_o , colData = ss1_o , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 10 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge1_o <- dge
d1up_o <- rownames(subset(dge1_o,padj <= 0.05 & log2FoldChange > 0))
d1dn_o <- rownames(subset(dge1_o,padj <= 0.05 & log2FoldChange < 0))
write.table(dge1_o,file="dge1_o.tsv",quote=FALSE,sep="\t")
# 2 amy
dds <- DESeqDataSetFromMatrix(countData = xx2_l , colData = ss2_l , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 5 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge2_l <- dge
d2up_l <- rownames(subset(dge2_l,padj <= 0.05 & log2FoldChange > 0))
d2dn_l <- rownames(subset(dge2_l,padj <= 0.05 & log2FoldChange < 0))
write.table(dge2_l,file="dge2_l.tsv",quote=FALSE,sep="\t")
dds <- DESeqDataSetFromMatrix(countData = xx2_o , colData = ss2_o , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 19 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge2_o <- dge
d2up_o <- rownames(subset(dge2_o,padj <= 0.05 & log2FoldChange > 0))
d2dn_o <- rownames(subset(dge2_o,padj <= 0.05 & log2FoldChange < 0))
write.table(dge2_o,file="dge2_o.tsv",quote=FALSE,sep="\t")
# 3 hip
dds <- DESeqDataSetFromMatrix(countData = xx3_l , colData = ss3_l , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 2 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge3_l <- dge
d3up_l <- rownames(subset(dge3_l,padj <= 0.05 & log2FoldChange > 0))
d3dn_l <- rownames(subset(dge3_l,padj <= 0.05 & log2FoldChange < 0))
write.table(dge3_l,file="dge3_l.tsv",quote=FALSE,sep="\t")
dds <- DESeqDataSetFromMatrix(countData = xx3_o , colData = ss3_o , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 6 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge3_o <- dge
d3up_o <- rownames(subset(dge3_o,padj <= 0.05 & log2FoldChange > 0))
d3dn_o <- rownames(subset(dge3_o,padj <= 0.05 & log2FoldChange < 0))
write.table(dge3_o,file="dge3_o.tsv",quote=FALSE,sep="\t")
# 4 pag
dds <- DESeqDataSetFromMatrix(countData = xx4_l , colData = ss4_l , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 6 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge4_l <- dge
d4up_l <- rownames(subset(dge4_l,padj <= 0.05 & log2FoldChange > 0))
d4dn_l <- rownames(subset(dge4_l,padj <= 0.05 & log2FoldChange < 0))
write.table(dge4_l,file="dge4_l.tsv",quote=FALSE,sep="\t")
dds <- DESeqDataSetFromMatrix(countData = xx4_o , colData = ss4_o , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 4 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge4_o <- dge
d4up_o <- rownames(subset(dge4_o,padj <= 0.05 & log2FoldChange > 0))
d4dn_o <- rownames(subset(dge4_o,padj <= 0.05 & log2FoldChange < 0))
write.table(dge4_o,file="dge4_o.tsv",quote=FALSE,sep="\t")
# 5 NI
dds <- DESeqDataSetFromMatrix(countData = xx5_l , colData = ss5_l , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 15 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge5_l <- dge
d5up_l <- rownames(subset(dge5_l,padj <= 0.05 & log2FoldChange > 0))
d5dn_l <- rownames(subset(dge5_l,padj <= 0.05 & log2FoldChange < 0))
write.table(dge5_l,file="dge5_l.tsv",quote=FALSE,sep="\t")
dds <- DESeqDataSetFromMatrix(countData = xx5_o , colData = ss5_o , design = ~ Treatment )
## converting counts to integer mode
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
res <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 41 genes
## -- DESeq argument 'minReplicatesForReplace' = 7
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing
z <- results(res)
vsd <- vst(dds, blind=FALSE)
zz <- cbind(as.data.frame(z),assay(vsd))
dge <- as.data.frame(zz[order(zz$pvalue),])
dge5_o <- dge
d5up_o <- rownames(subset(dge5_o,padj <= 0.05 & log2FoldChange > 0))
d5dn_o <- rownames(subset(dge5_o,padj <= 0.05 & log2FoldChange < 0))
write.table(dge5_o,file="dge5_o.tsv",quote=FALSE,sep="\t")
Here let’s look at some plots.
MA plot shows the average level and fold change of all detected genes. Volcano plot shows the fold change and the significance, as measured by -log(p-value). Significant genes are shown as red points.
There are heatmaps of the top ranked genes by p-value. Above the gene expression values there is a bar in orange/gray colours. Control is shown in orange and treatment in grey.
maplot <- function(de,contrast_name) {
de <- de[which(!is.na(de$padj)),]
sig <-subset(de, padj < 0.05 )
up <-rownames(subset(de, padj < 0.05 & log2FoldChange > 0))
dn <-rownames(subset(de, padj < 0.05 & log2FoldChange < 0))
GENESUP <- length(up)
GENESDN <- length(dn)
DET=nrow(de)
SUBHEADER = paste(GENESUP, "up, ", GENESDN, "down", DET, "detected")
ns <-subset(de, padj > 0.05 )
plot(log2(de$baseMean),de$log2FoldChange,
xlab="log2 basemean", ylab="log2 foldchange",
pch=19, cex=0.5, col="dark gray",
main=contrast_name, cex.main=1)
points(log2(sig$baseMean),sig$log2FoldChange,
pch=19, cex=0.5, col="red")
mtext(SUBHEADER,cex = 1)
}
make_volcano_old <- function(de,name) {
de <- de[which(!is.na(de$padj)),]
de$pvalue[which(de$pvalue==0)] <- 1e-320
sig <- subset(de,padj<0.05)
N_SIG=nrow(sig)
N_UP=nrow(subset(sig,log2FoldChange>0))
N_DN=nrow(subset(sig,log2FoldChange<0))
DET=nrow(de)
HEADER=paste( DET, "detected,", N_SIG,"@5%FDR:", N_DN, "dn", N_UP, "up")
plot(de$log2FoldChange,-log10(de$pval),cex=0.5,pch=19,col="darkgray",
main=name, xlab="log2 FC", ylab="-log10 pval")
mtext(HEADER)
grid()
points(sig$log2FoldChange,-log10(sig$pval),cex=0.5,pch=19,col="red")
}
make_volcano <- function(de,name) {
de <- de[which(!is.na(de$padj)),]
de$pvalue[which(de$pvalue==0)] <- 1e-320
sig <- subset(de,padj<0.05)
# get 5% FDR thresh
myp = tail(sig,1)$pvalue
myfdr = tail(sig,1)$padj
fdrthresh = -log10(myp / myfdr * 0.05)
N_SIG=nrow(sig)
N_UP=nrow(subset(sig,log2FoldChange>0))
N_DN=nrow(subset(sig,log2FoldChange<0))
DET=nrow(de)
HEADER=paste( DET, "detected,", N_SIG,"@5%FDR:", N_DN, "dn", N_UP, "up")
plot(de$log2FoldChange,-log10(de$pval),cex=0.5,pch=19,col="darkgray",
main=name, xlab="log2 FC", ylab="-log10 pval")
mtext(HEADER)
abline(h=fdrthresh,col="red",lty=2)
abline(v=0,col="black",lty=2)
grid()
points(sig$log2FoldChange,-log10(sig$pval),cex=0.5,pch=19,col="red")
}
make_heatmap <- function(de,name,myss,mx,n=30){
colfunc <- colorRampPalette(c("blue", "white", "red"))
csc <- myss$Treatment
csc <- gsub("Control","orange",csc)
csc <- gsub("LPS","gray",csc)
csc <- gsub("OVA","yellow",csc)
mxn <- mx/rowSums(mx)*1000000
x <- mxn[which(rownames(mxn) %in% rownames(head(de,n))),]
heatmap.2(as.matrix(x),trace="none",col=colfunc(25),scale="row", margins = c(10,15), cexRow=0.7,
main=paste("Top ranked",n,"genes in",name) , ColSideColors = csc )
mtext("ctrl=orange, LPS=gray, OVA=yellow")
}
make_heatmap2 <- function(de,name,myss,mx,n=30){
colfunc <- colorRampPalette(c("blue", "white", "red"))
csc <- myss$Treatment
csc <- gsub("Control","orange",csc)
csc <- gsub("LPS","gray",csc)
csc <- gsub("OVA","yellow",csc)
mxn <- mx/rowSums(mx)*1000000
x <- mxn[which(rownames(mxn) %in% rownames(head(de,n))),]
rownames(x) <- sapply(strsplit(rownames(x)," "),"[[",2)
heatmap.2(as.matrix(x),trace="none",col=colfunc(25),scale="row", margins = c(10,15), cexRow=0.7,
main=paste("Top ranked",n,"genes in",name) , ColSideColors = csc )
mtext("ctrl=orange, LPS=gray, OVA=yellow")
}
mymds <- function(de,name,myss,mx) {
mds <- cmdscale(dist(t(mx)))
csc <- myss$Treatment
csc <- gsub("Control","orange",csc)
csc <- gsub("LPS","gray",csc)
csc <- gsub("OVA","yellow",csc)
plot(mds, xlab="Coordinate 1", ylab="Coordinate 2", main = name ,
type = "p",bty="n",pch=19, cex=4 ,col=csc )
text(mds, labels=rownames(mds) ,col="black")
legend("topright", inset=.02, title="treatment",
legend=unique(as.factor(myss$Treatment)) , pch=19, col=unique(csc), cex=1.4)
}
We show an MDS plot, MA plot, volcano plot, heatmap and table of top results for each contrast.
mymds(de=dge1_l,name="Cont1: Effect of LPS treatment in hypothalamus",myss=ss1_l,mx=xx1_l)
maplot(dge1_l,"Cont1: Effect of LPS treatment in hypothalamus")
make_volcano(dge1_l,"Cont1: Effect of LPS treatment in hypothalamus")
make_heatmap(de=dge1_l,name="Cont1: Effect of LPS treatment in hypothalamus",myss=ss1_l,mx=xx1_l,n=50)
make_heatmap2(de=dge1_l,name="Cont1: Effect of LPS treatment in hypothalamus",myss=ss1_l,mx=xx1_l,n=50)
dge1_l[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 1: Effect of LPS treatment in hypothalamus") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000054252.19 Fgfr3 | 2892.62590 | 0.3328185 | 0.0609055 | 5.464504 | 0.00e+00 | 0.0006909 |
ENSMUSG00000022715.4 Tmem114 | 100.67950 | 0.8836136 | 0.1650244 | 5.354442 | 1.00e-07 | 0.0006909 |
ENSMUSG00000025498.16 Irf7 | 77.47802 | -0.8571473 | 0.1692562 | -5.064199 | 4.00e-07 | 0.0017092 |
ENSMUSG00000027875.13 Hmgcs2 | 180.91714 | -0.6653837 | 0.1315622 | -5.057562 | 4.00e-07 | 0.0017092 |
ENSMUSG00000028820.14 Sfpq | 2569.85119 | 0.2618911 | 0.0527559 | 4.964201 | 7.00e-07 | 0.0022213 |
ENSMUSG00000041926.16 Rnpep | 654.35913 | 0.2935820 | 0.0598784 | 4.902971 | 9.00e-07 | 0.0025330 |
ENSMUSG00000079363.8 Gbp4 | 72.55881 | -1.1002191 | 0.2263856 | -4.859934 | 1.20e-06 | 0.0027008 |
ENSMUSG00000018822.8 Sfrp5 | 659.14853 | 0.4883485 | 0.1033004 | 4.727461 | 2.30e-06 | 0.0041077 |
ENSMUSG00000026222.17 Sp100 | 55.19664 | -0.7479415 | 0.1582800 | -4.725433 | 2.30e-06 | 0.0041077 |
ENSMUSG00000028655.12 Mfsd2a | 443.11911 | 0.5572282 | 0.1205845 | 4.621059 | 3.80e-06 | 0.0061467 |
ENSMUSG00000040253.16 Gbp7 | 103.19267 | -0.6006230 | 0.1353212 | -4.438500 | 9.10e-06 | 0.0132588 |
ENSMUSG00000004891.17 Nes | 206.29657 | 0.4958473 | 0.1122069 | 4.419045 | 9.90e-06 | 0.0133010 |
ENSMUSG00000035578.17 Iqcg | 381.27559 | 0.4608992 | 0.1047871 | 4.398437 | 1.09e-05 | 0.0135034 |
ENSMUSG00000108852.2 Gm44911 | 34.74705 | 0.9903775 | 0.2263409 | 4.375601 | 1.21e-05 | 0.0139263 |
ENSMUSG00000024907.8 Gal | 1601.34229 | 0.3959929 | 0.0914229 | 4.331441 | 1.48e-05 | 0.0153554 |
ENSMUSG00000020717.20 Pecam1 | 340.34994 | -0.3114213 | 0.0720066 | -4.324902 | 1.53e-05 | 0.0153554 |
ENSMUSG00000051159.17 Cited1 | 338.53219 | 0.6483567 | 0.1506781 | 4.302925 | 1.69e-05 | 0.0159634 |
ENSMUSG00000051427.15 Ccdc157 | 914.73405 | 0.2973665 | 0.0699150 | 4.253256 | 2.11e-05 | 0.0188445 |
ENSMUSG00000028519.17 Dab1 | 925.88165 | -0.2341632 | 0.0557089 | -4.203335 | 2.63e-05 | 0.0222867 |
ENSMUSG00000064247.15 Plcxd1 | 838.55340 | 0.2157020 | 0.0515714 | 4.182586 | 2.88e-05 | 0.0232011 |
mymds(de=dge1_o,name="Cont1: Effect of OVA treatment in hypothalamus",myss=ss1_o,mx=xx1_o)
maplot(dge1_o,"Cont1: Effect of OVA treatment in hypothalamus")
make_volcano(dge1_o,"Cont1: Effect of OVA treatment in hypothalamus")
make_heatmap(de=dge1_o,name="Cont1: Effect of OVA treatment in hypothalamus",myss=ss1_o,mx=xx1_o,n=50)
make_heatmap2(de=dge1_o,name="Cont1: Effect of OVA treatment in hypothalamus",myss=ss1_o,mx=xx1_o,n=50)
dge1_o[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 1: Effect of treatment in hypothalamus") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000078880.11 Gm14308 | 92.882830 | -0.9356691 | 0.2192963 | -4.266689 | 0.0000198 | 0.3395346 |
ENSMUSG00000036915.18 Kirrel2 | 169.164941 | 0.8427760 | 0.2297223 | 3.668673 | 0.0002438 | 0.9998282 |
ENSMUSG00000044285.9 Ubb-ps | 2336.340595 | -0.3680306 | 0.1025092 | -3.590221 | 0.0003304 | 0.9998282 |
ENSMUSG00000085328.3 Gm17131 | 141.467376 | -0.6729148 | 0.1891178 | -3.558178 | 0.0003734 | 0.9998282 |
ENSMUSG00000030413.8 Pglyrp1 | 106.131949 | 0.6503273 | 0.1833759 | 3.546416 | 0.0003905 | 0.9998282 |
ENSMUSG00000033502.16 Cdc14a | 100.974101 | 0.4596276 | 0.1301010 | 3.532853 | 0.0004111 | 0.9998282 |
ENSMUSG00000108601.2 Gm44645 | 94.446899 | 0.6303080 | 0.1803630 | 3.494664 | 0.0004747 | 0.9998282 |
ENSMUSG00000075014.2 Gm10800 | 33.751721 | 3.2629734 | 0.9463915 | 3.447805 | 0.0005652 | 0.9998282 |
ENSMUSG00000054252.19 Fgfr3 | 2730.435705 | 0.2147599 | 0.0630824 | 3.404437 | 0.0006630 | 0.9998282 |
ENSMUSG00000059970.8 Hspa2 | 641.897572 | 0.3132088 | 0.0939489 | 3.333822 | 0.0008566 | 0.9998282 |
ENSMUSG00000092483.2 Gm20421 | 22.954083 | 0.7081938 | 0.2204315 | 3.212761 | 0.0013147 | 0.9998282 |
ENSMUSG00000021892.15 Sh3bp5 | 762.980552 | -0.1810008 | 0.0565574 | -3.200302 | 0.0013728 | 0.9998282 |
ENSMUSG00000041079.13 Rwdd2b | 175.004412 | 0.2696634 | 0.0866861 | 3.110802 | 0.0018658 | 0.9998282 |
ENSMUSG00000044707.8 Ccnjl | 31.491228 | -0.6302744 | 0.2031683 | -3.102228 | 0.0019207 | 0.9998282 |
ENSMUSG00000053279.9 Aldh1a1 | 339.445293 | 0.4826510 | 0.1581715 | 3.051441 | 0.0022775 | 0.9998282 |
ENSMUSG00000020123.7 Avpr1a | 98.069219 | 0.4957189 | 0.1626906 | 3.047004 | 0.0023113 | 0.9998282 |
ENSMUSG00000020374.17 Rasgef1c | 258.064242 | -0.2698852 | 0.0889452 | -3.034285 | 0.0024111 | 0.9998282 |
ENSMUSG00000091318.3 Gm5415 | 9.042075 | 1.4281893 | 0.4797236 | 2.977109 | 0.0029098 | 0.9998282 |
ENSMUSG00000021750.17 Fam107a | 3483.985160 | 0.2995835 | 0.1007207 | 2.974398 | 0.0029356 | 0.9998282 |
ENSMUSG00000013089.16 Etv5 | 587.848238 | 0.2785646 | 0.0939914 | 2.963723 | 0.0030394 | 0.9998282 |
pdf("plot12_de01.pdf")
mymds(de=dge1_l,name="Cont1: Effect of LPS treatment in hypothalamus",myss=ss1_l,mx=xx1_l)
maplot(dge1_l,"Cont1: Effect of LPS treatment in hypothalamus")
make_volcano(dge1_l,"Cont1: Effect of LPS treatment in hypothalamus")
make_heatmap(de=dge1_l,name="Cont1: Effect of LPS treatment in hypothalamus",myss=ss1_l,mx=xx1_l,n=50)
make_heatmap2(de=dge1_l,name="Cont1: Effect of LPS treatment in hypothalamus",myss=ss1_l,mx=xx1_l,n=50)
mymds(de=dge1_o,name="Cont1: Effect of OVA treatment in hypothalamus",myss=ss1_o,mx=xx1_o)
maplot(dge1_o,"Cont1: Effect of OVA treatment in hypothalamus")
make_volcano(dge1_o,"Cont1: Effect of OVA treatment in hypothalamus")
make_heatmap(de=dge1_o,name="Cont1: Effect of OVA treatment in hypothalamus",myss=ss1_o,mx=xx1_o,n=50)
make_heatmap2(de=dge1_o,name="Cont1: Effect of OVA treatment in hypothalamus",myss=ss1_o,mx=xx1_o,n=50)
dev.off()
## png
## 2
mymds(de=dge2_l,name="Cont2: Effect of LPS treatment in amygdala",myss=ss2_l,mx=xx2_l)
maplot(dge2_l,"Cont2: Effect of LPS treatment in amygdala")
make_volcano(dge2_l,"Cont2: Effect of LPS treatment in amygdala")
make_heatmap(de=dge2_l,name="Cont2: Effect of LPS treatment in amygdala",myss=ss2_l,mx=xx2_l,n=50)
make_heatmap2(de=dge2_l,name="Cont2: Effect of LPS treatment in amygdala",myss=ss2_l,mx=xx2_l,n=50)
dge2_l[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 2: Effect of LPS treatment in amygdala") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000025498.16 Irf7 | 54.87672 | -1.2294874 | 0.2232120 | -5.508159 | 0.0000000 | 0.0006098 |
ENSMUSG00000079363.8 Gbp4 | 62.26653 | -0.9118851 | 0.1718895 | -5.305066 | 0.0000001 | 0.0006560 |
ENSMUSG00000036915.18 Kirrel2 | 254.72910 | 0.6575428 | 0.1241095 | 5.298088 | 0.0000001 | 0.0006560 |
ENSMUSG00000032902.2 Slc16a1 | 429.58840 | -0.4275636 | 0.0835198 | -5.119305 | 0.0000003 | 0.0011124 |
ENSMUSG00000018822.8 Sfrp5 | 179.17105 | 0.6336687 | 0.1241260 | 5.105042 | 0.0000003 | 0.0011124 |
ENSMUSG00000078921.4 Tgtp2 | 10.75353 | -2.2904610 | 0.4554595 | -5.028902 | 0.0000005 | 0.0013827 |
ENSMUSG00000027875.13 Hmgcs2 | 130.58206 | -0.7567441 | 0.1547343 | -4.890602 | 0.0000010 | 0.0024153 |
ENSMUSG00000007097.15 Atp1a2 | 13121.54535 | 0.2852928 | 0.0589693 | 4.837987 | 0.0000013 | 0.0027573 |
ENSMUSG00000027333.19 Smox | 993.08881 | 0.3229665 | 0.0686244 | 4.706291 | 0.0000025 | 0.0047140 |
ENSMUSG00000004891.17 Nes | 147.63914 | 0.5842943 | 0.1253589 | 4.660972 | 0.0000031 | 0.0052929 |
ENSMUSG00000102275.2 Gm37144 | 83.14632 | -1.1552394 | 0.2515488 | -4.592506 | 0.0000044 | 0.0066959 |
ENSMUSG00000089824.11 Rbm12 | 379.55172 | -0.3020121 | 0.0696401 | -4.336755 | 0.0000145 | 0.0202659 |
ENSMUSG00000060862.11 Zbtb40 | 209.30249 | 0.4768500 | 0.1107158 | 4.306972 | 0.0000166 | 0.0214112 |
ENSMUSG00000044712.16 Slc38a6 | 1014.61207 | -0.4381471 | 0.1034282 | -4.236245 | 0.0000227 | 0.0273039 |
ENSMUSG00000020680.16 Taf15 | 956.83934 | 0.3203512 | 0.0800847 | 4.000154 | 0.0000633 | 0.0709734 |
ENSMUSG00000034173.14 Zbed5 | 124.05394 | -0.4521479 | 0.1157090 | -3.907630 | 0.0000932 | 0.0979709 |
ENSMUSG00000006390.16 Elovl1 | 217.76918 | 0.3244737 | 0.0834422 | 3.888604 | 0.0001008 | 0.0997431 |
ENSMUSG00000052911.10 Lamb2 | 645.20070 | 0.3401842 | 0.0883340 | 3.851114 | 0.0001176 | 0.1098606 |
ENSMUSG00000031465.7 Angpt2 | 32.01754 | -0.7723745 | 0.2036123 | -3.793359 | 0.0001486 | 0.1315547 |
ENSMUSG00000100750.2 Gm29084 | 513.48571 | -0.3339886 | 0.0899518 | -3.712974 | 0.0002048 | 0.1722483 |
mymds(de=dge2_o,name="Cont2: Effect of OVA treatment in amygdala",myss=ss2_o,mx=xx2_o)
maplot(dge2_o,"Cont2: Effect of OVA treatment in amygdala")
make_volcano(dge2_o,"Cont2: Effect of OVA treatment in amygdala")
make_heatmap(de=dge2_o,name="Cont2: Effect of OVA treatment in amygdala",myss=ss2_o,mx=xx2_o,n=50)
make_heatmap2(de=dge2_o,name="Cont2: Effect of OVA treatment in amygdala",myss=ss2_o,mx=xx2_o,n=50)
dge2_o[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 2: Effect of treatment in amygdala") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000107676.2 Gm44178 | 185.4223 | -0.8648437 | 0.1423153 | -6.076956 | 0.0e+00 | 0.0000164 |
ENSMUSG00000025791.19 Pgm1 | 1679.6378 | 0.2939654 | 0.0506255 | 5.806664 | 0.0e+00 | 0.0000315 |
ENSMUSG00000030889.15 Vwa3a | 101.9254 | -0.7011680 | 0.1211103 | -5.789499 | 0.0e+00 | 0.0000315 |
ENSMUSG00000059149.18 Mfsd4a | 841.7077 | -0.3390365 | 0.0621451 | -5.455561 | 0.0e+00 | 0.0001636 |
ENSMUSG00000036915.18 Kirrel2 | 266.3206 | 0.8297410 | 0.1549163 | 5.356062 | 1.0e-07 | 0.0002019 |
ENSMUSG00000024782.8 Ak3 | 1076.8616 | 0.3287706 | 0.0615097 | 5.345017 | 1.0e-07 | 0.0002019 |
ENSMUSG00000018822.8 Sfrp5 | 171.4710 | 0.6007642 | 0.1168718 | 5.140370 | 3.0e-07 | 0.0005249 |
ENSMUSG00000032507.16 Fbxl2 | 973.7927 | -0.3006599 | 0.0592058 | -5.078214 | 4.0e-07 | 0.0006064 |
ENSMUSG00000053279.9 Aldh1a1 | 232.1522 | 0.5728101 | 0.1130798 | 5.065538 | 4.0e-07 | 0.0006064 |
ENSMUSG00000034413.15 Neurl1b | 998.7317 | -0.4392775 | 0.0892047 | -4.924376 | 8.0e-07 | 0.0010672 |
ENSMUSG00000038633.6 Degs1 | 1216.6775 | 0.3005384 | 0.0611145 | 4.917627 | 9.0e-07 | 0.0010672 |
ENSMUSG00000030256.12 Bhlhe41 | 1281.0403 | 0.3288133 | 0.0684756 | 4.801908 | 1.6e-06 | 0.0017551 |
ENSMUSG00000030499.10 Kctd15 | 178.8979 | -0.4463070 | 0.0942096 | -4.737384 | 2.2e-06 | 0.0022317 |
ENSMUSG00000030209.15 Grin2b | 4116.6194 | -0.4866258 | 0.1043231 | -4.664600 | 3.1e-06 | 0.0029599 |
ENSMUSG00000038738.16 Shank1 | 6687.6830 | -0.3929989 | 0.0868324 | -4.525946 | 6.0e-06 | 0.0053717 |
ENSMUSG00000006390.16 Elovl1 | 227.2895 | 0.5070433 | 0.1126133 | 4.502516 | 6.7e-06 | 0.0054351 |
ENSMUSG00000038260.11 Trpm4 | 233.7264 | -0.4194385 | 0.0935316 | -4.484457 | 7.3e-06 | 0.0054351 |
ENSMUSG00000034818.18 Celf5 | 4451.3635 | -0.3143020 | 0.0701827 | -4.478343 | 7.5e-06 | 0.0054351 |
ENSMUSG00000079018.11 Ly6c1 | 374.3433 | 0.4597376 | 0.1027940 | 4.472418 | 7.7e-06 | 0.0054351 |
ENSMUSG00000031513.9 Leprotl1 | 1221.1671 | 0.2195997 | 0.0492131 | 4.462220 | 8.1e-06 | 0.0054351 |
pdf("plot13_de02.pdf")
mymds(de=dge2_l,name="Cont2: Effect of LPS treatment in amygdala",myss=ss2_l,mx=xx2_l)
maplot(dge2_l,"Cont2: Effect of LPS treatment in amygdala")
make_volcano(dge2_l,"Cont2: Effect of LPS treatment in amygdala")
make_heatmap(de=dge2_l,name="Cont2: Effect of LPS treatment in amygdala",myss=ss2_l,mx=xx2_l,n=50)
make_heatmap2(de=dge2_l,name="Cont2: Effect of LPS treatment in amygdala",myss=ss2_l,mx=xx2_l,n=50)
mymds(de=dge2_o,name="Cont2: Effect of OVA treatment in amygdala",myss=ss2_o,mx=xx2_o)
maplot(dge2_o,"Cont2: Effect of OVA treatment in amygdala")
make_volcano(dge2_o,"Cont2: Effect of OVA treatment in amygdala")
make_heatmap(de=dge2_o,name="Cont2: Effect of OVA treatment in amygdala",myss=ss2_o,mx=xx2_o,n=50)
make_heatmap2(de=dge2_o,name="Cont2: Effect of OVA treatment in amygdala",myss=ss2_o,mx=xx2_o,n=50)
dev.off()
## png
## 2
mymds(de=dge3_l,name="Cont3: Effect of LPS treatment in hippocampus",myss=ss3_l,mx=xx3_l)
maplot(dge3_l,"Cont3: Effect of LPS treatment in hippocampus")
make_volcano(dge3_l,"Cont3: Effect of LPS treatment in hippocampus")
make_heatmap(de=dge3_l,name="Cont3: Effect of LPS treatment in hippocampus",myss=ss3_l,mx=xx3_l,n=50)
make_heatmap2(de=dge3_l,name="Cont3: Effect of LPS treatment in hippocampus",myss=ss3_l,mx=xx3_l,n=50)
dge3_l[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 3: Effect of LPS treatment in hippocampus") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000100862.2 Gm10925 | 4975.55176 | 7.1868883 | 0.6335748 | 11.343393 | 0 | 0 |
ENSMUSG00000070713.6 Gm10282 | 208.77183 | -1.0025619 | 0.0983370 | -10.195161 | 0 | 0 |
ENSMUSG00000040447.16 Spns2 | 1554.46939 | 0.5308742 | 0.0527511 | 10.063750 | 0 | 0 |
ENSMUSG00000081603.2 Gm14681 | 107.33155 | -1.1109529 | 0.1168663 | -9.506187 | 0 | 0 |
ENSMUSG00000068882.14 Ssb | 1815.27129 | -0.5934983 | 0.0624491 | -9.503708 | 0 | 0 |
ENSMUSG00000096006.2 Gm21596 | 253.23289 | -0.7510200 | 0.0804176 | -9.338997 | 0 | 0 |
ENSMUSG00000024261.7 Syt4 | 2094.97545 | -0.5610059 | 0.0603557 | -9.294993 | 0 | 0 |
ENSMUSG00000025104.14 Hdgfl3 | 2080.41389 | -0.4435812 | 0.0489446 | -9.062924 | 0 | 0 |
ENSMUSG00000017831.9 Rab5a | 2217.40639 | -0.4345348 | 0.0480838 | -9.037037 | 0 | 0 |
ENSMUSG00000047879.18 Usp14 | 2271.47824 | -0.4272710 | 0.0481656 | -8.870869 | 0 | 0 |
ENSMUSG00000022884.17 Eif4a2 | 11561.93282 | -0.4719840 | 0.0534312 | -8.833493 | 0 | 0 |
ENSMUSG00000001891.17 Ugp2 | 1364.63153 | -0.5993403 | 0.0678779 | -8.829678 | 0 | 0 |
ENSMUSG00000084838.4 Gm10241 | 29.45661 | 8.3716581 | 0.9510624 | 8.802428 | 0 | 0 |
ENSMUSG00000026775.10 Yme1l1 | 1252.73281 | -0.4786876 | 0.0544396 | -8.792996 | 0 | 0 |
ENSMUSG00000020650.16 Bcap29 | 663.57029 | -0.7001171 | 0.0803572 | -8.712561 | 0 | 0 |
ENSMUSG00000042303.20 Sgsm3 | 1281.38919 | 0.3735305 | 0.0430203 | 8.682650 | 0 | 0 |
ENSMUSG00000071533.12 Pcnp | 2553.37357 | -0.4279186 | 0.0500775 | -8.545132 | 0 | 0 |
ENSMUSG00000020238.15 Ncln | 1446.32940 | 0.4261658 | 0.0499872 | 8.525490 | 0 | 0 |
ENSMUSG00000014905.5 Dnajb9 | 663.84669 | -0.6632246 | 0.0778235 | -8.522161 | 0 | 0 |
ENSMUSG00000057963.10 Itpk1 | 1451.17452 | 0.4522885 | 0.0532812 | 8.488701 | 0 | 0 |
mymds(de=dge3_o,name="Cont3: Effect of OVA treatment in hippocampus",myss=ss3_o,mx=xx3_o)
maplot(dge3_o,"Cont3: Effect of OVA treatment in hippocampus")
make_volcano(dge3_o,"Cont3: Effect of OVA treatment in hippocampus")
make_heatmap(de=dge3_o,name="Cont3: Effect of OVA treatment in hippocampus",myss=ss3_o,mx=xx3_o,n=50)
make_heatmap2(de=dge3_o,name="Cont3: Effect of OVA treatment in hippocampus",myss=ss3_o,mx=xx3_o,n=50)
dge3_o[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 3: Effect of treatment in hippocampus") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000008668.16 Rps18 | 286.52172 | -1.2451711 | 0.1674818 | -7.434667 | 0.0e+00 | 0.0000000 |
ENSMUSG00000069008.4 Gm5537 | 14.35881 | 21.8370339 | 2.9884331 | 7.307185 | 0.0e+00 | NA |
ENSMUSG00000103034.2 Gm8797 | 107.80783 | -1.1733731 | 0.1762296 | -6.658206 | 0.0e+00 | NA |
ENSMUSG00000100862.2 Gm10925 | 1945.80382 | 5.8231351 | 0.9533584 | 6.108023 | 0.0e+00 | 0.0000059 |
ENSMUSG00000040447.16 Spns2 | 1527.35914 | 0.4988942 | 0.0886928 | 5.624970 | 0.0e+00 | 0.0000723 |
ENSMUSG00000081603.2 Gm14681 | 113.88393 | -0.8342655 | 0.1522504 | -5.479560 | 0.0e+00 | 0.0001247 |
ENSMUSG00000031858.17 Mau2 | 1851.99608 | 0.4053541 | 0.0759055 | 5.340248 | 1.0e-07 | 0.0002171 |
ENSMUSG00000084838.4 Gm10241 | 17.62940 | 7.6366750 | 1.4333637 | 5.327800 | 1.0e-07 | NA |
ENSMUSG00000021270.14 Hsp90aa1 | 19731.71056 | -0.4150097 | 0.0812580 | -5.107311 | 3.0e-07 | 0.0006369 |
ENSMUSG00000024883.9 Rin1 | 1730.36849 | 0.3961802 | 0.0785513 | 5.043585 | 5.0e-07 | 0.0007633 |
ENSMUSG00000001467.6 Cyp51 | 914.60992 | -0.3266949 | 0.0652770 | -5.004751 | 6.0e-07 | 0.0008176 |
ENSMUSG00000102627.2 Snurf | 22.95625 | 8.0174386 | 1.6395147 | 4.890129 | 1.0e-06 | NA |
ENSMUSG00000044285.9 Ubb-ps | 2010.40856 | -0.9247134 | 0.1896289 | -4.876438 | 1.1e-06 | 0.0014035 |
ENSMUSG00000107499.2 Ccdc142 | 44.66779 | 1.0467235 | 0.2150830 | 4.866603 | 1.1e-06 | NA |
ENSMUSG00000060862.11 Zbtb40 | 211.85127 | 0.6799751 | 0.1415661 | 4.803233 | 1.6e-06 | 0.0018257 |
ENSMUSG00000053550.14 Shisa7 | 2819.07578 | 0.6097051 | 0.1286592 | 4.738915 | 2.1e-06 | 0.0021791 |
ENSMUSG00000048154.18 Kmt2d | 2495.07018 | 0.7784121 | 0.1651030 | 4.714707 | 2.4e-06 | 0.0021791 |
ENSMUSG00000032855.7 Pkd1 | 2513.84342 | 0.7124951 | 0.1511267 | 4.714553 | 2.4e-06 | 0.0021791 |
ENSMUSG00000078881.11 Gm14434 | 265.26689 | -1.1328384 | 0.2439904 | -4.642963 | 3.4e-06 | 0.0028688 |
ENSMUSG00000094437.3 Gm9830 | 43.94751 | 1.7576897 | 0.3813574 | 4.609036 | 4.0e-06 | NA |
pdf("plot14_de03.pdf")
mymds(de=dge3_l,name="Cont3: Effect of LPS treatment in hippocampus",myss=ss3_l,mx=xx3_l)
maplot(dge3_l,"Cont3: Effect of LPS treatment in hippocampus")
make_volcano(dge3_l,"Cont3: Effect of LPS treatment in hippocampus")
make_heatmap(de=dge3_l,name="Cont3: Effect of LPS treatment in hippocampus",myss=ss3_l,mx=xx3_l,n=50)
make_heatmap2(de=dge3_l,name="Cont3: Effect of LPS treatment in hippocampus",myss=ss3_l,mx=xx3_l,n=50)
mymds(de=dge3_o,name="Cont3: Effect of OVA treatment in hippocampus",myss=ss3_o,mx=xx3_o)
maplot(dge3_o,"Cont3: Effect of OVA treatment in hippocampus")
make_volcano(dge3_o,"Cont3: Effect of OVA treatment in hippocampus")
make_heatmap(de=dge3_o,name="Cont3: Effect of OVA treatment in hippocampus",myss=ss3_o,mx=xx3_o,n=50)
make_heatmap2(de=dge3_o,name="Cont3: Effect of OVA treatment in hippocampus",myss=ss3_o,mx=xx3_o,n=50)
dev.off()
## png
## 2
mymds(de=dge4_l,name="Cont4: Effect of LPS treatment in PAG",myss=ss4_l,mx=xx4_l)
maplot(dge4_l,"Cont4: Effect of LPS treatment in PAG")
make_volcano(dge4_l,"Cont4: Effect of LPS treatment in PAG")
make_heatmap(de=dge4_l,name="Cont4: Effect of LPS treatment in PAG",myss=ss4_l,mx=xx4_l,n=50)
make_heatmap2(de=dge4_l,name="Cont3: Effect of LPS treatment in PAG",myss=ss4_l,mx=xx4_l,n=50)
dge4_l[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 4: Effect of LPS treatment in PAG") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000101111.2 Gm28437 | 1489.59991 | -28.4058069 | 2.9866471 | -9.510935 | 0.0000000 | 0.0000000 |
ENSMUSG00000034459.9 Ifit1 | 55.64874 | -1.1808759 | 0.1686328 | -7.002649 | 0.0000000 | 0.0000000 |
ENSMUSG00000079363.8 Gbp4 | 95.91494 | -1.2292487 | 0.1854179 | -6.629613 | 0.0000000 | 0.0000002 |
ENSMUSG00000025498.16 Irf7 | 84.22641 | -1.0483087 | 0.1595935 | -6.568618 | 0.0000000 | 0.0000002 |
ENSMUSG00000078922.10 Tgtp1 | 21.82329 | -2.6093058 | 0.4065209 | -6.418626 | 0.0000000 | 0.0000005 |
ENSMUSG00000102070.2 Gm28661 | 10196.94116 | -14.7763443 | 2.9540986 | -5.001981 | 0.0000006 | 0.0016656 |
ENSMUSG00000028820.14 Sfpq | 2198.16793 | 0.2648449 | 0.0535496 | 4.945791 | 0.0000008 | 0.0019080 |
ENSMUSG00000036915.18 Kirrel2 | 82.56463 | 0.9736571 | 0.2004918 | 4.856344 | 0.0000012 | 0.0026324 |
ENSMUSG00000026222.17 Sp100 | 58.86066 | -0.8315047 | 0.1797559 | -4.625743 | 0.0000037 | 0.0073042 |
ENSMUSG00000075602.11 Ly6a | 107.28664 | -0.8323082 | 0.1822514 | -4.566814 | 0.0000050 | 0.0087213 |
ENSMUSG00000024079.5 Eif2ak2 | 182.29278 | -0.3940654 | 0.0893055 | -4.412555 | 0.0000102 | 0.0155853 |
ENSMUSG00000078921.4 Tgtp2 | 20.19923 | -1.2810520 | 0.2908727 | -4.404167 | 0.0000106 | 0.0155853 |
ENSMUSG00000052776.11 Oas1a | 19.16469 | -1.2619796 | 0.2896101 | -4.357512 | 0.0000132 | 0.0178219 |
ENSMUSG00000028268.15 Gbp3 | 138.45727 | -0.5635390 | 0.1327639 | -4.244671 | 0.0000219 | 0.0275394 |
ENSMUSG00000054072.13 Iigp1 | 23.29794 | -1.4762784 | 0.3644390 | -4.050824 | 0.0000510 | 0.0599248 |
ENSMUSG00000110862.2 Gm35835 | 17.20473 | -1.2465344 | 0.3123628 | -3.990663 | 0.0000659 | 0.0685953 |
ENSMUSG00000027875.13 Hmgcs2 | 123.00353 | -0.7999616 | 0.2005166 | -3.989504 | 0.0000662 | 0.0685953 |
ENSMUSG00000002289.17 Angptl4 | 67.16713 | -0.6692079 | 0.1702196 | -3.931438 | 0.0000844 | 0.0826191 |
ENSMUSG00000015085.9 Entpd2 | 359.15806 | 0.3576188 | 0.0921084 | 3.882584 | 0.0001034 | 0.0954024 |
ENSMUSG00000030107.11 Usp18 | 27.77358 | -0.9172425 | 0.2372305 | -3.866461 | 0.0001104 | 0.0954024 |
mymds(de=dge4_o,name="Cont4: Effect of OVA treatment in PAG",myss=ss4_o,mx=xx4_o)
maplot(dge4_o,"Cont4: Effect of OVA treatment in PAG")
make_volcano(dge4_o,"Cont4: Effect of OVA treatment in PAG")
make_heatmap(de=dge4_o,name="Cont4: Effect of OVA treatment in PAG",myss=ss4_o,mx=xx4_o,n=50)
make_heatmap2(de=dge4_o,name="Cont4: Effect of OVA treatment in PAG",myss=ss4_o,mx=xx4_o,n=50)
dge4_o[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 4: Effect of treatment in PAG") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000101111.2 Gm28437 | 1504.44501 | -28.8708740 | 2.9866471 | -9.666651 | 0.0000000 | 0.0000000 |
ENSMUSG00000036915.18 Kirrel2 | 88.57030 | 1.1004532 | 0.2077438 | 5.297165 | 0.0000001 | 0.0010387 |
ENSMUSG00000106604.3 Gm42535 | 45.90967 | -1.3651174 | 0.2757149 | -4.951192 | 0.0000007 | 0.0043425 |
ENSMUSG00000102070.2 Gm28661 | 10298.72248 | -14.1414027 | 2.9291777 | -4.827772 | 0.0000014 | 0.0060964 |
ENSMUSG00000085328.3 Gm17131 | 231.90596 | -0.6897420 | 0.1730516 | -3.985758 | 0.0000673 | 0.2376070 |
ENSMUSG00000118642.2 AY036118 | 813.47892 | -0.9127923 | 0.2465059 | -3.702922 | 0.0002131 | 0.6273842 |
ENSMUSG00000102289.2 Gm31258 | 14.36741 | -1.5814526 | 0.4320332 | -3.660488 | 0.0002517 | 0.6351635 |
ENSMUSG00000021906.15 Oxnad1 | 298.24353 | 0.2627823 | 0.0731645 | 3.591666 | 0.0003286 | 0.7254015 |
ENSMUSG00000028820.14 Sfpq | 2221.70651 | 0.2671342 | 0.0763080 | 3.500736 | 0.0004640 | 0.9105264 |
ENSMUSG00000094672.3 Vmn2r25 | 14.38564 | -1.6452102 | 0.4753780 | -3.460847 | 0.0005385 | 0.9510627 |
ENSMUSG00000054252.19 Fgfr3 | 2567.78162 | 0.3560764 | 0.1040765 | 3.421295 | 0.0006232 | 0.9754406 |
ENSMUSG00000024998.18 Plce1 | 525.21275 | 0.3861609 | 0.1134704 | 3.403185 | 0.0006661 | 0.9754406 |
ENSMUSG00000013089.16 Etv5 | 501.24250 | 0.2879667 | 0.0851978 | 3.379980 | 0.0007249 | 0.9754406 |
ENSMUSG00000047216.9 Cdh19 | 172.79548 | 0.5469923 | 0.1627061 | 3.361844 | 0.0007742 | 0.9754406 |
ENSMUSG00000115632.2 Gm17922 | 12.17839 | -2.0478089 | 0.6150693 | -3.329396 | 0.0008703 | 0.9754406 |
ENSMUSG00000067220.13 Cnga1 | 22.07693 | -1.3574772 | 0.4082491 | -3.325120 | 0.0008838 | 0.9754406 |
ENSMUSG00000046678.7 Olfr981 | 15.67008 | -1.2921922 | 0.3905994 | -3.308229 | 0.0009389 | 0.9754406 |
ENSMUSG00000007682.8 Dio2 | 395.46383 | 0.4716641 | 0.1435644 | 3.285383 | 0.0010184 | 0.9904947 |
ENSMUSG00000108827.4 Olfr1310 | 28.09654 | -1.3088894 | 0.4003901 | -3.269035 | 0.0010791 | 0.9904947 |
ENSMUSG00000002831.15 Plin4 | 203.85756 | 1.4385797 | 0.4416960 | 3.256946 | 0.0011262 | 0.9904947 |
pdf("plot15_de04.pdf")
mymds(de=dge4_l,name="Cont4: Effect of LPS treatment in PAG",myss=ss4_l,mx=xx4_l)
maplot(dge4_l,"Cont4: Effect of LPS treatment in PAG")
make_volcano(dge4_l,"Cont4: Effect of LPS treatment in PAG")
make_heatmap(de=dge4_l,name="Cont4: Effect of LPS treatment in PAG",myss=ss4_l,mx=xx4_l,n=50)
make_heatmap2(de=dge4_l,name="Cont3: Effect of LPS treatment in PAG",myss=ss4_l,mx=xx4_l,n=50)
mymds(de=dge4_o,name="Cont4: Effect of OVA treatment in PAG",myss=ss4_o,mx=xx4_o)
maplot(dge4_o,"Cont4: Effect of OVA treatment in PAG")
make_volcano(dge4_o,"Cont4: Effect of OVA treatment in PAG")
make_heatmap(de=dge4_o,name="Cont4: Effect of OVA treatment in PAG",myss=ss4_o,mx=xx4_o,n=50)
make_heatmap2(de=dge4_o,name="Cont4: Effect of OVA treatment in PAG",myss=ss4_o,mx=xx4_o,n=50)
dev.off()
## png
## 2
mymds(de=dge5_l,name="Cont5: Effect of LPS treatment in NI",myss=ss5_l,mx=xx5_l)
maplot(dge5_l,"Cont5: Effect of LPS treatment in NI")
make_volcano(dge5_l,"Cont5: Effect of LPS treatment in NI")
make_heatmap(de=dge5_l,name="Cont5: Effect of LPS treatment in NI",myss=ss5_l,mx=xx5_l,n=50)
make_heatmap2(de=dge5_l,name="Cont3: Effect of LPS treatment in NI",myss=ss5_l,mx=xx5_l,n=50)
dge5_l[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 5: Effect of LPS treatment in NI") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000004655.6 Aqp1 | 64.33666 | -2.5245691 | 0.4256671 | -5.930853 | 0.0e+00 | 0.0000404 |
ENSMUSG00000002831.15 Plin4 | 250.84384 | 1.5543801 | 0.2773464 | 5.604472 | 0.0e+00 | 0.0001368 |
ENSMUSG00000026822.15 Lcn2 | 16.22880 | -2.6059016 | 0.4734932 | -5.503567 | 0.0e+00 | NA |
ENSMUSG00000028919.12 Arhgef19 | 395.89057 | 0.4100393 | 0.0746763 | 5.490892 | 0.0e+00 | 0.0001368 |
ENSMUSG00000022425.17 Enpp2 | 8280.82063 | -1.1048917 | 0.2013475 | -5.487486 | 0.0e+00 | 0.0001368 |
ENSMUSG00000068699.13 Flnc | 125.76677 | 0.8058438 | 0.1494388 | 5.392467 | 1.0e-07 | 0.0001573 |
ENSMUSG00000053646.14 Plxnb1 | 2389.38786 | 0.3753821 | 0.0697524 | 5.381640 | 1.0e-07 | 0.0001573 |
ENSMUSG00000071267.12 Zfp942 | 226.23109 | -0.5520131 | 0.1029389 | -5.362533 | 1.0e-07 | 0.0001573 |
ENSMUSG00000036890.14 Gtdc1 | 411.57310 | -0.4107206 | 0.0781476 | -5.255700 | 1.0e-07 | 0.0002474 |
ENSMUSG00000078922.10 Tgtp1 | 37.06696 | -2.2129060 | 0.4225152 | -5.237459 | 2.0e-07 | NA |
ENSMUSG00000039959.14 Hip1 | 856.67943 | 0.5239050 | 0.1013262 | 5.170477 | 2.0e-07 | 0.0003482 |
ENSMUSG00000068323.13 Slc4a5 | 92.61322 | -1.8988675 | 0.3702782 | -5.128219 | 3.0e-07 | 0.0003771 |
ENSMUSG00000114133.2 Gm20075 | 468.65132 | -0.3716223 | 0.0726130 | -5.117845 | 3.0e-07 | 0.0003771 |
ENSMUSG00000021696.10 Elovl7 | 524.66657 | -0.4441318 | 0.0873935 | -5.081979 | 4.0e-07 | 0.0004178 |
ENSMUSG00000027875.13 Hmgcs2 | 132.26542 | -1.1687659 | 0.2334476 | -5.006545 | 6.0e-07 | 0.0005721 |
ENSMUSG00000060862.11 Zbtb40 | 245.30142 | 0.6788979 | 0.1360226 | 4.991069 | 6.0e-07 | 0.0005756 |
ENSMUSG00000113337.2 Gm19220 | 2324.88228 | 1.0465161 | 0.2131860 | 4.908936 | 9.0e-07 | 0.0008193 |
ENSMUSG00000045039.10 Megf8 | 3979.39321 | 0.3979746 | 0.0822716 | 4.837328 | 1.3e-06 | 0.0011038 |
ENSMUSG00000069833.14 Ahnak | 814.46670 | 0.6652302 | 0.1391700 | 4.779984 | 1.8e-06 | 0.0013840 |
ENSMUSG00000015652.10 Steap1 | 18.65542 | -2.4798774 | 0.5203028 | -4.766219 | 1.9e-06 | NA |
mymds(de=dge5_o,name="Cont5: Effect of OVA treatment in NI",myss=ss5_o,mx=xx5_o)
maplot(dge5_o,"Cont4: Effect of OVA treatment in NI")
make_volcano(dge5_o,"Cont5: Effect of OVA treatment in NI")
make_heatmap(de=dge5_o,name="Cont5: Effect of OVA treatment in NI",myss=ss5_o,mx=xx5_o,n=50)
make_heatmap2(de=dge5_o,name="Cont5: Effect of OVA treatment in NI",myss=ss5_o,mx=xx5_o,n=50)
dge5_o[1:20,1:6] %>% kbl(caption = "Top gene expression differences for contrast 5: Effect of treatment in NI") %>%
kable_paper("hover", full_width = F)
baseMean | log2FoldChange | lfcSE | stat | pvalue | padj | |
---|---|---|---|---|---|---|
ENSMUSG00000056260.16 Lrif1 | 211.98587 | -0.7336887 | 0.1100875 | -6.664595 | 0.00e+00 | 0.0000003 |
ENSMUSG00000002831.15 Plin4 | 258.40488 | 1.6709594 | 0.2980839 | 5.605668 | 0.00e+00 | 0.0001173 |
ENSMUSG00000055322.17 Tns1 | 1466.90156 | 0.3981360 | 0.0721780 | 5.516031 | 0.00e+00 | 0.0001307 |
ENSMUSG00000015944.10 Castor2 | 3213.72353 | 0.3932529 | 0.0758616 | 5.183820 | 2.00e-07 | 0.0006144 |
ENSMUSG00000024175.3 Tekt4 | 67.10906 | 0.9393058 | 0.1822044 | 5.155233 | 3.00e-07 | NA |
ENSMUSG00000020116.8 Pno1 | 507.57144 | -0.3892492 | 0.0798403 | -4.875347 | 1.10e-06 | 0.0024561 |
ENSMUSG00000000194.14 Gpr107 | 1069.00316 | 0.3266125 | 0.0685118 | 4.767246 | 1.90e-06 | 0.0035192 |
ENSMUSG00000055782.10 Abcd2 | 665.20587 | -0.4696031 | 0.0996124 | -4.714301 | 2.40e-06 | 0.0035595 |
ENSMUSG00000117284.2 Gm7072 | 208.57068 | -0.5445045 | 0.1156892 | -4.706613 | 2.50e-06 | 0.0035595 |
ENSMUSG00000074505.7 Fat3 | 548.94128 | 0.5489851 | 0.1177974 | 4.660416 | 3.20e-06 | 0.0039643 |
ENSMUSG00000060862.11 Zbtb40 | 233.67044 | 0.5799773 | 0.1251034 | 4.635981 | 3.60e-06 | 0.0040164 |
ENSMUSG00000069833.14 Ahnak | 857.16074 | 0.8065828 | 0.1763222 | 4.574483 | 4.80e-06 | 0.0046838 |
ENSMUSG00000067038.7 Rps12-ps3 | 447.47971 | -1.9169288 | 0.4198274 | -4.565993 | 5.00e-06 | 0.0046838 |
ENSMUSG00000027708.15 Dcun1d1 | 788.59922 | -0.3874162 | 0.0869258 | -4.456861 | 8.30e-06 | 0.0072331 |
ENSMUSG00000045039.10 Megf8 | 3981.85021 | 0.4012817 | 0.0919057 | 4.366235 | 1.26e-05 | 0.0101992 |
ENSMUSG00000043733.15 Ptpn11 | 4319.80686 | 0.3173738 | 0.0730162 | 4.346623 | 1.38e-05 | 0.0101992 |
ENSMUSG00000019232.15 Etnppl | 1154.63560 | 0.7040907 | 0.1623392 | 4.337157 | 1.44e-05 | 0.0101992 |
ENSMUSG00000068798.11 Rap1a | 1471.01059 | -0.4872519 | 0.1137471 | -4.283643 | 1.84e-05 | 0.0115374 |
ENSMUSG00000027206.14 Cops2 | 2031.84090 | -0.3788991 | 0.0885072 | -4.280998 | 1.86e-05 | 0.0115374 |
ENSMUSG00000025903.15 Lypla1 | 715.48002 | -0.5016851 | 0.1174408 | -4.271815 | 1.94e-05 | 0.0115374 |
pdf("plot16_de05.pdf")
mymds(de=dge5_l,name="Cont5: Effect of LPS treatment in NI",myss=ss5_l,mx=xx5_l)
maplot(dge5_l,"Cont5: Effect of LPS treatment in NI")
make_volcano(dge5_l,"Cont5: Effect of LPS treatment in NI")
make_heatmap(de=dge5_l,name="Cont5: Effect of LPS treatment in NI",myss=ss5_l,mx=xx5_l,n=50)
make_heatmap2(de=dge5_l,name="Cont3: Effect of LPS treatment in NI",myss=ss5_l,mx=xx5_l,n=50)
mymds(de=dge5_o,name="Cont5: Effect of OVA treatment in NI",myss=ss5_o,mx=xx5_o)
maplot(dge5_o,"Cont4: Effect of OVA treatment in NI")
make_volcano(dge5_o,"Cont5: Effect of OVA treatment in NI")
make_heatmap(de=dge5_o,name="Cont5: Effect of OVA treatment in NI",myss=ss5_o,mx=xx5_o,n=50)
make_heatmap2(de=dge5_o,name="Cont5: Effect of OVA treatment in NI",myss=ss5_o,mx=xx5_o,n=50)
dev.off()
## png
## 2
Below we’re comparing the effect of the two treatments on the number of genes found, using an Euler diagram.
par(mar=c(2,2,2,2))
v1 <- list("hyp LPS up"=d1up_l,
"hyp LPS dn"=d1dn_l,
"hyp OVA up"=d1up_o,
"hyp OVA dn"=d1dn_o)
plot(euler(v1),quantities = TRUE, edges = "gray", main="effect of treatments on hyp")
v2 <- list("amy LPS up"=d2up_l,
"amy LPS dn"=d2dn_l,
"amy OVA up"=d2up_o,
"amy OVA dn"=d2dn_o)
plot(euler(v2),quantities = TRUE, edges = "gray", main="effect of treatments on amy")
v3 <- list("hip LPS up"=d3up_l,
"hip LPS dn"=d3dn_l,
"hip OVA up"=d3up_o,
"hip OVA dn"=d3dn_o)
plot(euler(v3),quantities = TRUE, edges = "gray", main="effect of treatments on hip")
v4 <- list("pag LPS up"=d4up_l,
"pag LPS dn"=d4dn_l,
"pag OVA up"=d4up_o,
"pag OVA dn"=d4dn_o)
plot(euler(v4),quantities = TRUE, edges = "gray", main="effect of treatments on pag")
v5 <- list("NI LPS up"=d5up_l,
"NI LPS dn"=d5dn_l,
"NI OVA up"=d5up_o,
"NI OVA dn"=d5dn_o)
plot(euler(v5),quantities = TRUE, edges = "gray", main="effect of treatments on ni")
pdf("plot17_euler01.pdf")
plot(euler(v1),quantities = TRUE, edges = "gray", main="effect of treatments on hyp")
plot(euler(v2),quantities = TRUE, edges = "gray", main="effect of treatments on amy")
plot(euler(v3),quantities = TRUE, edges = "gray", main="effect of treatments on hip")
plot(euler(v4),quantities = TRUE, edges = "gray", main="effect of treatments on pag")
plot(euler(v5),quantities = TRUE, edges = "gray", main="effect of treatments on ni")
dev.off()
## png
## 2
Gene sets are obtained from Reactome.
Firstly need to conduct mitch enrichment analysis for each contrast separately.
if (!file.exists("mouse_msigdb_reactome_2022-02-16.gmt")) {
download.file("http://ziemann-lab.net/public/msigdb_mouse/mouse_msigdb_reactome_2022-02-16.gmt",
destfile="mouse_msigdb_reactome_2022-02-16.gmt")
}
genesets <- gmt_import("mouse_msigdb_reactome_2022-02-16.gmt")
names(genesets) <- gsub("REACTOME_","",names(genesets))
names(genesets) <- gsub("_"," ",names(genesets))
# gene table
gt <- as.data.frame(rownames(xx))
gt$gene <- sapply(strsplit(gt[,1]," "),"[[",2)
Mitch for LPS in hyp
m1_l <- mitch_import(dge1_l, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 17095
## Note: no. genes in output = 17078
## Note: estimated proportion of input genes in output = 0.999
mres1_l <- mitch_calc(m1_l, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres1_l$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in hypothalamus for LPS") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
726 | POST CHAPERONIN TUBULIN FOLDING PATHWAY | 17 | 0.0000074 | 0.6275717 | 0.0005720 |
1138 | TRANSPORT OF CONNEXONS TO THE PLASMA MEMBRANE | 13 | 0.0002277 | 0.5904077 | 0.0059649 |
337 | FORMATION OF TUBULIN FOLDING INTERMEDIATES BY CCT TRIC | 19 | 0.0000123 | 0.5793238 | 0.0007249 |
143 | CGMP EFFECTS | 15 | 0.0001524 | -0.5647268 | 0.0047278 |
785 | REDUCTION OF CYTOSOLIC CA LEVELS | 11 | 0.0013336 | -0.5586911 | 0.0212474 |
629 | NITRIC OXIDE STIMULATES GUANYLATE CYCLASE | 20 | 0.0000599 | -0.5183198 | 0.0022099 |
910 | SEALING OF THE NUCLEAR ENVELOPE NE BY ESCRT III | 23 | 0.0000223 | 0.5107134 | 0.0010992 |
679 | P75NTR REGULATES AXONOGENESIS | 10 | 0.0068797 | -0.4935552 | 0.0659004 |
66 | APOPTOSIS INDUCED DNA FRAGMENTATION | 10 | 0.0091035 | -0.4763065 | 0.0800971 |
1173 | WNT5A DEPENDENT INTERNALIZATION OF FZD2 FZD5 AND ROR2 | 13 | 0.0033723 | 0.4695846 | 0.0401608 |
161 | CLEC7A DECTIN 1 INDUCES NFAT ACTIVATION | 11 | 0.0108084 | -0.4438283 | 0.0912425 |
368 | GAP JUNCTION ASSEMBLY | 21 | 0.0005678 | 0.4344453 | 0.0111580 |
498 | IRE1ALPHA ACTIVATES CHAPERONES | 50 | 0.0000004 | 0.4142824 | 0.0000794 |
388 | GLYCOGEN STORAGE DISEASES | 12 | 0.0142457 | 0.4086390 | 0.1072601 |
1170 | VOLTAGE GATED POTASSIUM CHANNELS | 39 | 0.0000143 | -0.4015720 | 0.0008015 |
112 | CARBOXYTERMINAL POST TRANSLATIONAL MODIFICATIONS OF TUBULIN | 36 | 0.0000416 | 0.3947013 | 0.0018179 |
43 | AGGREPHAGY | 35 | 0.0000581 | 0.3926790 | 0.0022099 |
1072 | THE ROLE OF GTSE1 IN G2 M PROGRESSION AFTER G2 CHECKPOINT | 66 | 0.0000001 | 0.3869194 | 0.0000214 |
201 | CYTOSOLIC IRON SULFUR CLUSTER ASSEMBLY | 13 | 0.0163463 | 0.3846244 | 0.1160336 |
1006 | SODIUM CALCIUM EXCHANGERS | 10 | 0.0353060 | -0.3844036 | 0.1963481 |
m1_l_top <- subset(mres1_l$enrichment_result,p.adjustANOVA<0.05)
m1_l_up <- subset(m1_l_top,s.dist>0)$set
m1_l_dn <- subset(m1_l_top,s.dist<0)$set
mitch_report(mres1_l,outfile="mitch1_l.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch1_l.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f509eca56.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres1_l$enrichment_result,file="mitch1_l.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m1_l_top_up <- head(subset(m1_l_top,s.dist>0),10)[,"s.dist"]
names(m1_l_top_up) <- head(subset(m1_l_top,s.dist>0),10)[,"set"]
m1_l_top_dn <- head(subset(m1_l_top,s.dist<0),10)[,"s.dist"]
names(m1_l_top_dn) <- head(subset(m1_l_top,s.dist<0),10)[,"set"]
m1_l_top_updn <- c(m1_l_top_up,m1_l_top_dn)
m1_l_top_updn <- m1_l_top_updn[order(m1_l_top_updn)]
par(mar=c(5,25,3,1))
barplot(m1_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in hyp")
grid()
pdf("plot18_mitch1lps01.pdf")
par(mar=c(5,25,3,1))
barplot(m1_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in hyp")
grid()
dev.off()
## png
## 2
Mitch for OVA in hyp
m1_o <- mitch_import(dge1_o, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 17114
## Note: no. genes in output = 17098
## Note: estimated proportion of input genes in output = 0.999
mres1_o <- mitch_calc(m1_o, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres1_o$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in hypothalamus for OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
304 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | 0.7529442 | 0.0000000 |
1011 | SRP DEPENDENT COTRANSLATIONAL PROTEIN TARGETING TO MEMBRANE | 106 | 0.0000000 | 0.6728738 | 0.0000000 |
838 | RESPONSE OF EIF2AK4 GCN2 TO AMINO ACID DEFICIENCY | 95 | 0.0000000 | 0.6489214 | 0.0000000 |
305 | EUKARYOTIC TRANSLATION INITIATION | 114 | 0.0000000 | 0.6266445 | 0.0000000 |
790 | REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO | 10 | 0.0006068 | -0.6260885 | 0.0066803 |
1175 | YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION | 11 | 0.0004339 | 0.6126348 | 0.0050606 |
28 | ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S | 59 | 0.0000000 | 0.5829488 | 0.0000000 |
912 | SELENOAMINO ACID METABOLISM | 109 | 0.0000000 | 0.5767461 | 0.0000000 |
27 | ACTIVATION OF THE AP 1 FAMILY OF TRANSCRIPTION FACTORS | 10 | 0.0024530 | -0.5531601 | 0.0209392 |
328 | FORMATION OF ATP BY CHEMIOSMOTIC COUPLING | 18 | 0.0000765 | 0.5384075 | 0.0013456 |
631 | NONSENSE MEDIATED DECAY NMD | 109 | 0.0000000 | 0.5242653 | 0.0000000 |
171 | COMPLEX I BIOGENESIS | 56 | 0.0000000 | 0.5180541 | 0.0000000 |
157 | CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS | 12 | 0.0019791 | -0.5157049 | 0.0175292 |
923 | SEROTONIN NEUROTRANSMITTER RELEASE CYCLE | 18 | 0.0001961 | -0.5069737 | 0.0028334 |
8 | ACETYLCHOLINE BINDING AND DOWNSTREAM EVENTS | 10 | 0.0061207 | -0.5006086 | 0.0450635 |
419 | HIGHLY CALCIUM PERMEABLE POSTSYNAPTIC NICOTINIC ACETYLCHOLINE RECEPTORS | 10 | 0.0061207 | -0.5006086 | 0.0450635 |
283 | ENDOSOMAL VACUOLAR PATHWAY | 11 | 0.0048523 | 0.4904579 | 0.0381065 |
1049 | SYNTHESIS OF PROSTAGLANDINS PG AND THROMBOXANES TX | 13 | 0.0031670 | 0.4726998 | 0.0265946 |
791 | REGULATION OF EXPRESSION OF SLITS AND ROBOS | 160 | 0.0000000 | 0.4702680 | 0.0000000 |
836 | RESPIRATORY ELECTRON TRANSPORT ATP SYNTHESIS BY CHEMIOSMOTIC COUPLING AND HEAT PRODUCTION BY UNCOUPLING PROTEINS | 125 | 0.0000000 | 0.4602665 | 0.0000000 |
m1_o_top <- subset(mres1_o$enrichment_result,p.adjustANOVA<0.05)
m1_o_up <- subset(m1_o_top,s.dist>0)$set
m1_o_dn <- subset(m1_o_top,s.dist<0)$set
mitch_report(mres1_o,outfile="mitch1_o.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch1_o.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f494ac666.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres1_o$enrichment_result,file="mitch1_o.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m1_o_top_up <- head(subset(m1_o_top,s.dist>0),10)[,"s.dist"]
names(m1_o_top_up) <- head(subset(m1_o_top,s.dist>0),10)[,"set"]
m1_o_top_dn <- head(subset(m1_o_top,s.dist<0),10)[,"s.dist"]
names(m1_o_top_dn) <- head(subset(m1_o_top,s.dist<0),10)[,"set"]
m1_o_top_updn <- c(m1_o_top_up,m1_o_top_dn)
m1_o_top_updn <- m1_o_top_updn[order(m1_o_top_updn)]
par(mar=c(5,25,3,1))
barplot(m1_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in hyp")
grid()
pdf("plot19_mitch1ova01.pdf")
par(mar=c(5,25,3,1))
barplot(m1_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in hyp")
grid()
dev.off()
## png
## 2
m1_l_up <- subset(m1_l_top,s.dist>0)$set
m1_l_dn <- subset(m1_l_top,s.dist<0)$set
m1_o_up <- subset(m1_o_top,s.dist>0)$set
m1_o_dn <- subset(m1_o_top,s.dist<0)$set
par(mar=c(2,2,2,2))
v0 <- list("LPS up"=m1_l_up,
"LPS dn"=m1_l_dn,
"OVA up"=m1_o_up,
"OVA dn"=m1_o_dn)
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on hyp")
pdf("plot20_mitch1lpsovaeuler01.pdf")
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on hyp")
dev.off()
## png
## 2
Two dimensional mitch analysis in hyp.
ml <- list("LPS"=dge1_l,"OVA"=dge1_o)
m1 <- mitch_import(ml, DEtype="deseq2",geneTable=gt)
## Note: Mean no. genes in input = 17104.5
## Note: no. genes in output = 16956
## Note: estimated proportion of input genes in output = 0.991
head(m1)
## LPS OVA
## 0610009B22Rik -0.3304181 0.09722066
## 0610009E02Rik 0.7596333 1.26326253
## 0610009L18Rik -1.2521412 -0.66374969
## 0610010K14Rik 0.4193627 -0.45368981
## 0610012G03Rik 1.4462155 0.12236243
## 0610030E20Rik -0.2426628 -0.04562294
mres1 <- mitch_calc(m1, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres1$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in hypothalamus for LPS and OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.LPS | s.OVA | p.LPS | p.OVA | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|
304 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | 0.3003667 | 0.7570365 | 0.0000013 | 0.0000000 | 0.8144473 | 0.3229143 | 0.0000000 |
1008 | SRP DEPENDENT COTRANSLATIONAL PROTEIN TARGETING TO MEMBRANE | 106 | 0.0000000 | 0.2540227 | 0.6770203 | 0.0000063 | 0.0000000 | 0.7231072 | 0.2991045 | 0.0000000 |
837 | RESPONSE OF EIF2AK4 GCN2 TO AMINO ACID DEFICIENCY | 95 | 0.0000000 | 0.2222176 | 0.6529768 | 0.0001830 | 0.0000000 | 0.6897531 | 0.3045928 | 0.0000000 |
789 | REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO | 10 | 0.0029173 | -0.2597191 | -0.6239112 | 0.1550094 | 0.0006340 | 0.6758101 | 0.2575227 | 0.0211031 |
305 | EUKARYOTIC TRANSLATION INITIATION | 114 | 0.0000000 | 0.2043357 | 0.6307946 | 0.0001655 | 0.0000000 | 0.6630647 | 0.3015520 | 0.0000000 |
783 | REDUCTION OF CYTOSOLIC CA LEVELS | 11 | 0.0047499 | -0.5569302 | -0.3356045 | 0.0013813 | 0.0539498 | 0.6502320 | 0.1565009 | 0.0308348 |
1172 | YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION | 11 | 0.0015182 | 0.1440328 | 0.6163095 | 0.4081891 | 0.0004006 | 0.6329161 | 0.3339500 | 0.0127425 |
724 | POST CHAPERONIN TUBULIN FOLDING PATHWAY | 17 | 0.0000053 | 0.6288482 | -0.0037817 | 0.0000071 | 0.9784665 | 0.6288595 | 0.4473369 | 0.0001307 |
910 | SELENOAMINO ACID METABOLISM | 109 | 0.0000000 | 0.2406957 | 0.5806511 | 0.0000143 | 0.0000000 | 0.6285620 | 0.2403848 | 0.0000000 |
337 | FORMATION OF TUBULIN FOLDING INTERMEDIATES BY CCT TRIC | 19 | 0.0000643 | 0.5807497 | 0.1992927 | 0.0000117 | 0.1326527 | 0.6139933 | 0.2697308 | 0.0010071 |
28 | ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S | 59 | 0.0000000 | 0.1619654 | 0.5869250 | 0.0314726 | 0.0000000 | 0.6088626 | 0.3004918 | 0.0000000 |
143 | CGMP EFFECTS | 15 | 0.0008040 | -0.5628515 | -0.2196997 | 0.0001603 | 0.1407302 | 0.6042100 | 0.2426449 | 0.0080064 |
1135 | TRANSPORT OF CONNEXONS TO THE PLASMA MEMBRANE | 13 | 0.0007836 | 0.5915536 | 0.1216795 | 0.0002214 | 0.4475253 | 0.6039384 | 0.3322512 | 0.0078692 |
677 | P75NTR REGULATES AXONOGENESIS | 10 | 0.0197324 | -0.4916322 | -0.3297415 | 0.0071009 | 0.0709981 | 0.5919728 | 0.1144740 | 0.0916424 |
27 | ACTIVATION OF THE AP 1 FAMILY OF TRANSCRIPTION FACTORS | 10 | 0.0104603 | -0.2020772 | -0.5509737 | 0.2685386 | 0.0025521 | 0.5868622 | 0.2467071 | 0.0582503 |
618 | NEUROTOXICITY OF CLOSTRIDIUM TOXINS | 10 | 0.0247953 | -0.3756757 | -0.4495692 | 0.0396833 | 0.0138279 | 0.5858709 | 0.0522506 | 0.1067196 |
410 | HDR THROUGH MMEJ ALT NHEJ | 10 | 0.0287449 | -0.3548094 | -0.4485542 | 0.0520448 | 0.0140436 | 0.5719184 | 0.0662876 | 0.1189268 |
283 | ENDOSOMAL VACUOLAR PATHWAY | 11 | 0.0001934 | -0.2756673 | 0.4953298 | 0.1134178 | 0.0044459 | 0.5668722 | 0.5451773 | 0.0024170 |
157 | CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS | 12 | 0.0086541 | -0.2343602 | -0.5130823 | 0.1598426 | 0.0020867 | 0.5640729 | 0.1970863 | 0.0496027 |
631 | NONSENSE MEDIATED DECAY NMD | 109 | 0.0000000 | 0.1971761 | 0.5281756 | 0.0003787 | 0.0000000 | 0.5637800 | 0.2340520 | 0.0000000 |
m1_top <- subset(mres1$enrichment_result,p.adjustMANOVA<0.05)
m1_up <- subset(m1_top,s.dist>0)$set
m1_dn <- subset(m1_top,s.dist<0)$set
mitch_report(mres1,outfile="mitch1.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch1.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f12e4a3a3.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres1$enrichment_result,file="mitch1.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m1_top_up <- head(subset(m1_top,s.dist>0),10)[,"s.dist"]
names(m1_top_up) <- head(subset(m1_top,s.dist>0),10)[,"set"]
m1_top_dn <- head(subset(m1_top,s.dist<0),10)[,"s.dist"]
names(m1_top_dn) <- head(subset(m1_top,s.dist<0),10)[,"set"]
m1_top_updn <- c(m1_top_up,m1_top_dn)
m1_top_updn <- m1_top_updn[order(m1_top_updn)]
Need to make a scatterplot to highlight the following:
par(mar=c(4,4,2,1))
a <- mres1$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
pdf("plot21_mitch1_scatter01.pdf")
a <- mres1$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
dev.off()
## png
## 2
subset(as,s.LPS>0.2 & s.OVA>0.2) %>%
kbl(caption = "Pathways upregulated in LPS and OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.LPS | s.OVA | p.LPS | p.OVA | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|
304 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | 0.3003667 | 0.7570365 | 0.0000013 | 0.0000000 | 0.8144473 | 0.3229143 | 0.0000000 |
1008 | SRP DEPENDENT COTRANSLATIONAL PROTEIN TARGETING TO MEMBRANE | 106 | 0.0000000 | 0.2540227 | 0.6770203 | 0.0000063 | 0.0000000 | 0.7231072 | 0.2991045 | 0.0000000 |
837 | RESPONSE OF EIF2AK4 GCN2 TO AMINO ACID DEFICIENCY | 95 | 0.0000000 | 0.2222176 | 0.6529768 | 0.0001830 | 0.0000000 | 0.6897531 | 0.3045928 | 0.0000000 |
305 | EUKARYOTIC TRANSLATION INITIATION | 114 | 0.0000000 | 0.2043357 | 0.6307946 | 0.0001655 | 0.0000000 | 0.6630647 | 0.3015520 | 0.0000000 |
910 | SELENOAMINO ACID METABOLISM | 109 | 0.0000000 | 0.2406957 | 0.5806511 | 0.0000143 | 0.0000000 | 0.6285620 | 0.2403848 | 0.0000000 |
190 | CROSS PRESENTATION OF SOLUBLE EXOGENOUS ANTIGENS ENDOSOMES | 46 | 0.0000008 | 0.3238346 | 0.4182526 | 0.0001450 | 0.0000009 | 0.5289652 | 0.0667636 | 0.0000304 |
790 | REGULATION OF EXPRESSION OF SLITS AND ROBOS | 160 | 0.0000000 | 0.2160648 | 0.4743488 | 0.0000024 | 0.0000000 | 0.5212397 | 0.1826343 | 0.0000000 |
1125 | TRANSLATION | 286 | 0.0000000 | 0.2602477 | 0.4144063 | 0.0000000 | 0.0000000 | 0.4893480 | 0.1090066 | 0.0000000 |
85 | AUF1 HNRNP D0 BINDS AND DESTABILIZES MRNA | 53 | 0.0000013 | 0.3251594 | 0.3647996 | 0.0000423 | 0.0000044 | 0.4886792 | 0.0280298 | 0.0000427 |
1009 | STABILIZATION OF P53 | 54 | 0.0000015 | 0.3123825 | 0.3661938 | 0.0000718 | 0.0000032 | 0.4813322 | 0.0380503 | 0.0000461 |
569 | MITOCHONDRIAL TRANSLATION | 93 | 0.0000000 | 0.3125064 | 0.3616399 | 0.0000002 | 0.0000000 | 0.4779578 | 0.0347426 | 0.0000000 |
1069 | THE ROLE OF GTSE1 IN G2 M PROGRESSION AFTER G2 CHECKPOINT | 66 | 0.0000001 | 0.3888082 | 0.2635431 | 0.0000000 | 0.0002142 | 0.4697092 | 0.0885758 | 0.0000040 |
412 | HEDGEHOG LIGAND BIOGENESIS | 61 | 0.0000009 | 0.3090962 | 0.3446776 | 0.0000298 | 0.0000032 | 0.4629720 | 0.0251598 | 0.0000304 |
817 | REGULATION OF RUNX3 EXPRESSION AND ACTIVITY | 53 | 0.0000061 | 0.3216098 | 0.3309193 | 0.0000513 | 0.0000309 | 0.4614547 | 0.0065828 | 0.0001430 |
215 | DECTIN 1 MEDIATED NONCANONICAL NF KB SIGNALING | 59 | 0.0000018 | 0.2991435 | 0.3465453 | 0.0000708 | 0.0000042 | 0.4577996 | 0.0335182 | 0.0000535 |
221 | DEGRADATION OF AXIN | 53 | 0.0000081 | 0.3015955 | 0.3407154 | 0.0001461 | 0.0000178 | 0.4550240 | 0.0276620 | 0.0001725 |
609 | NEGATIVE REGULATION OF NOTCH4 SIGNALING | 54 | 0.0000067 | 0.2904324 | 0.3476731 | 0.0002232 | 0.0000099 | 0.4530205 | 0.0404753 | 0.0001487 |
80 | ASYMMETRIC LOCALIZATION OF PCP PROTEINS | 62 | 0.0000020 | 0.3134764 | 0.3170776 | 0.0000197 | 0.0000158 | 0.4458763 | 0.0025464 | 0.0000583 |
180 | COOPERATION OF PREFOLDIN AND TRIC CCT IN ACTIN AND TUBULIN FOLDING | 26 | 0.0025735 | 0.3845745 | 0.2223772 | 0.0006883 | 0.0497110 | 0.4442400 | 0.1146908 | 0.0195089 |
217 | DEFECTIVE CFTR CAUSES CYSTIC FIBROSIS | 59 | 0.0000032 | 0.2687379 | 0.3530533 | 0.0003577 | 0.0000027 | 0.4436967 | 0.0596200 | 0.0000855 |
550 | METABOLISM OF POLYAMINES | 57 | 0.0000065 | 0.2571303 | 0.3530065 | 0.0007877 | 0.0000040 | 0.4367260 | 0.0677947 | 0.0001475 |
224 | DEGRADATION OF DVL | 55 | 0.0000127 | 0.2792013 | 0.3356864 | 0.0003423 | 0.0000166 | 0.4366220 | 0.0399410 | 0.0002527 |
225 | DEGRADATION OF GLI1 BY THE PROTEASOME | 57 | 0.0000341 | 0.2685106 | 0.3105686 | 0.0004554 | 0.0000501 | 0.4105494 | 0.0297394 | 0.0005811 |
139 | CELLULAR RESPONSE TO HYPOXIA | 72 | 0.0000009 | 0.2094981 | 0.3529673 | 0.0021218 | 0.0000002 | 0.4104575 | 0.1014480 | 0.0000304 |
907 | SCF SKP2 MEDIATED DEGRADATION OF P27 P21 | 59 | 0.0000221 | 0.2476269 | 0.3248506 | 0.0010054 | 0.0000159 | 0.4084691 | 0.0546053 | 0.0004003 |
798 | REGULATION OF HMOX1 EXPRESSION AND ACTIVITY | 63 | 0.0000160 | 0.2547998 | 0.3126767 | 0.0004709 | 0.0000178 | 0.4033481 | 0.0409251 | 0.0003026 |
235 | DISEASES ASSOCIATED WITH GLYCOSAMINOGLYCAN METABOLISM | 40 | 0.0013507 | 0.2595915 | 0.2950047 | 0.0045049 | 0.0012463 | 0.3929574 | 0.0250409 | 0.0116488 |
62 | APC C CDH1 MEDIATED DEGRADATION OF CDC20 AND OTHER APC C CDH1 TARGETED PROTEINS IN LATE MITOSIS EARLY G1 | 70 | 0.0000102 | 0.2626961 | 0.2915670 | 0.0001450 | 0.0000247 | 0.3924545 | 0.0204148 | 0.0002064 |
894 | RRNA PROCESSING | 194 | 0.0000000 | 0.2044438 | 0.3201184 | 0.0000009 | 0.0000000 | 0.3798329 | 0.0817943 | 0.0000000 |
568 | MITOCHONDRIAL PROTEIN IMPORT | 63 | 0.0000662 | 0.2582576 | 0.2771440 | 0.0003937 | 0.0001426 | 0.3788216 | 0.0133547 | 0.0010240 |
358 | G1 S DNA DAMAGE CHECKPOINTS | 65 | 0.0000452 | 0.2391251 | 0.2927850 | 0.0008589 | 0.0000448 | 0.3780262 | 0.0379433 | 0.0007462 |
681 | PCP CE PATHWAY | 89 | 0.0000021 | 0.2723282 | 0.2531924 | 0.0000090 | 0.0000367 | 0.3718454 | 0.0135311 | 0.0000583 |
63 | APC C MEDIATED DEGRADATION OF CELL CYCLE PROTEINS | 81 | 0.0000062 | 0.2381981 | 0.2849573 | 0.0002116 | 0.0000093 | 0.3714014 | 0.0330638 | 0.0001430 |
812 | REGULATION OF PTEN STABILITY AND ACTIVITY | 66 | 0.0001015 | 0.2338841 | 0.2744425 | 0.0010201 | 0.0001158 | 0.3605835 | 0.0286791 | 0.0014935 |
814 | REGULATION OF RAS BY GAPS | 66 | 0.0001030 | 0.2103935 | 0.2874249 | 0.0031278 | 0.0000541 | 0.3562000 | 0.0544694 | 0.0014935 |
3 | ABC TRANSPORTER DISORDERS | 70 | 0.0001021 | 0.2057833 | 0.2786061 | 0.0029195 | 0.0000558 | 0.3463642 | 0.0514935 | 0.0014935 |
1082 | TNFR2 NON CANONICAL NF KB PATHWAY | 79 | 0.0001126 | 0.2239772 | 0.2409398 | 0.0005809 | 0.0002147 | 0.3289647 | 0.0119944 | 0.0015572 |
subset(as,s.LPS<-0.2 & s.OVA<0.2) %>%
kbl(caption = "Pathways downregulated in LPS and OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.LPS | s.OVA | p.LPS | p.OVA | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|
789 | REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO | 10 | 0.0029173 | -0.2597191 | -0.6239112 | 0.1550094 | 0.0006340 | 0.6758101 | 0.2575227 | 0.0211031 |
783 | REDUCTION OF CYTOSOLIC CA LEVELS | 11 | 0.0047499 | -0.5569302 | -0.3356045 | 0.0013813 | 0.0539498 | 0.6502320 | 0.1565009 | 0.0308348 |
724 | POST CHAPERONIN TUBULIN FOLDING PATHWAY | 17 | 0.0000053 | 0.6288482 | -0.0037817 | 0.0000071 | 0.9784665 | 0.6288595 | 0.4473369 | 0.0001307 |
337 | FORMATION OF TUBULIN FOLDING INTERMEDIATES BY CCT TRIC | 19 | 0.0000643 | 0.5807497 | 0.1992927 | 0.0000117 | 0.1326527 | 0.6139933 | 0.2697308 | 0.0010071 |
143 | CGMP EFFECTS | 15 | 0.0008040 | -0.5628515 | -0.2196997 | 0.0001603 | 0.1407302 | 0.6042100 | 0.2426449 | 0.0080064 |
1135 | TRANSPORT OF CONNEXONS TO THE PLASMA MEMBRANE | 13 | 0.0007836 | 0.5915536 | 0.1216795 | 0.0002214 | 0.4475253 | 0.6039384 | 0.3322512 | 0.0078692 |
157 | CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS | 12 | 0.0086541 | -0.2343602 | -0.5130823 | 0.1598426 | 0.0020867 | 0.5640729 | 0.1970863 | 0.0496027 |
627 | NITRIC OXIDE STIMULATES GUANYLATE CYCLASE | 20 | 0.0003359 | -0.5164088 | -0.1980574 | 0.0000638 | 0.1252313 | 0.5530866 | 0.2251085 | 0.0038324 |
1167 | VOLTAGE GATED POTASSIUM CHANNELS | 39 | 0.0000058 | -0.3993389 | -0.3607644 | 0.0000159 | 0.0000968 | 0.5381658 | 0.0272763 | 0.0001384 |
921 | SEROTONIN NEUROTRANSMITTER RELEASE CYCLE | 18 | 0.0009617 | -0.1551213 | -0.5044607 | 0.2546045 | 0.0002110 | 0.5277719 | 0.2470203 | 0.0090597 |
908 | SEALING OF THE NUCLEAR ENVELOPE NE BY ESCRT III | 23 | 0.0000756 | 0.5121232 | 0.1040443 | 0.0000212 | 0.3877986 | 0.5225853 | 0.2885554 | 0.0011390 |
832 | RESOLUTION OF D LOOP STRUCTURES THROUGH SYNTHESIS DEPENDENT STRAND ANNEALING SDSA | 24 | 0.0011090 | -0.2830046 | -0.4169570 | 0.0164085 | 0.0004064 | 0.5039293 | 0.0947187 | 0.0100237 |
690 | PHASE 0 RAPID DEPOLARISATION | 30 | 0.0003551 | -0.3085431 | -0.3864745 | 0.0034483 | 0.0002487 | 0.4945314 | 0.0551058 | 0.0040122 |
1170 | WNT5A DEPENDENT INTERNALIZATION OF FZD2 FZD5 AND ROR2 | 13 | 0.0083401 | 0.4712498 | 0.0516347 | 0.0032612 | 0.7472167 | 0.4740701 | 0.2967127 | 0.0487541 |
368 | GAP JUNCTION ASSEMBLY | 21 | 0.0018564 | 0.4361860 | 0.0880369 | 0.0005395 | 0.4849947 | 0.4449817 | 0.2461786 | 0.0149404 |
306 | EXPORT OF VIRAL RIBONUCLEOPROTEINS FROM NUCLEUS | 31 | 0.0004790 | -0.1683347 | -0.4057426 | 0.1048420 | 0.0000924 | 0.4392763 | 0.1678727 | 0.0051646 |
498 | IRE1ALPHA ACTIVATES CHAPERONES | 50 | 0.0000021 | 0.4158784 | 0.1339761 | 0.0000004 | 0.1013407 | 0.4369261 | 0.1993350 | 0.0000586 |
796 | REGULATION OF GLUCOKINASE BY GLUCOKINASE REGULATORY PROTEIN | 29 | 0.0007214 | -0.1400191 | -0.4071337 | 0.1919506 | 0.0001478 | 0.4305382 | 0.1888785 | 0.0074353 |
1022 | SUMOYLATION OF RNA BINDING PROTEINS | 45 | 0.0000625 | -0.2135980 | -0.3730498 | 0.0131925 | 0.0000149 | 0.4298723 | 0.1127494 | 0.0009925 |
650 | NUCLEAR PORE COMPLEX NPC DISASSEMBLY | 32 | 0.0008210 | -0.1918688 | -0.3830359 | 0.0603665 | 0.0001769 | 0.4284042 | 0.1351756 | 0.0081061 |
797 | REGULATION OF GLYCOLYSIS BY FRUCTOSE 2 6 BISPHOSPHATE METABOLISM | 11 | 0.0086442 | 0.2011696 | -0.3726334 | 0.2480111 | 0.0323622 | 0.4234676 | 0.4057400 | 0.0496027 |
1023 | SUMOYLATION OF SUMOYLATION PROTEINS | 33 | 0.0008433 | -0.1950421 | -0.3756462 | 0.0525355 | 0.0001881 | 0.4232629 | 0.1277064 | 0.0081221 |
645 | NS1 MEDIATED EFFECTS ON HOST PATHWAYS | 37 | 0.0005485 | -0.2249845 | -0.3577699 | 0.0178946 | 0.0001661 | 0.4226314 | 0.0938934 | 0.0058057 |
261 | DOWNREGULATION OF SMAD2 3 SMAD4 TRANSCRIPTIONAL ACTIVITY | 23 | 0.0079638 | -0.3707630 | -0.1991917 | 0.0020846 | 0.0982428 | 0.4208831 | 0.1213193 | 0.0470221 |
112 | CARBOXYTERMINAL POST TRANSLATIONAL MODIFICATIONS OF TUBULIN | 36 | 0.0000011 | 0.3965491 | -0.1228691 | 0.0000383 | 0.2021419 | 0.4151482 | 0.3672841 | 0.0000366 |
487 | INTRAFLAGELLAR TRANSPORT | 51 | 0.0000097 | 0.3864050 | 0.1171124 | 0.0000018 | 0.1480769 | 0.4037625 | 0.1904187 | 0.0002004 |
649 | NUCLEAR IMPORT OF REV PROTEIN | 32 | 0.0013582 | -0.1562537 | -0.3711224 | 0.1261500 | 0.0002799 | 0.4026748 | 0.1519351 | 0.0116488 |
461 | INTERACTIONS OF VPR WITH HOST CELLULAR PROTEINS | 34 | 0.0010943 | -0.1497702 | -0.3659455 | 0.1307815 | 0.0002219 | 0.3954077 | 0.1528590 | 0.0099679 |
43 | AGGREPHAGY | 35 | 0.0000707 | 0.3944059 | 0.0110142 | 0.0000539 | 0.9102389 | 0.3945597 | 0.2710989 | 0.0010782 |
460 | INTERACTIONS OF REV WITH HOST CELLULAR PROTEINS | 35 | 0.0017316 | -0.1435697 | -0.3483398 | 0.1416780 | 0.0003623 | 0.3767663 | 0.1447943 | 0.0141297 |
204 | CYTOSOLIC TRNA AMINOACYLATION | 24 | 0.0004600 | 0.3515631 | -0.1310635 | 0.0028715 | 0.2664559 | 0.3751990 | 0.3412685 | 0.0050515 |
506 | KERATAN SULFATE KERATIN METABOLISM | 30 | 0.0081523 | 0.3201308 | 0.1920674 | 0.0024091 | 0.0686899 | 0.3733277 | 0.0905545 | 0.0478947 |
1137 | TRANSPORT OF MATURE MRNAS DERIVED FROM INTRONLESS TRANSCRIPTS | 41 | 0.0003057 | -0.0901105 | -0.3579980 | 0.3182279 | 0.0000730 | 0.3691646 | 0.1894251 | 0.0035567 |
854 | RHO GTPASES ACTIVATE WASPS AND WAVES | 36 | 0.0001436 | -0.3674810 | 0.0062451 | 0.0001359 | 0.9483117 | 0.3675340 | 0.2642642 | 0.0018963 |
728 | POTASSIUM CHANNELS | 90 | 0.0000037 | -0.2507306 | -0.2606572 | 0.0000396 | 0.0000193 | 0.3616739 | 0.0070192 | 0.0000976 |
1026 | SUMOYLATION OF UBIQUITINYLATION PROTEINS | 37 | 0.0029455 | -0.1578794 | -0.3230767 | 0.0966146 | 0.0006728 | 0.3595893 | 0.1168121 | 0.0211031 |
1016 | SUMOYLATION OF CHROMATIN ORGANIZATION PROTEINS | 58 | 0.0002339 | -0.1872391 | -0.3024414 | 0.0136759 | 0.0000680 | 0.3557095 | 0.0814604 | 0.0028625 |
1140 | TRANSPORT OF THE SLBP DEPENDANT MATURE MRNA | 34 | 0.0050584 | -0.1398249 | -0.3221250 | 0.1583379 | 0.0011528 | 0.3511632 | 0.1289056 | 0.0324786 |
205 | DAG AND IP3 SIGNALING | 40 | 0.0069303 | -0.2446500 | -0.2387030 | 0.0074300 | 0.0090055 | 0.3418081 | 0.0042052 | 0.0417594 |
1017 | SUMOYLATION OF DNA DAMAGE RESPONSE AND REPAIR PROTEINS | 73 | 0.0001902 | -0.2198280 | -0.2482930 | 0.0011687 | 0.0002455 | 0.3316230 | 0.0201278 | 0.0024031 |
416 | HEME SIGNALING | 45 | 0.0032946 | -0.2903659 | -0.1400574 | 0.0007528 | 0.1041406 | 0.3223793 | 0.1062841 | 0.0233205 |
113 | CARDIAC CONDUCTION | 109 | 0.0000194 | -0.2202733 | -0.2130219 | 0.0000716 | 0.0001229 | 0.3064289 | 0.0051275 | 0.0003619 |
413 | HEDGEHOG OFF STATE | 106 | 0.0000077 | 0.2711438 | 0.1390381 | 0.0000014 | 0.0134479 | 0.3047139 | 0.0934128 | 0.0001669 |
432 | HSP90 CHAPERONE CYCLE FOR STEROID HORMONE RECEPTORS SHR | 48 | 0.0001262 | 0.2999714 | -0.0488206 | 0.0003244 | 0.5585632 | 0.3039182 | 0.2466332 | 0.0017042 |
1147 | TRNA AMINOACYLATION | 42 | 0.0011333 | 0.3033244 | 0.0082997 | 0.0006716 | 0.9258706 | 0.3034379 | 0.2086140 | 0.0101647 |
356 | G PROTEIN MEDIATED EVENTS | 52 | 0.0049027 | -0.2500637 | -0.1716389 | 0.0018164 | 0.0323171 | 0.3033015 | 0.0554547 | 0.0316518 |
390 | GLYCOLYSIS | 66 | 0.0000009 | 0.1244434 | -0.2733445 | 0.0805312 | 0.0001234 | 0.3003387 | 0.2812785 | 0.0000304 |
615 | NETRIN 1 SIGNALING | 49 | 0.0053335 | -0.1340237 | -0.2657117 | 0.1046867 | 0.0012946 | 0.2975988 | 0.0931175 | 0.0338748 |
1113 | TRANSCRIPTIONAL REGULATION BY MECP2 | 59 | 0.0016765 | -0.2681401 | -0.0876527 | 0.0003687 | 0.2444037 | 0.2821030 | 0.1276238 | 0.0138724 |
679 | PARASITE INFECTION | 55 | 0.0004335 | -0.2776931 | 0.0061546 | 0.0003685 | 0.9370942 | 0.2777613 | 0.2007106 | 0.0048508 |
840 | RET SIGNALING | 37 | 0.0077690 | -0.0173274 | -0.2770961 | 0.8553137 | 0.0035415 | 0.2776373 | 0.1836842 | 0.0461040 |
380 | GLUCOSE METABOLISM | 80 | 0.0000005 | 0.1394391 | -0.2349061 | 0.0311565 | 0.0002823 | 0.2731742 | 0.2647020 | 0.0000196 |
596 | NCAM1 INTERACTIONS | 41 | 0.0029284 | 0.0273952 | -0.2693597 | 0.7615559 | 0.0028460 | 0.2707492 | 0.2098374 | 0.0211031 |
60 | ANTIVIRAL MECHANISM BY IFN STIMULATED GENES | 73 | 0.0036586 | -0.2026575 | -0.1755653 | 0.0027646 | 0.0095255 | 0.2681291 | 0.0191571 | 0.0255881 |
463 | INTERFERON ALPHA BETA SIGNALING | 55 | 0.0001054 | -0.1833878 | 0.1799538 | 0.0186801 | 0.0210098 | 0.2569328 | 0.2569213 | 0.0014965 |
1155 | UNFOLDED PROTEIN RESPONSE UPR | 86 | 0.0002530 | 0.2495706 | 0.0585255 | 0.0000636 | 0.3484422 | 0.2563410 | 0.1350893 | 0.0030339 |
166 | COLLAGEN CHAIN TRIMERIZATION | 40 | 0.0022296 | 0.1116458 | -0.2278464 | 0.2218924 | 0.0126658 | 0.2537297 | 0.2400572 | 0.0170116 |
109 | CA2 PATHWAY | 57 | 0.0002617 | -0.2336347 | 0.0924969 | 0.0022867 | 0.2272565 | 0.2512784 | 0.2306099 | 0.0030814 |
617 | NEURONAL SYSTEM | 368 | 0.0000000 | -0.1544909 | -0.1969928 | 0.0000004 | 0.0000000 | 0.2503470 | 0.0300534 | 0.0000000 |
702 | PI METABOLISM | 79 | 0.0062378 | -0.1600583 | -0.1857138 | 0.0139574 | 0.0043378 | 0.2451699 | 0.0181412 | 0.0383741 |
959 | SIGNALING BY HEDGEHOG | 141 | 0.0000457 | 0.2167750 | 0.1112123 | 0.0000090 | 0.0227399 | 0.2436382 | 0.0746440 | 0.0007462 |
86 | AURKA ACTIVATION BY TPX2 | 71 | 0.0008405 | -0.0110699 | -0.2402874 | 0.8719283 | 0.0004654 | 0.2405423 | 0.1620813 | 0.0081221 |
182 | COPI INDEPENDENT GOLGI TO ER RETROGRADE TRAFFIC | 44 | 0.0051335 | 0.2334276 | -0.0510880 | 0.0073957 | 0.5577721 | 0.2389528 | 0.2011829 | 0.0327820 |
464 | INTERFERON GAMMA SIGNALING | 77 | 0.0000360 | -0.2175153 | 0.0978446 | 0.0009713 | 0.1378970 | 0.2385089 | 0.2229932 | 0.0006045 |
165 | COLLAGEN BIOSYNTHESIS AND MODIFYING ENZYMES | 62 | 0.0006552 | 0.2260318 | -0.0608405 | 0.0020894 | 0.4075673 | 0.2340767 | 0.2028493 | 0.0068125 |
748 | PROTEIN FOLDING | 89 | 0.0060364 | 0.1738059 | 0.1537908 | 0.0046160 | 0.0121966 | 0.2320778 | 0.0141528 | 0.0377275 |
243 | DISEASES OF METABOLISM | 197 | 0.0000087 | 0.1905627 | 0.1321654 | 0.0000041 | 0.0014006 | 0.2319091 | 0.0412931 | 0.0001819 |
909 | SELECTIVE AUTOPHAGY | 72 | 0.0046939 | 0.2174017 | 0.0420582 | 0.0014297 | 0.5373855 | 0.2214326 | 0.1239866 | 0.0308119 |
183 | COPI MEDIATED ANTEROGRADE TRANSPORT | 91 | 0.0001198 | 0.2117155 | -0.0482428 | 0.0004847 | 0.4266662 | 0.2171424 | 0.1838183 | 0.0016375 |
780 | RECRUITMENT OF MITOTIC CENTROSOME PROTEINS AND COMPLEXES | 78 | 0.0012012 | 0.0072359 | -0.2164128 | 0.9120719 | 0.0009561 | 0.2165337 | 0.1581435 | 0.0106922 |
595 | NCAM SIGNALING FOR NEURITE OUT GROWTH | 61 | 0.0065284 | 0.0000747 | -0.2145353 | 0.9991951 | 0.0037663 | 0.2145353 | 0.1517522 | 0.0397457 |
466 | INTERLEUKIN 1 FAMILY SIGNALING | 121 | 0.0021408 | 0.1127595 | 0.1794810 | 0.0323011 | 0.0006552 | 0.2119625 | 0.0471792 | 0.0165489 |
107 | C TYPE LECTIN RECEPTORS CLRS | 111 | 0.0012564 | 0.0616490 | 0.1997722 | 0.2621863 | 0.0002791 | 0.2090682 | 0.0976678 | 0.0110999 |
781 | RECRUITMENT OF NUMA TO MITOTIC CENTROSOMES | 85 | 0.0002328 | 0.0784911 | -0.1913363 | 0.2112288 | 0.0023043 | 0.2068102 | 0.1907968 | 0.0028625 |
255 | DNA REPLICATION | 121 | 0.0043128 | 0.1192081 | 0.1640880 | 0.0236293 | 0.0018373 | 0.2028187 | 0.0317349 | 0.0286300 |
465 | INTERFERON SIGNALING | 164 | 0.0000154 | -0.2018637 | -0.0193762 | 0.0000083 | 0.6688900 | 0.2027915 | 0.1290381 | 0.0003007 |
1133 | TRANSMISSION ACROSS CHEMICAL SYNAPSES | 240 | 0.0000225 | -0.1181249 | -0.1643032 | 0.0016476 | 0.0000120 | 0.2023586 | 0.0326530 | 0.0004003 |
338 | FOXO MEDIATED TRANSCRIPTION | 58 | 0.0026153 | -0.1542684 | 0.1304766 | 0.0422113 | 0.0857773 | 0.2020467 | 0.2013451 | 0.0195675 |
308 | EXTRA NUCLEAR ESTROGEN SIGNALING | 67 | 0.0020482 | -0.1872781 | 0.0731846 | 0.0080503 | 0.3004546 | 0.2010699 | 0.1841750 | 0.0162608 |
619 | NEUROTRANSMITTER RECEPTORS AND POSTSYNAPTIC SIGNAL TRANSMISSION | 179 | 0.0004424 | -0.1136922 | -0.1623129 | 0.0087737 | 0.0001826 | 0.1981701 | 0.0343800 | 0.0049037 |
181 | COPI DEPENDENT GOLGI TO ER RETROGRADE TRAFFIC | 86 | 0.0040530 | 0.1951972 | 0.0161123 | 0.0017625 | 0.7963101 | 0.1958611 | 0.1266322 | 0.0272127 |
1115 | TRANSCRIPTIONAL REGULATION BY RUNX2 | 108 | 0.0038661 | 0.0631045 | 0.1852731 | 0.2575519 | 0.0008855 | 0.1957251 | 0.0863862 | 0.0261499 |
168 | COLLAGEN FORMATION | 79 | 0.0017237 | 0.1900909 | -0.0444999 | 0.0035032 | 0.4943388 | 0.1952301 | 0.1658808 | 0.0141297 |
992 | SIGNALING BY VEGF | 103 | 0.0071767 | -0.1792767 | -0.0751461 | 0.0016778 | 0.1878836 | 0.1943889 | 0.0736314 | 0.0430236 |
391 | GLYCOSAMINOGLYCAN METABOLISM | 114 | 0.0084438 | 0.1615427 | 0.1067080 | 0.0029055 | 0.0492180 | 0.1936043 | 0.0387740 | 0.0491164 |
588 | MUSCLE CONTRACTION | 162 | 0.0016662 | -0.1492699 | -0.1206097 | 0.0010557 | 0.0081393 | 0.1919068 | 0.0202659 | 0.0138724 |
810 | REGULATION OF PLK1 ACTIVITY AT G2 M TRANSITION | 85 | 0.0026312 | 0.0171565 | -0.1900295 | 0.7846536 | 0.0024691 | 0.1908024 | 0.1465026 | 0.0195675 |
621 | NEUTROPHIL DEGRANULATION | 385 | 0.0000000 | 0.0642539 | 0.1747827 | 0.0308702 | 0.0000000 | 0.1862191 | 0.0781557 | 0.0000015 |
87 | AUTOPHAGY | 139 | 0.0017833 | 0.1721318 | 0.0415933 | 0.0004636 | 0.3976545 | 0.1770858 | 0.0923047 | 0.0144509 |
977 | SIGNALING BY NTRKS | 130 | 0.0037381 | -0.0481928 | -0.1684682 | 0.3431197 | 0.0009181 | 0.1752258 | 0.0850475 | 0.0259894 |
141 | CELLULAR RESPONSES TO EXTERNAL STIMULI | 603 | 0.0000000 | 0.0875166 | 0.1499739 | 0.0002562 | 0.0000000 | 0.1736413 | 0.0441639 | 0.0000001 |
53 | ANCHORING OF THE BASAL BODY TO THE PLASMA MEMBRANE | 96 | 0.0014448 | 0.0600657 | -0.1628670 | 0.3094389 | 0.0058475 | 0.1735902 | 0.1576372 | 0.0123016 |
572 | MITOTIC G1 PHASE AND G1 S TRANSITION | 140 | 0.0047264 | 0.0648761 | 0.1603328 | 0.1855025 | 0.0010659 | 0.1729611 | 0.0674981 | 0.0308348 |
770 | RAC3 GTPASE CYCLE | 89 | 0.0053672 | -0.1599979 | 0.0420121 | 0.0091183 | 0.4935752 | 0.1654218 | 0.1428427 | 0.0338751 |
152 | CILIUM ASSEMBLY | 191 | 0.0000158 | 0.1591239 | -0.0420656 | 0.0001519 | 0.3167319 | 0.1645902 | 0.1422625 | 0.0003026 |
552 | METABOLISM OF RNA | 644 | 0.0000000 | 0.1094764 | 0.1202908 | 0.0000023 | 0.0000002 | 0.1626498 | 0.0076469 | 0.0000012 |
902 | S PHASE | 153 | 0.0061230 | 0.0516080 | 0.1493380 | 0.2710689 | 0.0014464 | 0.1580039 | 0.0691055 | 0.0380194 |
396 | GOLGI TO ER RETROGRADE TRANSPORT | 119 | 0.0045253 | 0.1547677 | -0.0106284 | 0.0035669 | 0.8414053 | 0.1551322 | 0.1169527 | 0.0298718 |
768 | RAC1 GTPASE CYCLE | 177 | 0.0038522 | -0.1451293 | -0.0502447 | 0.0008776 | 0.2494484 | 0.1535807 | 0.0670935 | 0.0261499 |
543 | METABOLISM OF CARBOHYDRATES | 258 | 0.0000222 | 0.1522668 | -0.0020747 | 0.0000262 | 0.9543261 | 0.1522809 | 0.1091359 | 0.0004003 |
293 | ER TO GOLGI ANTEROGRADE TRANSPORT | 142 | 0.0013220 | 0.1385097 | -0.0444708 | 0.0044141 | 0.3607380 | 0.1454736 | 0.1293867 | 0.0115925 |
226 | DEGRADATION OF THE EXTRACELLULAR MATRIX | 107 | 0.0068766 | 0.0524022 | -0.1327964 | 0.3493559 | 0.0177043 | 0.1427616 | 0.1309552 | 0.0416496 |
575 | MITOTIC PROMETAPHASE | 177 | 0.0040964 | -0.0187984 | -0.1386502 | 0.6665542 | 0.0014804 | 0.1399188 | 0.0847481 | 0.0273484 |
441 | INFECTIOUS DISEASE | 732 | 0.0000001 | 0.0467613 | 0.1224365 | 0.0320753 | 0.0000000 | 0.1310623 | 0.0535104 | 0.0000061 |
1142 | TRANSPORT TO THE GOLGI AND SUBSEQUENT MODIFICATION | 171 | 0.0014990 | 0.1204929 | -0.0471296 | 0.0066195 | 0.2882335 | 0.1293822 | 0.1185270 | 0.0126711 |
450 | INNATE IMMUNE SYSTEM | 778 | 0.0000002 | 0.0115185 | 0.1125436 | 0.5867691 | 0.0000001 | 0.1131315 | 0.0714355 | 0.0000063 |
72 | ASPARAGINE N LINKED GLYCOSYLATION | 285 | 0.0029962 | 0.1072633 | -0.0002970 | 0.0018698 | 0.9931305 | 0.1072637 | 0.0760566 | 0.0213368 |
199 | CYTOKINE SIGNALING IN IMMUNE SYSTEM | 539 | 0.0001119 | -0.0681927 | 0.0484855 | 0.0069691 | 0.0550576 | 0.0836725 | 0.0825040 | 0.0015572 |
878 | RNA POLYMERASE II TRANSCRIPTION | 1087 | 0.0000556 | -0.0793692 | -0.0223721 | 0.0000116 | 0.2165077 | 0.0824620 | 0.0403031 | 0.0008949 |
547 | METABOLISM OF LIPIDS | 613 | 0.0028957 | 0.0090538 | 0.0773916 | 0.7030936 | 0.0011198 | 0.0779194 | 0.0483221 | 0.0211031 |
1162 | VESICLE MEDIATED TRANSPORT | 611 | 0.0064610 | 0.0293489 | -0.0516311 | 0.2173451 | 0.0299835 | 0.0593896 | 0.0572615 | 0.0395403 |
# heatmap
mr1 <- head(subset(mres1$enrichment_result,p.adjustMANOVA<0.05),30)
mr1 <- as.matrix(mr1[,4:5])
rownames(mr1) <- head(mres1$enrichment_result,30)$set
colfunc <- colorRampPalette(c("blue", "white", "red"))
par(mar=c(2,2,2,2))
heatmap.2(mr1,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in hypothalamus" , cexCol=0.9 )
pdf("plot22_mitch1_heatmap01.pdf")
heatmap.2(mr1,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in hypothalamus" , cexCol=0.9 )
dev.off()
## png
## 2
Mitch for LPS in amy
m2_l <- mitch_import(dge2_l, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 16818
## Note: no. genes in output = 16805
## Note: estimated proportion of input genes in output = 0.999
mres2_l <- mitch_calc(m2_l, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres2_l$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in amy for LPS") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
534 | MET ACTIVATES RAP1 AND RAC1 | 11 | 0.0010392 | -0.5710589 | 0.0295794 |
1039 | SYNTHESIS OF PIPS AT THE LATE ENDOSOME MEMBRANE | 11 | 0.0021453 | -0.5344441 | 0.0510929 |
24 | ACTIVATION OF RAC1 | 13 | 0.0017643 | -0.5009253 | 0.0447585 |
443 | INITIAL TRIGGERING OF COMPLEMENT | 10 | 0.0100369 | 0.4701756 | 0.1541198 |
199 | CYTOSOLIC IRON SULFUR CLUSTER ASSEMBLY | 13 | 0.0063266 | 0.4373603 | 0.1153611 |
301 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | 0.4368724 | 0.0000000 |
185 | CREB1 PHOSPHORYLATION THROUGH THE ACTIVATION OF ADENYLATE CYCLASE | 11 | 0.0121751 | -0.4365520 | 0.1711852 |
621 | NF KB IS ACTIVATED AND SIGNALS SURVIVAL | 13 | 0.0068114 | 0.4334482 | 0.1222900 |
20 | ACTIVATION OF IRF3 IRF7 MEDIATED BY TBK1 IKK EPSILON | 16 | 0.0027795 | 0.4319123 | 0.0636015 |
909 | SEMA4D INDUCED CELL MIGRATION AND GROWTH CONE COLLAPSE | 20 | 0.0009094 | 0.4284599 | 0.0265313 |
901 | SCAVENGING BY CLASS A RECEPTORS | 14 | 0.0075549 | 0.4123553 | 0.1306844 |
917 | SEROTONIN RECEPTORS | 10 | 0.0291904 | -0.3982971 | 0.2958961 |
164 | COLLAGEN CHAIN TRIMERIZATION | 40 | 0.0000146 | 0.3960722 | 0.0008119 |
1037 | SYNTHESIS OF PIPS AT THE EARLY ENDOSOME MEMBRANE | 16 | 0.0061523 | -0.3955938 | 0.1139641 |
798 | REGULATION OF INNATE IMMUNE RESPONSES TO CYTOSOLIC DNA | 13 | 0.0188749 | 0.3761223 | 0.2265723 |
833 | RESPONSE OF EIF2AK4 GCN2 TO AMINO ACID DEFICIENCY | 94 | 0.0000000 | 0.3738816 | 0.0000001 |
45 | ALPHA LINOLENIC OMEGA3 AND LINOLEIC OMEGA6 ACID METABOLISM | 12 | 0.0277431 | 0.3669485 | 0.2916776 |
163 | COLLAGEN BIOSYNTHESIS AND MODIFYING ENZYMES | 63 | 0.0000010 | 0.3568954 | 0.0000704 |
629 | NONSENSE MEDIATED DECAY NMD | 109 | 0.0000000 | 0.3466105 | 0.0000001 |
42 | AGGREPHAGY | 35 | 0.0005204 | 0.3389590 | 0.0164130 |
m2_l_top <- subset(mres2_l$enrichment_result,p.adjustANOVA<0.05)
m2_l_up <- subset(m2_l_top,s.dist>0)$set
m2_l_dn <- subset(m2_l_top,s.dist<0)$set
mitch_report(mres2_l,outfile="mitch2_l.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch2_l.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f5e73bb91.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres2_l$enrichment_result,file="mitch2_l.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m2_l_top_up <- head(subset(m2_l_top,s.dist>0),10)[,"s.dist"]
names(m2_l_top_up) <- head(subset(m2_l_top,s.dist>0),10)[,"set"]
m2_l_top_dn <- head(subset(m2_l_top,s.dist<0),10)[,"s.dist"]
names(m2_l_top_dn) <- head(subset(m2_l_top,s.dist<0),10)[,"set"]
m2_l_top_updn <- c(m2_l_top_up,m2_l_top_dn)
m2_l_top_updn <- m2_l_top_updn[order(m2_l_top_updn)]
par(mar=c(5,25,3,1))
barplot(m2_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in amy")
grid()
pdf("plot23_mitch2lps01.pdf")
par(mar=c(5,25,3,1))
barplot(m2_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in amy")
grid()
dev.off()
## png
## 2
Mitch for OVA in amy
m2_o <- mitch_import(dge2_o, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 16624
## Note: no. genes in output = 16611
## Note: estimated proportion of input genes in output = 0.999
mres2_o <- mitch_calc(m2_o, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres2_o$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in amy for OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
1096 | TRAFFICKING AND PROCESSING OF ENDOSOMAL TLR | 11 | 0.0001763 | 0.6530559 | 0.0016590 |
656 | NUCLEOTIDE LIKE PURINERGIC RECEPTORS | 13 | 0.0005347 | 0.5546451 | 0.0043939 |
39 | ADP SIGNALLING THROUGH P2Y PURINOCEPTOR 12 | 19 | 0.0000407 | 0.5437560 | 0.0005103 |
72 | ASPARTATE AND ASPARAGINE METABOLISM | 10 | 0.0030231 | 0.5415336 | 0.0172096 |
170 | COMPLEX I BIOGENESIS | 56 | 0.0000000 | 0.5352440 | 0.0000000 |
1045 | SYNTHESIS OF VERY LONG CHAIN FATTY ACYL COAS | 20 | 0.0000351 | 0.5344042 | 0.0004546 |
1137 | TRIGLYCERIDE CATABOLISM | 14 | 0.0006681 | 0.5251638 | 0.0053182 |
704 | PINK1 PRKN MEDIATED MITOPHAGY | 22 | 0.0000244 | 0.5196982 | 0.0003353 |
344 | FRS MEDIATED FGFR4 SIGNALING | 12 | 0.0019164 | 0.5173002 | 0.0121544 |
921 | SHC MEDIATED CASCADE FGFR4 | 10 | 0.0047384 | 0.5157762 | 0.0243601 |
302 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | 0.5144868 | 0.0000000 |
188 | CRMPS IN SEMA3A SIGNALING | 16 | 0.0003875 | -0.5123682 | 0.0033247 |
831 | RESPIRATORY ELECTRON TRANSPORT | 102 | 0.0000000 | 0.5111484 | 0.0000000 |
153 | CITRIC ACID CYCLE TCA CYCLE | 22 | 0.0000354 | 0.5092805 | 0.0004546 |
700 | PI 3K CASCADE FGFR4 | 10 | 0.0053424 | 0.5087163 | 0.0264908 |
832 | RESPIRATORY ELECTRON TRANSPORT ATP SYNTHESIS BY CHEMIOSMOTIC COUPLING AND HEAT PRODUCTION BY UNCOUPLING PROTEINS | 125 | 0.0000000 | 0.5039253 | 0.0000000 |
718 | PLATELET SENSITIZATION BY LDL | 15 | 0.0007660 | 0.5017755 | 0.0058008 |
343 | FRS MEDIATED FGFR3 SIGNALING | 14 | 0.0012050 | 0.4997547 | 0.0082239 |
950 | SIGNALING BY FGFR3 FUSIONS IN CANCER | 10 | 0.0062828 | 0.4990422 | 0.0302976 |
920 | SHC MEDIATED CASCADE FGFR3 | 12 | 0.0029553 | 0.4955419 | 0.0169061 |
m2_o_top <- subset(mres2_o$enrichment_result,p.adjustANOVA<0.05)
m2_o_up <- subset(m2_o_top,s.dist>0)$set
m2_o_dn <- subset(m2_o_top,s.dist<0)$set
mitch_report(mres2_o,outfile="mitch2_o.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch2_o.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f7b6ca416.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres2_o$enrichment_result,file="mitch2_o.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m2_o_top_up <- head(subset(m2_o_top,s.dist>0),10)[,"s.dist"]
names(m2_o_top_up) <- head(subset(m2_o_top,s.dist>0),10)[,"set"]
m2_o_top_dn <- head(subset(m2_o_top,s.dist<0),10)[,"s.dist"]
names(m2_o_top_dn) <- head(subset(m2_o_top,s.dist<0),10)[,"set"]
m2_o_top_updn <- c(m2_o_top_up,m2_o_top_dn)
m2_o_top_updn <- m2_o_top_updn[order(m2_o_top_updn)]
par(mar=c(5,25,3,1))
barplot(m2_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in amy")
grid()
pdf("plot24_mitch2ova01.pdf")
par(mar=c(5,25,3,1))
barplot(m2_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in amy")
grid()
dev.off()
## png
## 2
Mitch 2 euler.
m2_l_up <- subset(m2_l_top,s.dist>0)$set
m2_l_dn <- subset(m2_l_top,s.dist<0)$set
m2_o_up <- subset(m2_o_top,s.dist>0)$set
m2_o_dn <- subset(m2_o_top,s.dist<0)$set
par(mar=c(2,2,2,2))
v0 <- list("LPS up"=m2_l_up,
"LPS dn"=m2_l_dn,
"OVA up"=m2_o_up,
"OVA dn"=m2_o_dn)
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on amy")
pdf("plot25_mitch2lpsovaeuler01.pdf")
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on amy")
dev.off()
## png
## 2
Two dimensional mitch analysis in amy.
ml <- list("LPS"=dge2_l,"OVA"=dge2_o)
m2 <- mitch_import(ml, DEtype="deseq2",geneTable=gt)
## Note: Mean no. genes in input = 16721
## Note: no. genes in output = 16550
## Note: estimated proportion of input genes in output = 0.99
head(m2)
## LPS OVA
## 0610009B22Rik 0.2684894 1.831236577
## 0610009E02Rik -0.7521235 -0.103702849
## 0610009L18Rik -1.1838923 -0.075637695
## 0610010K14Rik -0.0433030 0.417670579
## 0610012G03Rik -0.1930476 0.008709563
## 0610030E20Rik 1.0496464 -1.609523779
mres2 <- mitch_calc(m2, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres2$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in amy for LPS and OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.LPS | s.OVA | p.LPS | p.OVA | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|
301 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | 0.4428984 | 0.5154428 | 0.0000000 | 0.0000000 | 0.6795884 | 0.0512967 | 0.0000000 |
1095 | TRAFFICKING AND PROCESSING OF ENDOSOMAL TLR | 11 | 0.0008534 | 0.0789154 | 0.6536891 | 0.6504400 | 0.0001737 | 0.6584353 | 0.4064264 | 0.0064201 |
534 | MET ACTIVATES RAP1 AND RAC1 | 11 | 0.0012946 | -0.5674576 | 0.2447823 | 0.0011181 | 0.1598323 | 0.6180021 | 0.5743404 | 0.0088796 |
169 | COMPLEX I BIOGENESIS | 56 | 0.0000000 | 0.2951961 | 0.5360932 | 0.0001333 | 0.0000000 | 0.6119940 | 0.1703400 | 0.0000000 |
833 | RESPONSE OF EIF2AK4 GCN2 TO AMINO ACID DEFICIENCY | 94 | 0.0000000 | 0.3799739 | 0.4680230 | 0.0000000 | 0.0000000 | 0.6028480 | 0.0622601 | 0.0000000 |
45 | ALPHA LINOLENIC OMEGA3 AND LINOLEIC OMEGA6 ACID METABOLISM | 12 | 0.0022728 | 0.3720220 | 0.4719132 | 0.0256598 | 0.0046464 | 0.6009180 | 0.0706337 | 0.0143250 |
1004 | SRP DEPENDENT COTRANSLATIONAL PROTEIN TARGETING TO MEMBRANE | 106 | 0.0000000 | 0.3242635 | 0.4910307 | 0.0000000 | 0.0000000 | 0.5884369 | 0.1179223 | 0.0000000 |
39 | ADP SIGNALLING THROUGH P2Y PURINOCEPTOR 12 | 19 | 0.0000308 | -0.2223351 | 0.5447214 | 0.0934303 | 0.0000394 | 0.5883488 | 0.5423908 | 0.0004275 |
443 | INITIAL TRIGGERING OF COMPLEMENT | 10 | 0.0085197 | 0.4741959 | 0.3371584 | 0.0094162 | 0.0648791 | 0.5818398 | 0.0969001 | 0.0395775 |
123 | CD28 DEPENDENT VAV1 PATHWAY | 10 | 0.0045800 | -0.4091898 | 0.4084522 | 0.0250553 | 0.0253184 | 0.5781605 | 0.5781603 | 0.0244966 |
302 | EUKARYOTIC TRANSLATION INITIATION | 114 | 0.0000000 | 0.3056310 | 0.4747292 | 0.0000000 | 0.0000000 | 0.5646044 | 0.1195705 | 0.0000000 |
655 | NUCLEOTIDE LIKE PURINERGIC RECEPTORS | 13 | 0.0024434 | 0.0355613 | 0.5555235 | 0.8243323 | 0.0005239 | 0.5566606 | 0.3676688 | 0.0149161 |
830 | RESPIRATORY ELECTRON TRANSPORT | 102 | 0.0000000 | 0.2101871 | 0.5120165 | 0.0002465 | 0.0000000 | 0.5534794 | 0.2134256 | 0.0000000 |
703 | PINK1 PRKN MEDIATED MITOPHAGY | 22 | 0.0000614 | 0.1877695 | 0.5206317 | 0.1274161 | 0.0000236 | 0.5534571 | 0.2353691 | 0.0007382 |
1029 | SYNTHESIS OF BILE ACIDS AND BILE SALTS VIA 7ALPHA HYDROXYCHOLESTEROL | 12 | 0.0057273 | 0.3195267 | 0.4511428 | 0.0553108 | 0.0068105 | 0.5528356 | 0.0930666 | 0.0282969 |
27 | ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S | 59 | 0.0000000 | 0.2702378 | 0.4802650 | 0.0003316 | 0.0000000 | 0.5510744 | 0.1485117 | 0.0000000 |
185 | CREB1 PHOSPHORYLATION THROUGH THE ACTIVATION OF ADENYLATE CYCLASE | 11 | 0.0046457 | -0.4322950 | 0.3416882 | 0.0130441 | 0.0497435 | 0.5510262 | 0.5472888 | 0.0245107 |
831 | RESPIRATORY ELECTRON TRANSPORT ATP SYNTHESIS BY CHEMIOSMOTIC COUPLING AND HEAT PRODUCTION BY UNCOUPLING PROTEINS | 125 | 0.0000000 | 0.2156308 | 0.5048212 | 0.0000317 | 0.0000000 | 0.5489454 | 0.2044885 | 0.0000000 |
164 | COLLAGEN CHAIN TRIMERIZATION | 39 | 0.0000000 | 0.4231880 | -0.3399428 | 0.0000048 | 0.0002396 | 0.5428159 | 0.5396149 | 0.0000003 |
71 | ASPARTATE AND ASPARAGINE METABOLISM | 10 | 0.0120759 | 0.0136397 | 0.5422249 | 0.9404699 | 0.0029861 | 0.5423964 | 0.3737662 | 0.0523441 |
m2_top <- subset(mres2$enrichment_result,p.adjustMANOVA<0.05)
m2_up <- subset(m2_top,s.dist>0)$set
m2_dn <- subset(m2_top,s.dist<0)$set
mitch_report(mres2,outfile="mitch2.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch2.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f3603b7fd.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres2$enrichment_result,file="mitch2.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m2_top_up <- head(subset(m2_top,s.dist>0),10)[,"s.dist"]
names(m2_top_up) <- head(subset(m2_top,s.dist>0),10)[,"set"]
m2_top_dn <- head(subset(m2_top,s.dist<0),10)[,"s.dist"]
names(m2_top_dn) <- head(subset(m2_top,s.dist<0),10)[,"set"]
m2_top_updn <- c(m2_top_up,m2_top_dn)
m2_top_updn <- m2_top_updn[order(m2_top_updn)]
# heatmap
mr2 <- head(subset(mres2$enrichment_result,p.adjustMANOVA<0.05),30)
mr2 <- as.matrix(mr2[,4:5])
rownames(mr2) <- head(mres2$enrichment_result,30)$set
colfunc <- colorRampPalette(c("blue", "white", "red"))
heatmap.2(mr2,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in amy" , cexCol=0.9 )
pdf("plot26_mitch2_heatmap01.pdf")
heatmap.2(mr2,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in amy" , cexCol=0.9 )
dev.off()
## png
## 2
Need to make a scatterplot to highlight the following:
par(mar=c(4,4,2,1))
a <- mres2$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
pdf("plot26b_mitch2_scatter01.pdf")
a <- mres2$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
dev.off()
## png
## 2
Mitch for LPS in hip
m3_l <- mitch_import(dge3_l, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 16927
## Note: no. genes in output = 16911
## Note: estimated proportion of input genes in output = 0.999
mres3_l <- mitch_calc(m3_l, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres3_l$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in hip for LPS") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
164 | COHESIN LOADING ONTO CHROMATIN | 10 | 0.0035347 | -0.5326904 | 0.0599359 |
1048 | SYNTHESIS SECRETION AND INACTIVATION OF GLUCAGON LIKE PEPTIDE 1 GLP 1 | 12 | 0.0014018 | -0.5325266 | 0.0376069 |
438 | INCRETIN SYNTHESIS SECRETION AND INACTIVATION | 13 | 0.0011805 | -0.5195426 | 0.0371346 |
1057 | TERMINATION OF O GLYCAN BIOSYNTHESIS | 11 | 0.0032760 | 0.5120280 | 0.0589680 |
725 | POST CHAPERONIN TUBULIN FOLDING PATHWAY | 17 | 0.0002652 | 0.5108949 | 0.0173684 |
191 | CROSSLINKING OF COLLAGEN FIBRILS | 15 | 0.0009379 | 0.4933791 | 0.0371107 |
737 | PROCESSING AND ACTIVATION OF SUMO | 10 | 0.0082178 | -0.4826697 | 0.1012866 |
66 | APOPTOSIS INDUCED DNA FRAGMENTATION | 10 | 0.0082241 | -0.4826223 | 0.1012866 |
35 | ADENYLATE CYCLASE ACTIVATING PATHWAY | 10 | 0.0106255 | 0.4665641 | 0.1106516 |
201 | CYTOSOLIC IRON SULFUR CLUSTER ASSEMBLY | 13 | 0.0037291 | 0.4645611 | 0.0623289 |
1131 | TRANSPORT OF CONNEXONS TO THE PLASMA MEMBRANE | 13 | 0.0044157 | 0.4560121 | 0.0670955 |
1047 | SYNTHESIS SECRETION AND DEACYLATION OF GHRELIN | 12 | 0.0062768 | -0.4556384 | 0.0863982 |
125 | CD28 DEPENDENT VAV1 PATHWAY | 11 | 0.0114066 | -0.4405487 | 0.1121491 |
26 | ACTIVATION OF SMO | 16 | 0.0028020 | 0.4315552 | 0.0555656 |
579 | MITOTIC TELOPHASE CYTOKINESIS | 13 | 0.0112115 | -0.4062383 | 0.1121152 |
1029 | SYNTHESIS OF ACTIVE UBIQUITIN ROLES OF E1 AND E2 ENZYMES | 29 | 0.0001733 | -0.4028776 | 0.0144821 |
537 | MET ACTIVATES RAP1 AND RAC1 | 11 | 0.0226278 | -0.3969661 | 0.1647319 |
826 | REPRESSION OF WNT TARGET GENES | 14 | 0.0116740 | 0.3892830 | 0.1138216 |
187 | CREB1 PHOSPHORYLATION THROUGH THE ACTIVATION OF ADENYLATE CYCLASE | 11 | 0.0266693 | -0.3859387 | 0.1811960 |
146 | CHK1 CHK2 CDS1 MEDIATED INACTIVATION OF CYCLIN B CDK1 COMPLEX | 10 | 0.0352841 | -0.3844506 | 0.2193881 |
m3_l_top <- subset(mres3_l$enrichment_result,p.adjustANOVA<0.05)
m3_l_up <- subset(m3_l_top,s.dist>0)$set
m3_l_dn <- subset(m3_l_top,s.dist<0)$set
mitch_report(mres3_l,outfile="mitch3_l.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch3_l.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f4cf2b9bc.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres3_l$enrichment_result,file="mitch3_l.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m3_l_top_up <- head(subset(m3_l_top,s.dist>0),10)[,"s.dist"]
names(m3_l_top_up) <- head(subset(m3_l_top,s.dist>0),10)[,"set"]
m3_l_top_dn <- head(subset(m3_l_top,s.dist<0),10)[,"s.dist"]
names(m3_l_top_dn) <- head(subset(m3_l_top,s.dist<0),10)[,"set"]
m3_l_top_updn <- c(m3_l_top_up,m3_l_top_dn)
m3_l_top_updn <- m3_l_top_updn[order(m3_l_top_updn)]
par(mar=c(5,25,3,1))
barplot(m3_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in hip")
grid()
pdf("plot27_mitch3lps01.pdf")
par(mar=c(5,25,3,1))
barplot(m3_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in hip")
grid()
dev.off()
## png
## 2
Mitch for OVA in hip
m3_o <- mitch_import(dge3_o, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 16953
## Note: no. genes in output = 16937
## Note: estimated proportion of input genes in output = 0.999
mres3_o <- mitch_calc(m3_o, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres3_o$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in hip for OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
1049 | SYNTHESIS SECRETION AND INACTIVATION OF GLUCAGON LIKE PEPTIDE 1 GLP 1 | 12 | 0.0000874 | -0.6539833 | 0.0009591 |
438 | INCRETIN SYNTHESIS SECRETION AND INACTIVATION | 13 | 0.0000527 | -0.6475919 | 0.0006233 |
303 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | -0.5745967 | 0.0000000 |
371 | GENE AND PROTEIN EXPRESSION BY JAK STAT SIGNALING AFTER INTERLEUKIN 12 STIMULATION | 31 | 0.0000001 | -0.5548784 | 0.0000026 |
28 | ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S | 59 | 0.0000000 | -0.5533188 | 0.0000000 |
304 | EUKARYOTIC TRANSLATION INITIATION | 114 | 0.0000000 | -0.5494462 | 0.0000000 |
1007 | SRP DEPENDENT COTRANSLATIONAL PROTEIN TARGETING TO MEMBRANE | 106 | 0.0000000 | -0.5422709 | 0.0000000 |
837 | RESPONSE OF EIF2AK4 GCN2 TO AMINO ACID DEFICIENCY | 94 | 0.0000000 | -0.5366836 | 0.0000000 |
1048 | SYNTHESIS SECRETION AND DEACYLATION OF GHRELIN | 12 | 0.0015491 | -0.5277006 | 0.0119345 |
35 | ADENYLATE CYCLASE ACTIVATING PATHWAY | 10 | 0.0049051 | 0.5137473 | 0.0302310 |
1030 | SYNTHESIS OF ACTIVE UBIQUITIN ROLES OF E1 AND E2 ENZYMES | 29 | 0.0000034 | -0.4983113 | 0.0000585 |
171 | COMPLEX I BIOGENESIS | 56 | 0.0000000 | -0.4947638 | 0.0000000 |
125 | CD28 DEPENDENT VAV1 PATHWAY | 11 | 0.0049409 | -0.4894460 | 0.0302922 |
1058 | TERMINATION OF O GLYCAN BIOSYNTHESIS | 10 | 0.0074822 | 0.4884386 | 0.0421234 |
189 | CRMPS IN SEMA3A SIGNALING | 16 | 0.0007192 | 0.4883577 | 0.0063320 |
909 | SELENOAMINO ACID METABOLISM | 109 | 0.0000000 | -0.4831234 | 0.0000000 |
66 | APOPTOSIS INDUCED DNA FRAGMENTATION | 10 | 0.0090320 | -0.4768004 | 0.0485157 |
751 | PROTEIN METHYLATION | 17 | 0.0007855 | -0.4703866 | 0.0068134 |
1099 | TRAFFICKING AND PROCESSING OF ENDOSOMAL TLR | 11 | 0.0083876 | -0.4590141 | 0.0461122 |
834 | RESPIRATORY ELECTRON TRANSPORT | 102 | 0.0000000 | -0.4577951 | 0.0000000 |
m3_o_top <- subset(mres3_o$enrichment_result,p.adjustANOVA<0.05)
m3_o_up <- subset(m3_o_top,s.dist>0)$set
m3_o_dn <- subset(m3_o_top,s.dist<0)$set
mitch_report(mres3_o,outfile="mitch3_o.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch3_o.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f69849171.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres3_o$enrichment_result,file="mitch3_o.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m3_o_top_up <- head(subset(m3_o_top,s.dist>0),10)[,"s.dist"]
names(m3_o_top_up) <- head(subset(m3_o_top,s.dist>0),10)[,"set"]
m3_o_top_dn <- head(subset(m3_o_top,s.dist<0),10)[,"s.dist"]
names(m3_o_top_dn) <- head(subset(m3_o_top,s.dist<0),10)[,"set"]
m3_o_top_updn <- c(m3_o_top_up,m3_o_top_dn)
m3_o_top_updn <- m3_o_top_updn[order(m3_o_top_updn)]
par(mar=c(5,25,3,1))
barplot(m3_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in hip")
grid()
pdf("plot28_mitch3ova01.pdf")
par(mar=c(5,25,3,1))
barplot(m3_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in hip")
grid()
dev.off()
## png
## 2
Mitch 3 euler.
m3_l_up <- subset(m3_l_top,s.dist>0)$set
m3_l_dn <- subset(m3_l_top,s.dist<0)$set
m3_o_up <- subset(m3_o_top,s.dist>0)$set
m3_o_dn <- subset(m3_o_top,s.dist<0)$set
par(mar=c(2,2,2,2))
v0 <- list("LPS up"=m3_l_up,
"LPS dn"=m3_l_dn,
"OVA up"=m3_o_up,
"OVA dn"=m3_o_dn)
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on hip")
pdf("plot29_mitch3lpsovaeuler01.pdf")
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on hip")
dev.off()
## png
## 2
Two dimensional mitch analysis in hip.
ml <- list("LPS"=dge3_l,"OVA"=dge3_o)
m3 <- mitch_import(ml, DEtype="deseq2",geneTable=gt)
## Note: Mean no. genes in input = 16940
## Note: no. genes in output = 16806
## Note: estimated proportion of input genes in output = 0.992
head(m3)
## LPS OVA
## 0610009B22Rik -3.3814425 -2.2697336
## 0610009E02Rik -0.3557659 -0.3519839
## 0610009L18Rik -0.8507498 -0.9139963
## 0610010K14Rik 1.2510787 -0.1751685
## 0610012G03Rik 3.9729326 0.5678859
## 0610030E20Rik 0.1581737 1.4359134
mres3 <- mitch_calc(m3, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres3$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in hip for LPS and OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.LPS | s.OVA | p.LPS | p.OVA | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|
1048 | SYNTHESIS SECRETION AND INACTIVATION OF GLUCAGON LIKE PEPTIDE 1 GLP 1 | 12 | 0.0004731 | -0.5304672 | -0.6523262 | 0.0014631 | 0.0000911 | 0.8407883 | 0.0861673 | 0.0034594 |
438 | INCRETIN SYNTHESIS SECRETION AND INACTIVATION | 13 | 0.0002930 | -0.5173813 | -0.6458781 | 0.0012377 | 0.0000552 | 0.8275518 | 0.0908609 | 0.0022407 |
1057 | TERMINATION OF O GLYCAN BIOSYNTHESIS | 10 | 0.0133453 | 0.5267683 | 0.4883901 | 0.0039202 | 0.0074883 | 0.7183382 | 0.0271375 | 0.0536562 |
1047 | SYNTHESIS SECRETION AND DEACYLATION OF GHRELIN | 12 | 0.0065744 | -0.4546663 | -0.5266464 | 0.0063889 | 0.0015832 | 0.6957571 | 0.0508976 | 0.0311421 |
35 | ADENYLATE CYCLASE ACTIVATING PATHWAY | 10 | 0.0172419 | 0.4668969 | 0.5136818 | 0.0105702 | 0.0049107 | 0.6941626 | 0.0330820 | 0.0652847 |
66 | APOPTOSIS INDUCED DNA FRAGMENTATION | 10 | 0.0224781 | -0.4818766 | -0.4765063 | 0.0083240 | 0.0090747 | 0.6776897 | 0.0037974 | 0.0804263 |
125 | CD28 DEPENDENT VAV1 PATHWAY | 11 | 0.0181447 | -0.4388914 | -0.4878887 | 0.0117200 | 0.0050801 | 0.6562477 | 0.0346463 | 0.0678254 |
1029 | SYNTHESIS OF ACTIVE UBIQUITIN ROLES OF E1 AND E2 ENZYMES | 29 | 0.0000217 | -0.4018659 | -0.4971729 | 0.0001799 | 0.0000036 | 0.6392785 | 0.0673922 | 0.0002283 |
191 | CROSSLINKING OF COLLAGEN FIBRILS | 15 | 0.0041889 | 0.4934350 | 0.4061263 | 0.0009367 | 0.0064641 | 0.6390748 | 0.0617366 | 0.0214053 |
371 | GENE AND PROTEIN EXPRESSION BY JAK STAT SIGNALING AFTER INTERLEUKIN 12 STIMULATION | 31 | 0.0000000 | -0.2950416 | -0.5534369 | 0.0044722 | 0.0000001 | 0.6271697 | 0.1827130 | 0.0000005 |
201 | CYTOSOLIC IRON SULFUR CLUSTER ASSEMBLY | 13 | 0.0148571 | 0.4644380 | 0.3885639 | 0.0037383 | 0.0152800 | 0.6055449 | 0.0536511 | 0.0585280 |
737 | PROCESSING AND ACTIVATION OF SUMO | 10 | 0.0295647 | -0.4806740 | -0.3557037 | 0.0084871 | 0.0514563 | 0.5979738 | 0.0883673 | 0.1002628 |
26 | ACTIVATION OF SMO | 16 | 0.0091319 | 0.4317972 | 0.4079512 | 0.0027868 | 0.0047259 | 0.5940311 | 0.0168617 | 0.0400161 |
28 | ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S | 59 | 0.0000000 | -0.2071902 | -0.5518408 | 0.0059278 | 0.0000000 | 0.5894540 | 0.2437048 | 0.0000000 |
303 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | -0.1277581 | -0.5729437 | 0.0395303 | 0.0000000 | 0.5870150 | 0.3147937 | 0.0000000 |
189 | CRMPS IN SEMA3A SIGNALING | 16 | 0.0021278 | 0.3208904 | 0.4886912 | 0.0262743 | 0.0007132 | 0.5846279 | 0.1186531 | 0.0125678 |
910 | SEMA3A PLEXIN REPULSION SIGNALING BY INHIBITING INTEGRIN ADHESION | 14 | 0.0150818 | 0.3652249 | 0.4470751 | 0.0179832 | 0.0037757 | 0.5772915 | 0.0578768 | 0.0590159 |
304 | EUKARYOTIC TRANSLATION INITIATION | 114 | 0.0000000 | -0.1675380 | -0.5479660 | 0.0020151 | 0.0000000 | 0.5730059 | 0.2690033 | 0.0000000 |
1006 | SRP DEPENDENT COTRANSLATIONAL PROTEIN TARGETING TO MEMBRANE | 106 | 0.0000000 | -0.1731703 | -0.5407027 | 0.0020803 | 0.0000000 | 0.5677565 | 0.2598847 | 0.0000000 |
146 | CHK1 CHK2 CDS1 MEDIATED INACTIVATION OF CYCLIN B CDK1 COMPLEX | 10 | 0.0708072 | -0.3832103 | -0.4122648 | 0.0358799 | 0.0239832 | 0.5628609 | 0.0205447 | 0.1922143 |
m3_top <- subset(mres3$enrichment_result,p.adjustMANOVA<0.05)
m3_up <- subset(m3_top,s.dist>0)$set
m3_dn <- subset(m3_top,s.dist<0)$set
mitch_report(mres3,outfile="mitch3.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch3.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70fbc696eb.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres3$enrichment_result,file="mitch3.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m3_top_up <- head(subset(m3_top,s.dist>0),10)[,"s.dist"]
names(m3_top_up) <- head(subset(m3_top,s.dist>0),10)[,"set"]
m3_top_dn <- head(subset(m3_top,s.dist<0),10)[,"s.dist"]
names(m3_top_dn) <- head(subset(m3_top,s.dist<0),10)[,"set"]
m3_top_updn <- c(m3_top_up,m3_top_dn)
m3_top_updn <- m3_top_updn[order(m3_top_updn)]
# heatmap
mr3 <- head(subset(mres3$enrichment_result,p.adjustMANOVA<0.05),30)
mr3 <- as.matrix(mr3[,4:5])
rownames(mr3) <- head(mres3$enrichment_result,30)$set
colfunc <- colorRampPalette(c("blue", "white", "red"))
heatmap.2(mr3,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in hip" , cexCol=0.9 )
pdf("plot30_mitch3_heatmap01.pdf")
heatmap.2(mr3,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in hip" , cexCol=0.9 )
dev.off()
## png
## 2
Need to make a scatterplot to highlight the following:
par(mar=c(4,4,2,1))
a <- mres3$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
pdf("plot30b_mitch3_scatter01.pdf")
a <- mres3$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
dev.off()
## png
## 2
Mitch for LPS in pag
m4_l <- mitch_import(dge4_l, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 17612
## Note: no. genes in output = 17595
## Note: estimated proportion of input genes in output = 0.999
mres4_l <- mitch_calc(m4_l, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres4_l$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in pag for LPS") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
340 | FORMATION OF TUBULIN FOLDING INTERMEDIATES BY CCT TRIC | 19 | 0.0000001 | 0.7073461 | 0.0000055 |
47 | ALPHA LINOLENIC OMEGA3 AND LINOLEIC OMEGA6 ACID METABOLISM | 12 | 0.0002646 | 0.6080779 | 0.0039983 |
398 | GOLGI CISTERNAE PERICENTRIOLAR STACK REORGANIZATION | 12 | 0.0005674 | 0.5745986 | 0.0070354 |
757 | PURINE RIBONUCLEOSIDE MONOPHOSPHATE BIOSYNTHESIS | 12 | 0.0007887 | 0.5595935 | 0.0091092 |
860 | RHOBTB3 ATPASE CYCLE | 10 | 0.0024461 | 0.5533125 | 0.0210319 |
1138 | TRANSPORT OF CONNEXONS TO THE PLASMA MEMBRANE | 13 | 0.0008358 | 0.5350840 | 0.0093770 |
92 | BBSOME MEDIATED CARGO TARGETING TO CILIUM | 23 | 0.0000093 | 0.5339324 | 0.0002804 |
154 | CITRIC ACID CYCLE TCA CYCLE | 22 | 0.0000249 | 0.5191590 | 0.0006362 |
655 | NUCLEOBASE BIOSYNTHESIS | 15 | 0.0006679 | 0.5073720 | 0.0080286 |
505 | KERATAN SULFATE BIOSYNTHESIS | 24 | 0.0000254 | 0.4965141 | 0.0006362 |
182 | COPI INDEPENDENT GOLGI TO ER RETROGRADE TRAFFIC | 44 | 0.0000000 | 0.4934192 | 0.0000012 |
180 | COOPERATION OF PREFOLDIN AND TRIC CCT IN ACTIN AND TUBULIN FOLDING | 26 | 0.0000252 | 0.4772786 | 0.0006362 |
435 | HSP90 CHAPERONE CYCLE FOR STEROID HORMONE RECEPTORS SHR | 48 | 0.0000000 | 0.4651436 | 0.0000017 |
507 | KERATAN SULFATE KERATIN METABOLISM | 30 | 0.0000146 | 0.4572199 | 0.0004093 |
110 | CALNEXIN CALRETICULIN CYCLE | 26 | 0.0000590 | 0.4550804 | 0.0011981 |
391 | GLYCOGEN STORAGE DISEASES | 12 | 0.0064361 | 0.4542551 | 0.0423560 |
371 | GAP JUNCTION ASSEMBLY | 21 | 0.0003136 | 0.4542533 | 0.0046181 |
284 | ENDOSOMAL VACUOLAR PATHWAY | 10 | 0.0131146 | -0.4530225 | 0.0680573 |
842 | RETROGRADE NEUROTROPHIN SIGNALLING | 13 | 0.0047720 | 0.4520357 | 0.0339274 |
392 | GLYCOGEN SYNTHESIS | 14 | 0.0036266 | 0.4490156 | 0.0273853 |
m4_l_top <- subset(mres4_l$enrichment_result,p.adjustANOVA<0.05)
m4_l_up <- subset(m4_l_top,s.dist>0)$set
m4_l_dn <- subset(m4_l_top,s.dist<0)$set
mitch_report(mres4_l,outfile="mitch4_l.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch4_l.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f251d945f.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres4_l$enrichment_result,file="mitch4_l.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m4_l_top_up <- head(subset(m4_l_top,s.dist>0),10)[,"s.dist"]
names(m4_l_top_up) <- head(subset(m4_l_top,s.dist>0),10)[,"set"]
m4_l_top_dn <- head(subset(m4_l_top,s.dist<0),10)[,"s.dist"]
names(m4_l_top_dn) <- head(subset(m4_l_top,s.dist<0),10)[,"set"]
m4_l_top_updn <- c(m4_l_top_up,m4_l_top_dn)
m4_l_top_updn <- m4_l_top_updn[order(m4_l_top_updn)]
par(mar=c(5,25,3,1))
barplot(m4_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in pag")
grid()
pdf("plot31_mitch4lps01.pdf")
par(mar=c(5,25,3,1))
barplot(m4_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in pag")
grid()
dev.off()
## png
## 2
Mitch for OVA in pag
m4_o <- mitch_import(dge4_o, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 17662
## Note: no. genes in output = 17643
## Note: estimated proportion of input genes in output = 0.999
mres4_o <- mitch_calc(m4_o, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres4_o$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in pag for OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
154 | CITRIC ACID CYCLE TCA CYCLE | 22 | 0.0000344 | 0.5101300 | 0.0009414 |
663 | OLFACTORY SIGNALING PATHWAY | 37 | 0.0000002 | -0.4988533 | 0.0000111 |
1046 | SYNTHESIS OF PIPS AT THE LATE ENDOSOME MEMBRANE | 11 | 0.0042029 | 0.4984326 | 0.0330071 |
47 | ALPHA LINOLENIC OMEGA3 AND LINOLEIC OMEGA6 ACID METABOLISM | 12 | 0.0030441 | 0.4940162 | 0.0257983 |
757 | PURINE RIBONUCLEOSIDE MONOPHOSPHATE BIOSYNTHESIS | 12 | 0.0036242 | 0.4849980 | 0.0296482 |
110 | CALNEXIN CALRETICULIN CYCLE | 26 | 0.0000235 | 0.4791045 | 0.0007681 |
293 | ER QUALITY CONTROL COMPARTMENT ERQC | 21 | 0.0001584 | 0.4761472 | 0.0029790 |
860 | RHOBTB3 ATPASE CYCLE | 10 | 0.0093581 | 0.4745761 | 0.0581562 |
104 | BRANCHED CHAIN AMINO ACID CATABOLISM | 21 | 0.0001919 | 0.4700888 | 0.0033738 |
1044 | SYNTHESIS OF PIPS AT THE EARLY ENDOSOME MEMBRANE | 16 | 0.0011404 | 0.4697623 | 0.0126734 |
448 | INHIBITION OF REPLICATION INITIATION OF DAMAGED DNA BY RB1 E2F1 | 13 | 0.0039807 | 0.4612679 | 0.0316839 |
74 | ASPARTATE AND ASPARAGINE METABOLISM | 10 | 0.0124659 | 0.4563149 | 0.0712853 |
539 | MET ACTIVATES RAP1 AND RAC1 | 10 | 0.0132563 | 0.4523224 | 0.0732017 |
92 | BBSOME MEDIATED CARGO TARGETING TO CILIUM | 23 | 0.0001746 | 0.4520604 | 0.0032145 |
842 | RETROGRADE NEUROTROPHIN SIGNALLING | 14 | 0.0048190 | 0.4351191 | 0.0363894 |
111 | CAMK IV MEDIATED PHOSPHORYLATION OF CREB | 10 | 0.0187158 | 0.4293767 | 0.0896227 |
907 | SCAVENGING OF HEME FROM PLASMA | 11 | 0.0144098 | -0.4260745 | 0.0761198 |
1051 | SYNTHESIS OF VERY LONG CHAIN FATTY ACYL COAS | 20 | 0.0009824 | 0.4256540 | 0.0114189 |
594 | N GLYCAN TRIMMING IN THE ER AND CALNEXIN CALRETICULIN CYCLE | 35 | 0.0000156 | 0.4219186 | 0.0005813 |
1073 | THE ROLE OF NEF IN HIV 1 REPLICATION AND DISEASE PATHOGENESIS | 27 | 0.0001879 | 0.4152328 | 0.0033543 |
m4_o_top <- subset(mres4_o$enrichment_result,p.adjustANOVA<0.05)
m4_o_up <- subset(m4_o_top,s.dist>0)$set
m4_o_dn <- subset(m4_o_top,s.dist<0)$set
mitch_report(mres4_o,outfile="mitch4_o.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch4_o.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f7db0b893.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres4_o$enrichment_result,file="mitch4_o.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m4_o_top_up <- head(subset(m4_o_top,s.dist>0),10)[,"s.dist"]
names(m4_o_top_up) <- head(subset(m4_o_top,s.dist>0),10)[,"set"]
m4_o_top_dn <- head(subset(m4_o_top,s.dist<0),10)[,"s.dist"]
names(m4_o_top_dn) <- head(subset(m4_o_top,s.dist<0),10)[,"set"]
m4_o_top_updn <- c(m4_o_top_up,m4_o_top_dn)
m4_o_top_updn <- m4_o_top_updn[order(m4_o_top_updn)]
par(mar=c(5,25,3,1))
barplot(m4_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in pag")
grid()
pdf("plot32_mitch4ova01.pdf")
par(mar=c(5,25,3,1))
barplot(m4_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in pag")
grid()
dev.off()
## png
## 2
Mitch 4 euler.
m4_l_up <- subset(m4_l_top,s.dist>0)$set
m4_l_dn <- subset(m4_l_top,s.dist<0)$set
m4_o_up <- subset(m4_o_top,s.dist>0)$set
m4_o_dn <- subset(m4_o_top,s.dist<0)$set
par(mar=c(2,2,2,2))
v0 <- list("LPS up"=m4_l_up,
"LPS dn"=m4_l_dn,
"OVA up"=m4_o_up,
"OVA dn"=m4_o_dn)
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on pag")
pdf("plot33_mitch4lpsovaeuler01.pdf")
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on pag")
dev.off()
## png
## 2
Two dimensional mitch analysis in pag.
ml <- list("LPS"=dge4_l,"OVA"=dge4_o)
m4 <- mitch_import(ml, DEtype="deseq2",geneTable=gt)
## Note: Mean no. genes in input = 17637
## Note: no. genes in output = 17476
## Note: estimated proportion of input genes in output = 0.991
head(m4)
## LPS OVA
## 0610009B22Rik 0.02592933 0.45655760
## 0610009E02Rik 0.75195906 -0.40699076
## 0610009L18Rik -1.06444668 -0.18691102
## 0610010K14Rik 0.44760852 -0.37114848
## 0610012G03Rik -0.16331991 -0.34216334
## 0610030E20Rik -0.62496606 0.08425395
mres4 <- mitch_calc(m4, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres4$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in pag for LPS and OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.LPS | s.OVA | p.LPS | p.OVA | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|
47 | ALPHA LINOLENIC OMEGA3 AND LINOLEIC OMEGA6 ACID METABOLISM | 12 | 0.0009579 | 0.6080031 | 0.4942358 | 0.0002651 | 0.0030312 | 0.7835412 | 0.0804457 | 0.0082298 |
340 | FORMATION OF TUBULIN FOLDING INTERMEDIATES BY CCT TRIC | 19 | 0.0000002 | 0.7072506 | 0.3203511 | 0.0000001 | 0.0156356 | 0.7764201 | 0.2735793 | 0.0000099 |
756 | PURINE RIBONUCLEOSIDE MONOPHOSPHATE BIOSYNTHESIS | 12 | 0.0022717 | 0.5594175 | 0.4855417 | 0.0007918 | 0.0035867 | 0.7407419 | 0.0522381 | 0.0150215 |
859 | RHOBTB3 ATPASE CYCLE | 10 | 0.0072411 | 0.5531891 | 0.4747853 | 0.0024516 | 0.0093271 | 0.7289988 | 0.0554398 | 0.0334224 |
154 | CITRIC ACID CYCLE TCA CYCLE | 22 | 0.0000254 | 0.5190162 | 0.5105316 | 0.0000250 | 0.0000339 | 0.7280250 | 0.0059995 | 0.0004815 |
92 | BBSOME MEDIATED CARGO TARGETING TO CILIUM | 23 | 0.0000282 | 0.5338437 | 0.4524026 | 0.0000093 | 0.0001727 | 0.6997551 | 0.0575875 | 0.0005266 |
663 | OLFACTORY SIGNALING PATHWAY | 37 | 0.0000001 | -0.4715882 | -0.4983874 | 0.0000007 | 0.0000002 | 0.6861381 | 0.0189499 | 0.0000060 |
110 | CALNEXIN CALRETICULIN CYCLE | 26 | 0.0000326 | 0.4550584 | 0.4794578 | 0.0000590 | 0.0000232 | 0.6610279 | 0.0172530 | 0.0005901 |
398 | GOLGI CISTERNAE PERICENTRIOLAR STACK REORGANIZATION | 12 | 0.0021591 | 0.5745629 | 0.2948255 | 0.0005678 | 0.0770110 | 0.6457899 | 0.1978042 | 0.0145958 |
654 | NUCLEOBASE BIOSYNTHESIS | 15 | 0.0027443 | 0.5072371 | 0.3844721 | 0.0006701 | 0.0099354 | 0.6364811 | 0.0868080 | 0.0171813 |
841 | RETROGRADE NEUROTROPHIN SIGNALLING | 13 | 0.0103429 | 0.4520371 | 0.4265678 | 0.0047719 | 0.0077447 | 0.6215284 | 0.0180095 | 0.0442675 |
594 | N GLYCAN TRIMMING IN THE ER AND CALNEXIN CALRETICULIN CYCLE | 35 | 0.0000130 | 0.4196368 | 0.4223136 | 0.0000174 | 0.0000153 | 0.5953519 | 0.0018928 | 0.0002894 |
104 | BRANCHED CHAIN AMINO ACID CATABOLISM | 21 | 0.0008168 | 0.3588684 | 0.4703005 | 0.0044155 | 0.0001906 | 0.5915818 | 0.0787944 | 0.0073952 |
293 | ER QUALITY CONTROL COMPARTMENT ERQC | 21 | 0.0007289 | 0.3487853 | 0.4764660 | 0.0056603 | 0.0001568 | 0.5904837 | 0.0902839 | 0.0068629 |
1050 | SYNTHESIS OF VERY LONG CHAIN FATTY ACYL COAS | 20 | 0.0020671 | 0.3971127 | 0.4259681 | 0.0021089 | 0.0009740 | 0.5823636 | 0.0204039 | 0.0142278 |
516 | LDL CLEARANCE | 16 | 0.0078213 | 0.4371707 | 0.3651203 | 0.0024650 | 0.0114545 | 0.5695885 | 0.0509473 | 0.0351361 |
182 | COPI INDEPENDENT GOLGI TO ER RETROGRADE TRAFFIC | 44 | 0.0000001 | 0.4933899 | 0.2799684 | 0.0000000 | 0.0013145 | 0.5672882 | 0.1509118 | 0.0000045 |
395 | GLYCOSPHINGOLIPID METABOLISM | 38 | 0.0000157 | 0.4065562 | 0.3944501 | 0.0000144 | 0.0000258 | 0.5664617 | 0.0085603 | 0.0003239 |
776 | RECEPTOR MEDIATED MITOPHAGY | 11 | 0.0428258 | 0.4239180 | 0.3571663 | 0.0149128 | 0.0402577 | 0.5543232 | 0.0472006 | 0.1263308 |
1048 | SYNTHESIS OF PYROPHOSPHATES IN THE CYTOSOL | 10 | 0.0622736 | 0.4137753 | 0.3593954 | 0.0234700 | 0.0490802 | 0.5480648 | 0.0384524 | 0.1611850 |
m4_top <- subset(mres4$enrichment_result,p.adjustMANOVA<0.05)
m4_up <- subset(m4_top,s.dist>0)$set
m4_dn <- subset(m4_top,s.dist<0)$set
mitch_report(mres4,outfile="mitch4.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch4.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f17a53876.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres4$enrichment_result,file="mitch4.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m4_top_up <- head(subset(m4_top,s.dist>0),10)[,"s.dist"]
names(m4_top_up) <- head(subset(m4_top,s.dist>0),10)[,"set"]
m4_top_dn <- head(subset(m4_top,s.dist<0),10)[,"s.dist"]
names(m4_top_dn) <- head(subset(m4_top,s.dist<0),10)[,"set"]
m4_top_updn <- c(m4_top_up,m4_top_dn)
m4_top_updn <- m4_top_updn[order(m4_top_updn)]
# heatmap
mr4 <- head(subset(mres4$enrichment_result,p.adjustMANOVA<0.05),30)
mr4 <- as.matrix(mr4[,4:5])
rownames(mr4) <- head(mres4$enrichment_result,30)$set
colfunc <- colorRampPalette(c("blue", "white", "red"))
heatmap.2(mr4,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in pag" , cexCol=0.9 )
pdf("plot34_mitch4_heatmap01.pdf")
heatmap.2(mr4,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in pag" , cexCol=0.9 )
dev.off()
## png
## 2
Need to make a scatterplot to highlight the following:
par(mar=c(4,4,2,1))
a <- mres4$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
pdf("plot34b_mitch4_scatter01.pdf")
a <- mres4$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
dev.off()
## png
## 2
Mitch for LPS in NI
m5_l <- mitch_import(dge5_l, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 17490
## Note: no. genes in output = 17472
## Note: estimated proportion of input genes in output = 0.999
mres5_l <- mitch_calc(m5_l, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres5_l$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in NI for LPS") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
299 | ERYTHROCYTES TAKE UP CARBON DIOXIDE AND RELEASE OXYGEN | 10 | 0.0001407 | -0.6951552 | 0.0015359 |
35 | ADENYLATE CYCLASE ACTIVATING PATHWAY | 10 | 0.0001947 | 0.6803459 | 0.0020313 |
817 | REGULATION OF RUNX1 EXPRESSION AND ACTIVITY | 17 | 0.0000632 | 0.5603889 | 0.0008095 |
283 | ENDOSOMAL VACUOLAR PATHWAY | 10 | 0.0038803 | -0.5273508 | 0.0255581 |
1106 | TRAFFICKING AND PROCESSING OF ENDOSOMAL TLR | 11 | 0.0028272 | -0.5199171 | 0.0197237 |
461 | INTERACTION BETWEEN L1 AND ANKYRINS | 27 | 0.0000043 | 0.5107162 | 0.0000855 |
843 | RETINOID CYCLE DISEASE EVENTS | 10 | 0.0073851 | -0.4892338 | 0.0422035 |
1035 | SYNTHESIS OF ACTIVE UBIQUITIN ROLES OF E1 AND E2 ENZYMES | 29 | 0.0000064 | -0.4841167 | 0.0001126 |
518 | LGI ADAM INTERACTIONS | 14 | 0.0027720 | 0.4618268 | 0.0195215 |
1176 | YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION | 11 | 0.0099686 | 0.4487143 | 0.0536666 |
158 | CLASS I PEROXISOMAL MEMBRANE PROTEIN IMPORT | 20 | 0.0005164 | -0.4484586 | 0.0048234 |
679 | P75NTR REGULATES AXONOGENESIS | 10 | 0.0152119 | -0.4432826 | 0.0735034 |
1069 | THE CANONICAL RETINOID CYCLE IN RODS TWILIGHT VISION | 15 | 0.0031787 | -0.4399114 | 0.0214155 |
736 | PRESYNAPTIC DEPOLARIZATION AND CALCIUM CHANNEL OPENING | 11 | 0.0115521 | 0.4397697 | 0.0605330 |
216 | DEFECTIVE B4GALT7 CAUSES EDS PROGEROID TYPE | 20 | 0.0011263 | 0.4206738 | 0.0092214 |
124 | CD28 DEPENDENT VAV1 PATHWAY | 11 | 0.0175092 | -0.4137064 | 0.0816905 |
893 | RORA ACTIVATES GENE EXPRESSION | 18 | 0.0025822 | 0.4102784 | 0.0185634 |
571 | MITOCHONDRIAL TRANSLATION | 93 | 0.0000000 | -0.4058817 | 0.0000000 |
778 | RECEPTOR MEDIATED MITOPHAGY | 11 | 0.0200369 | -0.4049700 | 0.0888100 |
187 | CRISTAE FORMATION | 31 | 0.0001043 | -0.4026793 | 0.0012295 |
m5_l_top <- subset(mres5_l$enrichment_result,p.adjustANOVA<0.05)
m5_l_up <- subset(m5_l_top,s.dist>0)$set
m5_l_dn <- subset(m5_l_top,s.dist<0)$set
mitch_report(mres5_l,outfile="mitch5_l.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch5_l.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f720a75b3.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres5_l$enrichment_result,file="mitch5_l.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m5_l_top_up <- head(subset(m5_l_top,s.dist>0),10)[,"s.dist"]
names(m5_l_top_up) <- head(subset(m5_l_top,s.dist>0),10)[,"set"]
m5_l_top_dn <- head(subset(m5_l_top,s.dist<0),10)[,"s.dist"]
names(m5_l_top_dn) <- head(subset(m5_l_top,s.dist<0),10)[,"set"]
m5_l_top_updn <- c(m5_l_top_up,m5_l_top_dn)
m5_l_top_updn <- m5_l_top_updn[order(m5_l_top_updn)]
par(mar=c(5,25,3,1))
barplot(m5_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in NI")
grid()
pdf("plot35_mitch5lps01.pdf")
par(mar=c(5,25,3,1))
barplot(m5_l_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in NI")
grid()
dev.off()
## png
## 2
Mitch for OVA in NI
m5_o <- mitch_import(dge5_o, DEtype="deseq2",geneTable=gt)
## The input is a single dataframe; one contrast only. Converting
## it to a list for you.
## Note: Mean no. genes in input = 17391
## Note: no. genes in output = 17372
## Note: estimated proportion of input genes in output = 0.999
mres5_o <- mitch_calc(m5_o, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres5_o$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in NI for OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pANOVA | s.dist | p.adjustANOVA | |
---|---|---|---|---|---|
818 | REGULATION OF RUNX1 EXPRESSION AND ACTIVITY | 17 | 0.0000127 | 0.6113207 | 0.0005565 |
299 | ERYTHROCYTES TAKE UP CARBON DIOXIDE AND RELEASE OXYGEN | 10 | 0.0019843 | -0.5647506 | 0.0220701 |
638 | NOTCH2 INTRACELLULAR DOMAIN REGULATES TRANSCRIPTION | 11 | 0.0039672 | 0.5016102 | 0.0377207 |
1106 | TRAFFICKING AND PROCESSING OF ENDOSOMAL TLR | 11 | 0.0046990 | -0.4922475 | 0.0428705 |
36 | ADENYLATE CYCLASE ACTIVATING PATHWAY | 10 | 0.0079378 | 0.4848059 | 0.0623909 |
642 | NOTCH4 INTRACELLULAR DOMAIN REGULATES TRANSCRIPTION | 20 | 0.0002383 | 0.4745908 | 0.0050174 |
10 | ACETYLCHOLINE REGULATES INSULIN SECRETION | 10 | 0.0095632 | 0.4732174 | 0.0711974 |
1 | A TETRASACCHARIDE LINKER SEQUENCE IS REQUIRED FOR GAG SYNTHESIS | 26 | 0.0000690 | 0.4508865 | 0.0020855 |
904 | RUNX3 REGULATES NOTCH SIGNALING | 13 | 0.0048864 | 0.4508191 | 0.0439775 |
216 | DEFECTIVE B4GALT7 CAUSES EDS PROGEROID TYPE | 20 | 0.0005612 | 0.4455682 | 0.0089938 |
635 | NOTCH HLH TRANSCRIPTION PATHWAY | 28 | 0.0000501 | 0.4427138 | 0.0016424 |
792 | REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO | 10 | 0.0170031 | 0.4358599 | 0.1022237 |
640 | NOTCH3 INTRACELLULAR DOMAIN REGULATES TRANSCRIPTION | 23 | 0.0003471 | 0.4308957 | 0.0064455 |
571 | MITOCHONDRIAL TRANSLATION | 93 | 0.0000000 | -0.4303484 | 0.0000000 |
1036 | SYNTHESIS OF ACTIVE UBIQUITIN ROLES OF E1 AND E2 ENZYMES | 29 | 0.0000619 | -0.4297371 | 0.0019192 |
679 | P75NTR REGULATES AXONOGENESIS | 10 | 0.0196043 | -0.4262182 | 0.1127487 |
1126 | TRANSCRIPTIONAL REGULATION OF PLURIPOTENT STEM CELLS | 19 | 0.0013333 | 0.4252048 | 0.0165469 |
1176 | YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION | 12 | 0.0141040 | 0.4092358 | 0.0916410 |
188 | CRISTAE FORMATION | 31 | 0.0000821 | -0.4086846 | 0.0023120 |
798 | REGULATION OF GENE EXPRESSION IN LATE STAGE BRANCHING MORPHOGENESIS PANCREATIC BUD PRECURSOR CELLS | 15 | 0.0062783 | 0.4075551 | 0.0532530 |
m5_o_top <- subset(mres5_o$enrichment_result,p.adjustANOVA<0.05)
m5_o_up <- subset(m5_o_top,s.dist>0)$set
m5_o_dn <- subset(m5_o_top,s.dist<0)$set
mitch_report(mres5_o,outfile="mitch5_o.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch5_o.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f677b2f2a.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres5_o$enrichment_result,file="mitch5_o.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m5_o_top_up <- head(subset(m5_o_top,s.dist>0),10)[,"s.dist"]
names(m5_o_top_up) <- head(subset(m5_o_top,s.dist>0),10)[,"set"]
m5_o_top_dn <- head(subset(m5_o_top,s.dist<0),10)[,"s.dist"]
names(m5_o_top_dn) <- head(subset(m5_o_top,s.dist<0),10)[,"set"]
m5_o_top_updn <- c(m5_o_top_up,m5_o_top_dn)
m5_o_top_updn <- m5_o_top_updn[order(m5_o_top_updn)]
par(mar=c(5,25,3,1))
barplot(m5_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in NI")
grid()
pdf("plot36_mitch5ova01.pdf")
par(mar=c(5,25,3,1))
barplot(m5_o_top_updn,horiz=TRUE,las=1,col="darkgray",
xlab="Enrichment score",cex.names=0.8,xlim=c(-1,1),
main="Effect of LPS in NI")
grid()
dev.off()
## png
## 2
Mitch 5 euler.
m5_l_up <- subset(m5_l_top,s.dist>0)$set
m5_l_dn <- subset(m5_l_top,s.dist<0)$set
m5_o_up <- subset(m5_o_top,s.dist>0)$set
m5_o_dn <- subset(m5_o_top,s.dist<0)$set
par(mar=c(2,2,2,2))
v0 <- list("LPS up"=m5_l_up,
"LPS dn"=m5_l_dn,
"OVA up"=m5_o_up,
"OVA dn"=m5_o_dn)
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on NI")
pdf("plot37_mitch5lpsovaeuler01.pdf")
plot(euler(v0),quantities = TRUE, edges = "gray", main="effect of treatments on NI")
dev.off()
## png
## 2
Two dimensional mitch analysis in NI.
ml <- list("LPS"=dge5_l,"OVA"=dge5_o)
m5 <- mitch_import(ml, DEtype="deseq2",geneTable=gt)
## Note: Mean no. genes in input = 17440.5
## Note: no. genes in output = 17243
## Note: estimated proportion of input genes in output = 0.989
head(m5)
## LPS OVA
## 0610009B22Rik -2.3583781 -1.1332185
## 0610009E02Rik -0.4921631 -0.3290659
## 0610009L18Rik -1.5061599 0.1306738
## 0610010K14Rik -0.7608005 -0.3126674
## 0610012G03Rik -0.6314820 -0.2034285
## 0610030E20Rik 1.2199694 -0.5747514
mres5 <- mitch_calc(m5, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres5$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in NI for LPS and OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.LPS | s.OVA | p.LPS | p.OVA | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|
298 | ERYTHROCYTES TAKE UP CARBON DIOXIDE AND RELEASE OXYGEN | 10 | 0.0006928 | -0.6918354 | -0.5629548 | 0.0001514 | 0.0020511 | 0.8919385 | 0.0911324 | 0.0056088 |
35 | ADENYLATE CYCLASE ACTIVATING PATHWAY | 10 | 0.0008887 | 0.6840829 | 0.4861603 | 0.0001795 | 0.0077651 | 0.8392385 | 0.1399524 | 0.0066143 |
815 | REGULATION OF RUNX1 EXPRESSION AND ACTIVITY | 17 | 0.0000342 | 0.5642497 | 0.6124736 | 0.0000562 | 0.0000123 | 0.8327674 | 0.0340995 | 0.0005431 |
1103 | TRAFFICKING AND PROCESSING OF ENDOSOMAL TLR | 11 | 0.0080603 | -0.5150566 | -0.4899236 | 0.0030965 | 0.0048987 | 0.7108505 | 0.0177717 | 0.0365981 |
1173 | YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION | 11 | 0.0135627 | 0.4521609 | 0.4931839 | 0.0094123 | 0.0046208 | 0.6690888 | 0.0290077 | 0.0544359 |
1033 | SYNTHESIS OF ACTIVE UBIQUITIN ROLES OF E1 AND E2 ENZYMES | 29 | 0.0000263 | -0.4799341 | -0.4281359 | 0.0000077 | 0.0000659 | 0.6431463 | 0.0366269 | 0.0004614 |
460 | INTERACTION BETWEEN L1 AND ANKYRINS | 27 | 0.0000215 | 0.5151496 | 0.3662958 | 0.0000036 | 0.0009865 | 0.6321010 | 0.1052555 | 0.0003885 |
215 | DEFECTIVE B4GALT7 CAUSES EDS PROGEROID TYPE | 20 | 0.0013479 | 0.4258317 | 0.4471172 | 0.0009778 | 0.0005368 | 0.6174516 | 0.0150511 | 0.0093242 |
677 | P75NTR REGULATES AXONOGENESIS | 10 | 0.0397101 | -0.4389021 | -0.4243254 | 0.0162480 | 0.0201542 | 0.6104811 | 0.0103073 | 0.1248638 |
1 | A TETRASACCHARIDE LINKER SEQUENCE IS REQUIRED FOR GAG SYNTHESIS | 26 | 0.0002815 | 0.3811751 | 0.4524374 | 0.0007676 | 0.0000651 | 0.5916030 | 0.0503901 | 0.0028538 |
569 | MITOCHONDRIAL TRANSLATION | 93 | 0.0000000 | -0.4003173 | -0.4279645 | 0.0000000 | 0.0000000 | 0.5860098 | 0.0195496 | 0.0000000 |
517 | LGI ADAM INTERACTIONS | 14 | 0.0104790 | 0.4659171 | 0.3503810 | 0.0025408 | 0.0232190 | 0.5829628 | 0.0816964 | 0.0446497 |
633 | NOTCH HLH TRANSCRIPTION PATHWAY | 28 | 0.0002299 | 0.3609269 | 0.4439608 | 0.0009479 | 0.0000478 | 0.5721621 | 0.0587138 | 0.0024806 |
187 | CRISTAE FORMATION | 31 | 0.0001748 | -0.3971760 | -0.4064756 | 0.0001295 | 0.0000897 | 0.5683056 | 0.0065758 | 0.0019958 |
965 | SIGNALING BY LEPTIN | 10 | 0.0615199 | 0.4013811 | 0.4019033 | 0.0279625 | 0.0277593 | 0.5680080 | 0.0003693 | 0.1690359 |
339 | FORMATION OF TUBULIN FOLDING INTERMEDIATES BY CCT TRIC | 19 | 0.0059738 | -0.3915467 | -0.3981348 | 0.0031303 | 0.0026613 | 0.5584086 | 0.0046585 | 0.0292814 |
158 | CLASS I PEROXISOMAL MEMBRANE PROTEIN IMPORT | 20 | 0.0027202 | -0.4438774 | -0.3317250 | 0.0005891 | 0.0102258 | 0.5541377 | 0.0793037 | 0.0164895 |
901 | RUNX3 REGULATES NOTCH SIGNALING | 13 | 0.0183734 | 0.3160230 | 0.4522613 | 0.0485198 | 0.0047513 | 0.5517344 | 0.0963350 | 0.0703814 |
640 | NOTCH4 INTRACELLULAR DOMAIN REGULATES TRANSCRIPTION | 20 | 0.0006859 | 0.2624862 | 0.4759740 | 0.0421532 | 0.0002285 | 0.5435534 | 0.1509587 | 0.0056018 |
636 | NOTCH2 INTRACELLULAR DOMAIN REGULATES TRANSCRIPTION | 11 | 0.0058700 | 0.2054634 | 0.5030704 | 0.2380562 | 0.0038630 | 0.5434106 | 0.2104399 | 0.0290049 |
m5_top <- subset(mres5$enrichment_result,p.adjustMANOVA<0.05)
m5_up <- subset(m5_top,s.dist>0)$set
m5_dn <- subset(m5_top,s.dist<0)$set
mitch_report(mres5,outfile="mitch5.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch5.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f99f2047.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres5$enrichment_result,file="mitch5.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m5_top_up <- head(subset(m5_top,s.dist>0),10)[,"s.dist"]
names(m5_top_up) <- head(subset(m5_top,s.dist>0),10)[,"set"]
m5_top_dn <- head(subset(m5_top,s.dist<0),10)[,"s.dist"]
names(m5_top_dn) <- head(subset(m5_top,s.dist<0),10)[,"set"]
m5_top_updn <- c(m5_top_up,m5_top_dn)
m5_top_updn <- m5_top_updn[order(m5_top_updn)]
# heatmap
mr5 <- head(subset(mres5$enrichment_result,p.adjustMANOVA<0.05),30)
mr5 <- as.matrix(mr5[,4:5])
rownames(mr5) <- head(mres5$enrichment_result,30)$set
colfunc <- colorRampPalette(c("blue", "white", "red"))
heatmap.2(mr5,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in NI" , cexCol=0.9 )
pdf("plot37_mitch5_heatmap01.pdf")
heatmap.2(mr5,trace="none",col=colfunc(25),scale="none", margins = c(10,28), cexRow=0.7,
main="Top ranked pathways in NI" , cexCol=0.9 )
dev.off()
## png
## 2
Need to make a scatterplot to highlight the following:
par(mar=c(4,4,2,1))
a <- mres5$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
pdf("plot37b_mitch5_scatter01.pdf")
a <- mres5$enrichment_result
plot(a$s.LPS , a$s.OVA,pch=19,col="gray")
abline(h=0,lty=2)
abline(v=0,lty=2)
as <- subset(a,p.adjustMANOVA<0.05)
points(as$s.LPS , as$s.OVA,pch=19,col="red")
abline(h=0.2,lty=2,col="red")
abline(v=0.2,lty=2,col="red")
abline(h=-0.2,lty=2,col="red")
abline(v=-0.2,lty=2,col="red")
mysets <- c("SEROTONIN NEUROTRANSMITTER RELEASE CYCLE",
"CLASS C 3 METABOTROPIC GLUTAMATE PHEROMONE RECEPTORS",
"REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO",
"REDUCTION OF CYTOSOLIC CA LEVELS",
"YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION",
"ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S",
"REGULATION OF EXPRESSION OF SLITS AND ROBOS")
a2 <- a[which(a$set %in% mysets),]
points(a2$s.LPS , a2$s.OVA+0.025,pch=25,col="red")
dev.off()
## png
## 2
ml <- list("hyp"=dge1_l,
"amy"=dge2_l,
"hip"=dge3_l,
"pag"=dge4_l,
"ni"=dge5_l)
m6 <- mitch_import(ml, DEtype="deseq2",geneTable=gt)
## Note: Mean no. genes in input = 17188.4
## Note: no. genes in output = 15915
## Note: estimated proportion of input genes in output = 0.926
head(m6)
## hyp amy hip pag ni
## 0610009B22Rik -0.3304181 0.2684894 -3.3814425 0.02592933 -2.3583781
## 0610009E02Rik 0.7596333 -0.7521235 -0.3557659 0.75195906 -0.4921631
## 0610009L18Rik -1.2521412 -1.1838923 -0.8507498 -1.06444668 -1.5061599
## 0610010K14Rik 0.4193627 -0.0433030 1.2510787 0.44760852 -0.7608005
## 0610012G03Rik 1.4462155 -0.1930476 3.9729326 -0.16331991 -0.6314820
## 0610030E20Rik -0.2426628 1.0496464 0.1581737 -0.62496606 1.2199694
mres6 <- mitch_calc(m6, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres6$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in all tissues caused by LPS") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.hyp | s.amy | s.hip | s.pag | s.ni | p.hyp | p.amy | p.hip | p.pag | p.ni | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
332 | FORMATION OF TUBULIN FOLDING INTERMEDIATES BY CCT TRIC | 19 | 0.0000000 | 0.5822782 | 0.1560472 | 0.1543718 | 0.6954017 | -0.3830159 | 0.0000111 | 0.2390518 | 0.2441327 | 0.0000002 | 0.0038508 | 1.0087190 | 0.4263417 | 0.0000000 |
1118 | TRANSPORT OF CONNEXONS TO THE PLASMA MEMBRANE | 13 | 0.0000173 | 0.5932684 | 0.3166027 | 0.4487196 | 0.5229724 | -0.1371864 | 0.0002123 | 0.0481161 | 0.0050908 | 0.0010950 | 0.3918199 | 0.9725606 | 0.2903895 | 0.0001283 |
713 | POST CHAPERONIN TUBULIN FOLDING PATHWAY | 17 | 0.0000011 | 0.6303420 | 0.3164734 | 0.5029341 | 0.3588835 | -0.0844797 | 0.0000068 | 0.0238916 | 0.0003304 | 0.0104181 | 0.5465488 | 0.9414687 | 0.2701030 | 0.0000104 |
33 | ADENYLATE CYCLASE ACTIVATING PATHWAY | 10 | 0.0001919 | -0.0883999 | 0.2081232 | 0.4566237 | 0.1617479 | 0.6784785 | 0.6283875 | 0.2544891 | 0.0124090 | 0.3758371 | 0.0002028 | 0.8637884 | 0.2935960 | 0.0011038 |
187 | CROSSLINKING OF COLLAGEN FIBRILS | 13 | 0.0177579 | 0.3350715 | 0.4012945 | 0.5670985 | 0.0343934 | 0.3111268 | 0.0364702 | 0.0122413 | 0.0003994 | 0.8300153 | 0.0521183 | 0.8324023 | 0.1930438 | 0.0515781 |
529 | MET ACTIVATES RAP1 AND RAC1 | 10 | 0.0644943 | -0.3635586 | -0.5403458 | -0.3609305 | 0.1324992 | -0.3217227 | 0.0465211 | 0.0030880 | 0.0481273 | 0.4681766 | 0.0781467 | 0.8218764 | 0.2513084 | 0.1390960 |
894 | SEALING OF THE NUCLEAR ENVELOPE NE BY ESCRT III | 23 | 0.0000005 | 0.5135808 | 0.2584401 | 0.3150505 | 0.4227394 | -0.1673087 | 0.0000201 | 0.0319369 | 0.0089178 | 0.0004491 | 0.1649244 | 0.7978183 | 0.2627031 | 0.0000052 |
121 | CD28 DEPENDENT VAV1 PATHWAY | 11 | 0.0259587 | -0.1266234 | -0.3169586 | -0.4383688 | 0.3942290 | -0.3995679 | 0.4671687 | 0.0687421 | 0.0118218 | 0.0235806 | 0.0217584 | 0.7897686 | 0.3414227 | 0.0689846 |
197 | CYTOSOLIC IRON SULFUR CLUSTER ASSEMBLY | 13 | 0.0137116 | 0.3881757 | 0.4365392 | 0.4570591 | -0.1598735 | 0.1895649 | 0.0153845 | 0.0064267 | 0.0043267 | 0.3183090 | 0.2366974 | 0.7820769 | 0.2586774 | 0.0419327 |
23 | ACTIVATION OF RAC1 | 13 | 0.0213128 | -0.2225555 | -0.5009723 | -0.3742248 | 0.2292019 | -0.2882173 | 0.1647648 | 0.0017628 | 0.0194863 | 0.1525120 | 0.0719979 | 0.7590462 | 0.2777268 | 0.0596552 |
183 | CREB1 PHOSPHORYLATION THROUGH THE ACTIVATION OF ADENYLATE CYCLASE | 11 | 0.0165125 | -0.3768635 | -0.4367798 | -0.3853119 | 0.2699378 | -0.1380785 | 0.0304523 | 0.0121316 | 0.0269197 | 0.1211234 | 0.4278525 | 0.7570997 | 0.2938798 | 0.0488194 |
362 | GAP JUNCTION ASSEMBLY | 21 | 0.0000217 | 0.4383385 | 0.2261051 | 0.3194856 | 0.4386022 | -0.1332099 | 0.0005065 | 0.0729060 | 0.0112697 | 0.0005026 | 0.2907131 | 0.7452865 | 0.2361048 | 0.0001555 |
1017 | SYNTHESIS OF ACTIVE UBIQUITIN ROLES OF E1 AND E2 ENZYMES | 29 | 0.0000107 | -0.0486831 | -0.2218088 | -0.4020673 | 0.3228694 | -0.4739632 | 0.6500898 | 0.0387355 | 0.0001787 | 0.0026213 | 0.0000100 | 0.7362833 | 0.3187602 | 0.0000844 |
176 | COOPERATION OF PREFOLDIN AND TRIC CCT IN ACTIN AND TUBULIN FOLDING | 26 | 0.0000000 | 0.3865277 | 0.1647439 | 0.0234076 | 0.4606525 | -0.3841797 | 0.0006466 | 0.1460230 | 0.8363651 | 0.0000479 | 0.0006975 | 0.7327256 | 0.3361871 | 0.0000003 |
44 | ALPHA LINOLENIC OMEGA3 AND LINOLEIC OMEGA6 ACID METABOLISM | 12 | 0.0022542 | 0.1522040 | 0.3666185 | 0.0550630 | 0.5903813 | 0.0983462 | 0.3613373 | 0.0278868 | 0.7412277 | 0.0003981 | 0.5553169 | 0.7202979 | 0.2236017 | 0.0092404 |
139 | CGMP EFFECTS | 15 | 0.0037150 | -0.5594549 | -0.3014927 | -0.2268679 | -0.2409392 | 0.0179958 | 0.0001756 | 0.0432289 | 0.1282361 | 0.1062140 | 0.9039657 | 0.7167512 | 0.2062247 | 0.0142203 |
772 | REDUCTION OF CYTOSOLIC CA LEVELS | 11 | 0.0185558 | -0.5540287 | -0.3044288 | -0.1996296 | -0.2657079 | 0.0577099 | 0.0014636 | 0.0804376 | 0.2516620 | 0.1270637 | 0.7403589 | 0.7165248 | 0.2195527 | 0.0531030 |
1036 | SYNTHESIS SECRETION AND INACTIVATION OF GLUCAGON LIKE PEPTIDE 1 GLP 1 | 12 | 0.0194825 | -0.1096124 | -0.1519105 | -0.5265254 | 0.0254355 | -0.4450104 | 0.5109369 | 0.3622638 | 0.0015874 | 0.8787585 | 0.0076045 | 0.7148440 | 0.2341640 | 0.0553359 |
680 | PHASE 2 PLATEAU PHASE | 10 | 0.1069460 | 0.1580509 | 0.1611443 | 0.3951713 | -0.1846589 | 0.5064948 | 0.3868463 | 0.3776212 | 0.0304834 | 0.3119985 | 0.0055468 | 0.7055097 | 0.2659891 | 0.1984424 |
725 | PROCESSING AND ACTIVATION OF SUMO | 10 | 0.0315656 | 0.0187111 | -0.2962087 | -0.4767180 | 0.2294499 | -0.3573342 | 0.9184037 | 0.1048393 | 0.0090451 | 0.2090122 | 0.0504005 | 0.7040488 | 0.2915753 | 0.0796721 |
m6_top <- subset(mres6$enrichment_result,p.adjustMANOVA<0.05)
m6_up <- subset(m6_top,s.dist>0)$set
m6_dn <- subset(m6_top,s.dist<0)$set
mitch_report(mres6,outfile="mitch6.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch6.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f44fa7b36.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres6$enrichment_result,file="mitch6.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m6_top_up <- head(subset(m6_top,s.dist>0),10)[,"s.dist"]
names(m6_top_up) <- head(subset(m6_top,s.dist>0),10)[,"set"]
m6_top_dn <- head(subset(m6_top,s.dist<0),10)[,"s.dist"]
names(m6_top_dn) <- head(subset(m6_top,s.dist<0),10)[,"set"]
m6_top_updn <- c(m6_top_up,m6_top_dn)
m6_top_updn <- m6_top_updn[order(m6_top_updn)]
# heatmap
mr6 <- head(subset(mres6$enrichment_result,p.adjustMANOVA<0.05),30)
mr6 <- as.matrix(mr6[,4:8])
rownames(mr6) <- head(mres6$enrichment_result,30)$set
colfunc <- colorRampPalette(c("blue", "white", "red"))
heatmap.2(mr6,trace="none",col=colfunc(25),scale="none", margins = c(10,21), cexRow=0.7,
main="Top ranked pathways LPS all tissues" , cexCol=0.9 )
pdf("plot38_mitch6_heatmap01.pdf")
heatmap.2(mr6,trace="none",col=colfunc(25),scale="none", margins = c(10,21), cexRow=0.7,
main="Top ranked pathways LPS all tissues" , cexCol=0.9 )
dev.off()
## png
## 2
ml <- list("hyp"=dge1_o,
"amy"=dge2_o,
"hip"=dge3_o,
"pag"=dge4_o,
"ni"=dge5_o)
m7 <- mitch_import(ml, DEtype="deseq2",geneTable=gt)
## Note: Mean no. genes in input = 17148.8
## Note: no. genes in output = 15857
## Note: estimated proportion of input genes in output = 0.925
head(m7)
## hyp amy hip pag ni
## 0610009B22Rik 0.09722066 1.831236577 -2.2697336 0.45655760 -1.1332185
## 0610009E02Rik 1.26326253 -0.103702849 -0.3519839 -0.40699076 -0.3290659
## 0610009L18Rik -0.66374969 -0.075637695 -0.9139963 -0.18691102 0.1306738
## 0610010K14Rik -0.45368981 0.417670579 -0.1751685 -0.37114848 -0.3126674
## 0610012G03Rik 0.12236243 0.008709563 0.5678859 -0.34216334 -0.2034285
## 0610030E20Rik -0.04562294 -1.609523779 1.4359134 0.08425395 -0.5747514
mres7 <- mitch_calc(m7, genesets, priority="effect")
## Note: Enrichments with large effect sizes may not be
## statistically significant.
head(mres7$enrichment_result,20) %>%
kbl(caption = "Top gene pathway differences in all tissues caused by OVA") %>%
kable_paper("hover", full_width = F)
set | setSize | pMANOVA | s.hyp | s.amy | s.hip | s.pag | s.ni | p.hyp | p.amy | p.hip | p.pag | p.ni | s.dist | SD | p.adjustMANOVA | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
301 | EUKARYOTIC TRANSLATION ELONGATION | 87 | 0.0000000 | 0.7588262 | 0.5064512 | -0.5678627 | -0.3418057 | -0.0059097 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.9241530 | 1.1276720 | 0.5583875 | 0.0000000 |
998 | SRP DEPENDENT COTRANSLATIONAL PROTEIN TARGETING TO MEMBRANE | 106 | 0.0000000 | 0.6787601 | 0.4821449 | -0.5361133 | -0.2519301 | -0.0297124 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000075 | 0.5974752 | 1.0222270 | 0.5053211 | 0.0000000 |
828 | RESPONSE OF EIF2AK4 GCN2 TO AMINO ACID DEFICIENCY | 94 | 0.0000000 | 0.6580641 | 0.4592548 | -0.5303734 | -0.3405349 | -0.0378344 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.5264627 | 1.0211047 | 0.5084176 | 0.0000000 |
169 | COMPLEX I BIOGENESIS | 56 | 0.0000000 | 0.5240378 | 0.5286035 | -0.4897972 | -0.3222988 | -0.3638965 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000303 | 0.0000025 | 1.0150053 | 0.5067526 | 0.0000000 |
302 | EUKARYOTIC TRANSLATION INITIATION | 114 | 0.0000000 | 0.6323601 | 0.4657442 | -0.5438596 | -0.2323617 | -0.0824059 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000185 | 0.1289137 | 0.9865916 | 0.4903808 | 0.0000000 |
325 | FORMATION OF ATP BY CHEMIOSMOTIC COUPLING | 18 | 0.0000007 | 0.5445420 | 0.4758367 | -0.4187764 | -0.2660101 | -0.3879243 | 0.0000634 | 0.0004739 | 0.0020991 | 0.0507461 | 0.0043833 | 0.9589405 | 0.4793274 | 0.0000086 |
27 | ACTIVATION OF THE MRNA UPON BINDING OF THE CAP BINDING COMPLEX AND EIFS AND SUBSEQUENT BINDING TO 43S | 59 | 0.0000000 | 0.5883366 | 0.4716473 | -0.5476128 | -0.1011306 | -0.1302310 | 0.0000000 | 0.0000000 | 0.0000000 | 0.1793102 | 0.0837500 | 0.9463924 | 0.4690057 | 0.0000000 |
825 | RESPIRATORY ELECTRON TRANSPORT | 102 | 0.0000000 | 0.4632093 | 0.5044101 | -0.4530750 | -0.2710089 | -0.3775272 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000023 | 0.0000000 | 0.9435263 | 0.4708108 | 0.0000000 |
782 | REGULATION OF COMMISSURAL AXON PATHFINDING BY SLIT AND ROBO | 10 | 0.0011531 | -0.6278665 | -0.3110115 | 0.4449927 | 0.0985549 | 0.4317032 | 0.0005855 | 0.0885893 | 0.0148264 | 0.5894748 | 0.0180880 | 0.9407676 | 0.4703135 | 0.0056676 |
1089 | TRAFFICKING AND PROCESSING OF ENDOSOMAL TLR | 11 | 0.0032723 | 0.0864113 | 0.6469886 | -0.4574369 | 0.0249791 | -0.4885202 | 0.6197636 | 0.0002025 | 0.0086156 | 0.8859484 | 0.0050240 | 0.9351928 | 0.4657114 | 0.0131346 |
826 | RESPIRATORY ELECTRON TRANSPORT ATP SYNTHESIS BY CHEMIOSMOTIC COUPLING AND HEAT PRODUCTION BY UNCOUPLING PROTEINS | 125 | 0.0000000 | 0.4662110 | 0.4971360 | -0.4333618 | -0.2414320 | -0.3586402 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000032 | 0.0000000 | 0.9160849 | 0.4577743 | 0.0000000 |
72 | ASPARTATE AND ASPARAGINE METABOLISM | 10 | 0.0010542 | -0.3786837 | 0.5351802 | -0.1915441 | 0.4258093 | -0.3953808 | 0.0381296 | 0.0033837 | 0.2943000 | 0.0197252 | 0.0303956 | 0.8967429 | 0.4483703 | 0.0052485 |
900 | SELENOAMINO ACID METABOLISM | 107 | 0.0000000 | 0.5893108 | 0.4098751 | -0.4925607 | -0.2055054 | -0.0288895 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0002426 | 0.6059872 | 0.8949681 | 0.4433244 | 0.0000000 |
806 | REGULATION OF RUNX1 EXPRESSION AND ACTIVITY | 17 | 0.0004877 | 0.0136141 | -0.3894014 | 0.4431670 | -0.2126634 | 0.6067068 | 0.9225960 | 0.0054441 | 0.0015594 | 0.1290543 | 0.0000148 | 0.8726595 | 0.4239553 | 0.0026561 |
1021 | SYNTHESIS OF ACTIVE UBIQUITIN ROLES OF E1 AND E2 ENZYMES | 29 | 0.0000045 | 0.2194060 | 0.4861747 | -0.4948977 | 0.1091475 | -0.4279670 | 0.0408958 | 0.0000059 | 0.0000040 | 0.3091226 | 0.0000664 | 0.8511742 | 0.4248996 | 0.0000447 |
152 | CITRIC ACID CYCLE TCA CYCLE | 22 | 0.0000256 | 0.0600683 | 0.5015070 | -0.3268996 | 0.4826076 | -0.3581652 | 0.6258176 | 0.0000466 | 0.0079547 | 0.0000890 | 0.0036388 | 0.8503959 | 0.4175464 | 0.0002169 |
1158 | YAP1 AND WWTR1 TAZ STIMULATED GENE EXPRESSION | 10 | 0.0027124 | 0.6407648 | 0.0984540 | 0.2451316 | 0.0291285 | 0.4779327 | 0.0004499 | 0.5898562 | 0.1795474 | 0.8732901 | 0.0088707 | 0.8423956 | 0.2572784 | 0.0113589 |
186 | CRISTAE FORMATION | 31 | 0.0000001 | 0.3863752 | 0.4229585 | -0.4352128 | -0.1599940 | -0.4056004 | 0.0001969 | 0.0000459 | 0.0000274 | 0.1232308 | 0.0000930 | 0.8412489 | 0.4184397 | 0.0000007 |
625 | NONSENSE MEDIATED DECAY NMD | 109 | 0.0000000 | 0.5291588 | 0.3640689 | -0.4406652 | -0.2886506 | -0.0092885 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000002 | 0.8670760 | 0.8307506 | 0.4139338 | 0.0000000 |
1109 | TRANSCRIPTIONAL REGULATION OF PLURIPOTENT STEM CELLS | 15 | 0.0000158 | 0.3654757 | 0.4781214 | 0.0412238 | 0.3560662 | 0.4261246 | 0.0142632 | 0.0013455 | 0.7822523 | 0.0169652 | 0.0042723 | 0.8199008 | 0.1706251 | 0.0001422 |
m7_top <- subset(mres7$enrichment_result,p.adjustMANOVA<0.05)
m7_up <- subset(m7_top,s.dist>0)$set
m7_dn <- subset(m7_top,s.dist<0)$set
mitch_report(mres7,outfile="mitch7.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpE8i3BV/mitch7.rds ".
##
##
## processing file: mitch.Rmd
## 1/34
## 2/34 [checklibraries]
## 3/34
## 4/34 [peek]
## 5/34
## 6/34 [metrics]
## 7/34
## 8/34 [scatterplot]
## 9/34
## 10/34 [contourplot]
## 11/34
## 12/34 [input_geneset_metrics1]
## 13/34
## 14/34 [input_geneset_metrics2]
## 15/34
## 16/34 [input_geneset_metrics3]
## 17/34
## 18/34 [echart1d]
## 19/34 [echart2d]
## 20/34
## 21/34 [heatmap]
## 22/34
## 23/34 [effectsize]
## 24/34
## 25/34 [results_table]
## 26/34
## 27/34 [results_table_complete]
## 28/34
## 29/34 [detailed_geneset_reports1d]
## 30/34
## 31/34 [detailed_geneset_reports2d]
## 32/34
## 33/34 [session_info]
## 34/34
## output file: /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /mnt/10tbhdd/projects/craig_smith/lungbrain_eslam/dge/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpE8i3BV/mitch_report.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --section-divs --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/RtmpE8i3BV/rmarkdown-str4c70f4b90b473.html
##
## Output created: /tmp/RtmpE8i3BV/mitch_report.html
## [1] TRUE
write.table(mres7$enrichment_result,file="mitch7.tsv",quote=FALSE,sep="\t",row.names=FALSE)
m7_top_up <- head(subset(m7_top,s.dist>0),10)[,"s.dist"]
names(m7_top_up) <- head(subset(m7_top,s.dist>0),10)[,"set"]
m7_top_dn <- head(subset(m7_top,s.dist<0),10)[,"s.dist"]
names(m7_top_dn) <- head(subset(m7_top,s.dist<0),10)[,"set"]
m7_top_updn <- c(m7_top_up,m7_top_dn)
m7_top_updn <- m7_top_updn[order(m7_top_updn)]
# heatmap
mr7 <- head(subset(mres7$enrichment_result,p.adjustMANOVA<0.05),30)
mr7 <- as.matrix(mr7[,4:8])
rownames(mr7) <- head(mres7$enrichment_result,30)$set
colfunc <- colorRampPalette(c("blue", "white", "red"))
heatmap.2(mr7,trace="none",col=colfunc(25),scale="none", margins = c(10,21), cexRow=0.7,
main="Top ranked pathways OVA all tissues" , cexCol=0.9 )
pdf("plot39_mitch7_heatmap01.pdf")
heatmap.2(mr7,trace="none",col=colfunc(25),scale="none", margins = c(10,21), cexRow=0.7,
main="Top ranked pathways OVA all tissues" , cexCol=0.9 )
dev.off()
## png
## 2
There was some variability among samples in the hypothalamus, in particular some OVA samples could be classified as outliers (EA9-1 and EA3-1). Further investigation would be required to understand the origin of this variability. LPS resulted in the differential expression of just 30 genes in the hypothalamus. OVA was variable, so no significant genes were identified. Analysis with mitch identified some interesting pathways as seen in the mitch heatmap (see the mitch reports for details). The mitch software can perform multi-contrast pathway analysis and will be important to contrast the effect of the treatments in different tissues.
Bibliography
Babraham bioinformatics - FastQC A quality control tool for high throughput sequence data. Babraham.ac.uk, https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ (accessed February 23, 2022).
Frankish A, Diekhans M, Jungreis I, et al. GENCODE 2021. Nucleic Acids Res 2021; 49: D916–D923.
Jiang H, Lei R, Ding S-W, et al. Skewer: a fast and accurate adapter trimmer for next-generation sequencing paired-end reads. BMC Bioinformatics 2014; 15: 182.
Bray NL, Pimentel H, Melsted P, et al. Near-optimal probabilistic RNA-seq quantification. Nat Biotechnol 2016; 34: 525–527.
Ewels P, Magnusson M, Lundin S, et al. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics 2016; 32: 3047–3048.
Love MI, Huber W, Anders S. Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2. Genome Biol 2014; 15: 550.
Liberzon A, Birger C, Thorvaldsdóttir H, et al. The Molecular Signatures Database (MSigDB) hallmark gene set collection. Cell Syst 2015; 1: 417–425.
Jassal B, Matthews L, Viteri G, et al. The reactome pathway knowledgebase. Nucleic Acids Res 2020; 48: D498–D503.
Dolgalev I. MSigDB Gene Sets for Multiple Organisms in a Tidy Data Format [R package msigdbr version 7.4.1], https://cran.r-project.org/web/packages/msigdbr/index.html (2021, accessed February 23, 2022).
Kaspi A, Ziemann M. Mitch: Multi-contrast pathway enrichment for multi-omics and single-cell profiling data. BMC Genomics 2020; 21: 447.
For reproducibility.
sessionInfo()
## R version 4.3.1 (2023-06-16)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.3 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0
##
## locale:
## [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
## [5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8
## [7] LC_PAPER=en_AU.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
##
## time zone: /usr/share/zoneinfo/Australia/Melbourne
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] GGally_2.1.2 gtools_3.9.4
## [3] echarts4r_0.4.5 beeswarm_0.4.0
## [5] pkgload_1.3.2.1 vioplot_0.4.0
## [7] sm_2.2-5.7.1 kableExtra_1.3.4
## [9] topconfects_1.16.0 limma_3.56.2
## [11] eulerr_7.0.0 mitch_1.12.0
## [13] MASS_7.3-60 fgsea_1.26.0
## [15] gplots_3.1.3 DESeq2_1.40.2
## [17] SummarizedExperiment_1.30.2 Biobase_2.60.0
## [19] MatrixGenerics_1.12.3 matrixStats_1.0.0
## [21] GenomicRanges_1.52.0 GenomeInfoDb_1.36.2
## [23] IRanges_2.34.1 S4Vectors_0.38.1
## [25] BiocGenerics_0.46.0 reshape2_1.4.4
## [27] lubridate_1.9.2 forcats_1.0.0
## [29] stringr_1.5.0 dplyr_1.1.2
## [31] purrr_1.0.2 readr_2.1.4
## [33] tidyr_1.3.0 tibble_3.2.1
## [35] ggplot2_3.4.3 tidyverse_2.0.0
## [37] zoo_1.8-12
##
## loaded via a namespace (and not attached):
## [1] bitops_1.0-7 gridExtra_2.3 rlang_1.1.1
## [4] magrittr_2.0.3 compiler_4.3.1 polylabelr_0.2.0
## [7] systemfonts_1.0.4 vctrs_0.6.3 rvest_1.0.3
## [10] pkgconfig_2.0.3 crayon_1.5.2 fastmap_1.1.1
## [13] XVector_0.40.0 ellipsis_0.3.2 labeling_0.4.2
## [16] caTools_1.18.2 utf8_1.2.3 promises_1.2.1
## [19] rmarkdown_2.24 tzdb_0.4.0 xfun_0.40
## [22] zlibbioc_1.46.0 cachem_1.0.8 jsonlite_1.8.7
## [25] progress_1.2.2 highr_0.10 later_1.3.1
## [28] DelayedArray_0.26.7 reshape_0.8.9 BiocParallel_1.34.2
## [31] prettyunits_1.1.1 parallel_4.3.1 R6_2.5.1
## [34] bslib_0.5.1 stringi_1.7.12 RColorBrewer_1.1-3
## [37] jquerylib_0.1.4 assertthat_0.2.1 Rcpp_1.0.11
## [40] knitr_1.43 httpuv_1.6.11 Matrix_1.6-1
## [43] timechange_0.2.0 tidyselect_1.2.0 rstudioapi_0.15.0
## [46] abind_1.4-5 yaml_2.3.7 codetools_0.2-19
## [49] lattice_0.21-8 plyr_1.8.8 shiny_1.7.5
## [52] withr_2.5.0 evaluate_0.21 polyclip_1.10-4
## [55] xml2_1.3.5 pillar_1.9.0 KernSmooth_2.23-22
## [58] generics_0.1.3 RCurl_1.98-1.12 hms_1.1.3
## [61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4
## [64] glue_1.6.2 tools_4.3.1 data.table_1.14.8
## [67] webshot_0.5.5 locfit_1.5-9.8 fastmatch_1.1-4
## [70] cowplot_1.1.1 grid_4.3.1 colorspace_2.1-0
## [73] GenomeInfoDbData_1.2.10 cli_3.6.1 fansi_1.0.4
## [76] viridisLite_0.4.2 S4Arrays_1.0.5 svglite_2.1.1
## [79] gtable_0.3.4 sass_0.4.7 digest_0.6.33
## [82] farver_2.1.1 htmlwidgets_1.6.2 htmltools_0.5.6
## [85] lifecycle_1.0.3 httr_1.4.7 mime_0.12