library("mitch")
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
# m2.cp.reactome.v2024.1.Mm.symbols.gmt  m5.go.v2024.1.Mm.symbols.gmt

reactome <- gmt_import("m2.cp.reactome.v2024.1.Mm.symbols.gmt")
names(reactome) <- gsub("REACTOME_","",names(reactome))
names(reactome) <- gsub("_"," ",names(reactome))

go <- gmt_import("m5.go.v2024.1.Mm.symbols.gmt")
names(go) <- gsub("_"," ",names(go))

# WTvsGAL3KO.tsv
wt_gal3ko <- read.table("WTvsGAL3KO.tsv",header=TRUE,row.names=1 )
wt_gal3ko[which(wt_gal3ko$PValue==0),"PValue"] <- 1e-305

# WTvsMSTTG.tsv
wt_mst1ox <- read.table("WTvsMSTTG.tsv",header=TRUE,row.names=1 )
wt_mst1ox[which(wt_mst1ox$PValue==0),"PValue"] <- 1e-305

# MST1TGvsMST1TGGAL3KO
mst1ox_mst1oxko <- read.table("MST1TGvsMST1TGGAL3KO.tsv",header=TRUE,row.names=1 )
mst1ox_mst1oxko[which(mst1ox_mst1oxko$PValue==0),"PValue"] <- 1e-305

# gene table
gt <- data.frame(rownames(wt_gal3ko))
gt2 <- cbind(gt,do.call(rbind,strsplit(gt[,1],"_")))
gt2[,2]=NULL
head(gt2)
##           rownames.wt_gal3ko.        2
## 1    ENSMUSG00000088025_Rprl3    Rprl3
## 2  ENSMUSG00000097431_Gm26782  Gm26782
## 3    ENSMUSG00000087775_Rprl2    Rprl2
## 4   ENSMUSG00000021908_Gm6768   Gm6768
## 5 ENSMUSG00000071470_Ccnb1ip1 Ccnb1ip1
## 6    ENSMUSG00000022193_Psmb5    Psmb5
# import
wt_gal3ko_m <- mitch_import(wt_gal3ko,DEtype="edgeR",geneTable=gt2)
## The input is a single dataframe; one contrast only. Converting
##         it to a list for you.
## Note: Mean no. genes in input = 15249
## Note: no. genes in output = 15245
## Note: estimated proportion of input genes in output = 1
wt_mst1ox_m <- mitch_import(wt_mst1ox,DEtype="edgeR",geneTable=gt2)
## The input is a single dataframe; one contrast only. Converting
##         it to a list for you.
## Note: Mean no. genes in input = 15249
## Note: no. genes in output = 15245
## Note: estimated proportion of input genes in output = 1
mst1ox_mst1oxko_m <- mitch_import(mst1ox_mst1oxko,DEtype="edgeR",geneTable=gt2)
## The input is a single dataframe; one contrast only. Converting
##         it to a list for you.
## Note: Mean no. genes in input = 15249
## Note: no. genes in output = 15245
## Note: estimated proportion of input genes in output = 1
# run mitch with GO sets
wt_gal3ko_go <- mitch_calc(wt_gal3ko_m,go, cores=8,priority="effect")
## Note: Enrichments with large effect sizes may not be
##             statistically significant.
wt_mst1ox_go <- mitch_calc(wt_mst1ox_m,go, cores=8,priority="effect")
## Note: Enrichments with large effect sizes may not be
##             statistically significant.
mst1ox_mst1oxko_go <- mitch_calc(mst1ox_mst1oxko_m,go, cores=8,priority="effect")
## Note: Enrichments with large effect sizes may not be
##             statistically significant.
head(wt_gal3ko_go$enrichment_result,10)
##                                                                          set
## 5972                                        GOMF MHC PROTEIN COMPLEX BINDING
## 5202                                                GOCC MHC PROTEIN COMPLEX
## 6174                             GOMF PLATELET DERIVED GROWTH FACTOR BINDING
## 2932                         GOBP POSITIVE REGULATION OF PLATELET ACTIVATION
## 2423                  GOBP PEPTIDE ANTIGEN ASSEMBLY WITH MHC PROTEIN COMPLEX
## 5133                                                        GOCC GOLGI LUMEN
## 140                GOBP ANTIGEN PROCESSING AND PRESENTATION VIA MHC CLASS IB
## 2146 GOBP NEGATIVE REGULATION OF SUBSTRATE ADHESION DEPENDENT CELL SPREADING
## 5200                                GOCC MHC CLASS I PEPTIDE LOADING COMPLEX
## 6118                                            GOMF PEPTIDE ANTIGEN BINDING
##      setSize       pANOVA     s.dist p.adjustANOVA
## 5972      11 4.964471e-06 -0.7949682  1.084301e-04
## 5202      17 6.526072e-07 -0.6967969  1.917775e-05
## 6174      11 1.002847e-04 -0.6772769  1.507769e-03
## 2932      10 2.160660e-04 -0.6755497  2.749737e-03
## 2423      10 3.021684e-04 -0.6598490  3.658275e-03
## 5133      14 2.161873e-05 -0.6555615  3.914989e-04
## 140       18 1.599675e-06 -0.6531673  4.024086e-05
## 2146      12 1.006207e-04 -0.6483293  1.509311e-03
## 5200      12 1.048680e-04 -0.6466553  1.562147e-03
## 6118      21 5.757717e-07 -0.6300641  1.731332e-05
head(wt_mst1ox_go$enrichment_result,10)
##                                                                                             set
## 980                                 GOBP FATTY ACID BETA OXIDATION USING ACYL COA DEHYDROGENASE
## 5245                                                            GOCC NADH DEHYDROGENASE COMPLEX
## 3275                                              GOBP PROTON MOTIVE FORCE DRIVEN ATP SYNTHESIS
## 6099 GOMF OXIDOREDUCTASE ACTIVITY ACTING ON THE CH CH GROUP OF DONORS WITH A FLAVIN AS ACCEPTOR
## 6022                                                GOMF NADH DEHYDROGENASE UBIQUINONE ACTIVITY
## 5495                                   GOCC TRICARBOXYLIC ACID CYCLE HETEROMERIC ENZYME COMPLEX
## 1755                                                   GOBP NADH DEHYDROGENASE COMPLEX ASSEMBLY
## 4902                                                  GOCC ALPHA KETOACID DEHYDROGENASE COMPLEX
## 1603                                   GOBP MITOCHONDRIAL ELECTRON TRANSPORT NADH TO UBIQUINONE
## 5386                                                                           GOCC RESPIRASOME
##      setSize       pANOVA     s.dist p.adjustANOVA
## 980       12 1.492716e-08 -0.9436859  5.483186e-07
## 5245      43 3.003685e-26 -0.9328883  5.884493e-24
## 3275      47 2.323008e-28 -0.9297920  4.844596e-26
## 6099      13 7.293615e-09 -0.9261474  2.875196e-07
## 6022      16 1.705007e-10 -0.9216544  8.818296e-09
## 5495      20 1.269829e-12 -0.9162102  8.827357e-11
## 1755      55 9.844348e-32 -0.9122174  2.545748e-29
## 4902      15 3.727488e-09 -0.8789057  1.515611e-07
## 1603      28 1.349817e-15 -0.8717365  1.229094e-13
## 5386      80 3.580856e-41 -0.8672585  1.543349e-38
head(mst1ox_mst1oxko_go$enrichment_result,10)
##                                                                                             set
## 980                                 GOBP FATTY ACID BETA OXIDATION USING ACYL COA DEHYDROGENASE
## 3275                                              GOBP PROTON MOTIVE FORCE DRIVEN ATP SYNTHESIS
## 5245                                                            GOCC NADH DEHYDROGENASE COMPLEX
## 1604                            GOBP MITOCHONDRIAL ELECTRON TRANSPORT UBIQUINOL TO CYTOCHROME C
## 6029                                      GOMF NATURAL KILLER CELL LECTIN LIKE RECEPTOR BINDING
## 6099 GOMF OXIDOREDUCTASE ACTIVITY ACTING ON THE CH CH GROUP OF DONORS WITH A FLAVIN AS ACCEPTOR
## 5201                                                           GOCC MHC CLASS I PROTEIN COMPLEX
## 5386                                                                           GOCC RESPIRASOME
## 1603                                   GOBP MITOCHONDRIAL ELECTRON TRANSPORT NADH TO UBIQUINONE
## 60                                                        GOBP AEROBIC ELECTRON TRANSPORT CHAIN
##      setSize       pANOVA     s.dist p.adjustANOVA
## 980       12 4.124763e-08  0.9142213  1.017809e-06
## 3275      47 3.330618e-23  0.8356167  6.728888e-21
## 5245      43 3.046845e-21  0.8330269  4.804355e-19
## 1604      12 6.775967e-07  0.8280050  1.237475e-05
## 6029      12 8.100747e-07 -0.8222171  1.450729e-05
## 6099      13 3.083815e-07  0.8196408  6.153354e-06
## 5201      10 8.168627e-06 -0.8144798  1.138150e-04
## 5386      80 9.167709e-36  0.8059446  5.926924e-33
## 1603      28 2.242039e-13  0.8002469  1.380456e-11
## 60        59 4.412683e-26  0.7941324  1.188667e-23
nrow(subset(wt_gal3ko_go$enrichment_result,p.adjustANOVA<0.05))
## [1] 1080
nrow(subset(wt_mst1ox_go$enrichment_result,p.adjustANOVA<0.05))
## [1] 1229
nrow(subset(mst1ox_mst1oxko_go$enrichment_result,p.adjustANOVA<0.05))
## [1] 1561
mitch_report(res=wt_gal3ko_go,outfile="wt_gal3ko_go.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpiyZ1VC/wt_gal3ko_go.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: /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpiyZ1VC/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/RtmpiyZ1VC/rmarkdown-str333f026ef89519.html
## 
## Output created: /tmp/RtmpiyZ1VC/mitch_report.html
## [1] TRUE
mitch_report(res=wt_mst1ox_go,outfile="wt_mst1ox_go.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpiyZ1VC/wt_mst1ox_go.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: /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpiyZ1VC/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/RtmpiyZ1VC/rmarkdown-str333f025d3b066.html
## 
## Output created: /tmp/RtmpiyZ1VC/mitch_report.html
## [1] TRUE
mitch_report(res=mst1ox_mst1oxko_go,outfile="mst1ox_mst1oxko_go.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpiyZ1VC/mst1ox_mst1oxko_go.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: /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpiyZ1VC/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/RtmpiyZ1VC/rmarkdown-str333f02181dacdc.html
## 
## Output created: /tmp/RtmpiyZ1VC/mitch_report.html
## [1] TRUE
# run mitch with reactome sets
wt_gal3ko_re <- mitch_calc(wt_gal3ko_m,reactome, cores=8,priority="effect")
## Note: Enrichments with large effect sizes may not be
##             statistically significant.
wt_mst1ox_re <- mitch_calc(wt_mst1ox_m,reactome, cores=8,priority="effect")
## Note: Enrichments with large effect sizes may not be
##             statistically significant.
mst1ox_mst1oxko_re <- mitch_calc(mst1ox_mst1oxko_m,reactome, cores=8,priority="effect")
## Note: Enrichments with large effect sizes may not be
##             statistically significant.
head(wt_gal3ko_re$enrichment_result,10)
##                                                                 set setSize
## 217                                      ENDOSOMAL VACUOLAR PATHWAY      10
## 231                                            ER PHAGOSOME PATHWAY      19
## 280                        GENERATION OF SECOND MESSENGER MOLECULES      12
## 351                                INITIAL TRIGGERING OF COMPLEMENT      13
## 473                                              NCAM1 INTERACTIONS      16
## 610                                                 RAP1 SIGNALLING      15
## 679                                       RHO GTPASES ACTIVATE KTN1      10
## 44                            ANTIGEN PROCESSING CROSS PRESENTATION      72
## 660                              RETROGRADE NEUROTROPHIN SIGNALLING      10
## 67  A TETRASACCHARIDE LINKER SEQUENCE IS REQUIRED FOR GAG SYNTHESIS      19
##           pANOVA     s.dist p.adjustANOVA
## 217 1.741564e-04 -0.6854742  1.801618e-03
## 231 9.268831e-05 -0.5179921  1.112260e-03
## 280 1.891205e-03 -0.5179654  1.251533e-02
## 351 1.500525e-03 -0.5085145  1.068104e-02
## 473 5.227461e-04 -0.5008865  4.396930e-03
## 610 9.011348e-04 -0.4950668  6.815306e-03
## 679 6.990196e-03 -0.4926026  3.526246e-02
## 44  1.839173e-12 -0.4802152  3.310511e-10
## 660 9.128015e-03 -0.4761536  4.323797e-02
## 67  5.472087e-04 -0.4580600  4.560072e-03
head(wt_mst1ox_re$enrichment_result,10)
##                                                        set setSize       pANOVA
## 141                                   COMPLEX I BIOGENESIS      58 5.552755e-33
## 124                            CITRIC ACID CYCLE TCA CYCLE      33 1.138948e-18
## 82                    BRANCHED CHAIN AMINO ACID CATABOLISM      20 7.667006e-12
## 882                                 UBIQUINOL BIOSYNTHESIS      11 5.025280e-07
## 591                                    PROTEIN LIPOYLATION      10 2.804835e-06
## 658                         RESPIRATORY ELECTRON TRANSPORT     124 1.763032e-59
## 139                                   COMPLEX III ASSEMBLY      17 3.211499e-09
## 415  MATURATION OF TCA ENZYMES AND REGULATION OF TCA CYCLE      18 1.118140e-09
## 449                MITOCHONDRIAL FATTY ACID BETA OXIDATION      33 2.487310e-16
## 30  AEROBIC RESPIRATION AND RESPIRATORY ELECTRON TRANSPORT     202 3.088775e-83
##         s.dist p.adjustANOVA
## 141 -0.9065875  9.994959e-31
## 124 -0.8864015  1.138948e-16
## 82  -0.8836125  3.833503e-10
## 882 -0.8748255  1.103110e-05
## 591 -0.8553331  5.609669e-05
## 658 -0.8431342  7.933646e-57
## 139 -0.8290765  1.032268e-07
## 415 -0.8290099  3.727133e-08
## 449 -0.8237715  2.035072e-14
## 30  -0.7856692  2.779898e-80
head(mst1ox_mst1oxko_re$enrichment_result,10)
##                                                       set setSize       pANOVA
## 217                            ENDOSOMAL VACUOLAR PATHWAY      10 2.255354e-06
## 591                                   PROTEIN LIPOYLATION      10 6.850828e-06
## 139                                  COMPLEX III ASSEMBLY      17 1.004461e-08
## 82                   BRANCHED CHAIN AMINO ACID CATABOLISM      20 2.745599e-09
## 141                                  COMPLEX I BIOGENESIS      58 5.142162e-24
## 450          MITOCHONDRIAL IRON SULFUR CLUSTER BIOGENESIS      10 3.062275e-05
## 449               MITOCHONDRIAL FATTY ACID BETA OXIDATION      33 2.009804e-13
## 658                        RESPIRATORY ELECTRON TRANSPORT     124 2.202680e-45
## 124                           CITRIC ACID CYCLE TCA CYCLE      33 6.563266e-13
## 415 MATURATION OF TCA ENZYMES AND REGULATION OF TCA CYCLE      18 1.336824e-07
##         s.dist p.adjustANOVA
## 217 -0.8634460  4.720508e-05
## 591  0.8213325  1.284530e-04
## 139  0.8024382  3.476982e-07
## 82   0.7677635  1.074365e-07
## 141  0.7664518  9.255892e-22
## 450  0.7612077  4.374679e-04
## 449  0.7387230  1.507353e-11
## 658  0.7336944  6.608039e-43
## 124  0.7226751  4.219243e-11
## 415  0.7178185  4.296935e-06
nrow(subset(wt_gal3ko_re$enrichment_result,p.adjustANOVA<0.05))
## [1] 195
nrow(subset(wt_mst1ox_re$enrichment_result,p.adjustANOVA<0.05))
## [1] 135
nrow(subset(mst1ox_mst1oxko_re$enrichment_result,p.adjustANOVA<0.05))
## [1] 201
mitch_report(res=wt_gal3ko_re,outfile="wt_gal3ko_re.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpiyZ1VC/wt_gal3ko_re.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: /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpiyZ1VC/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/RtmpiyZ1VC/rmarkdown-str333f021f8cf37d.html
## 
## Output created: /tmp/RtmpiyZ1VC/mitch_report.html
## [1] TRUE
mitch_report(res=wt_mst1ox_re,outfile="wt_mst1ox_re.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpiyZ1VC/wt_mst1ox_re.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: /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpiyZ1VC/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/RtmpiyZ1VC/rmarkdown-str333f0217bc54ce.html
## 
## Output created: /tmp/RtmpiyZ1VC/mitch_report.html
## [1] TRUE
mitch_report(res=mst1ox_mst1oxko_re,outfile="mst1ox_mst1oxko_re.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpiyZ1VC/mst1ox_mst1oxko_re.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: /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpiyZ1VC/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/RtmpiyZ1VC/rmarkdown-str333f021f813346.html
## 
## Output created: /tmp/RtmpiyZ1VC/mitch_report.html
## [1] TRUE
# run multimitch
mylist <- list("wt_gal3ko"=wt_gal3ko,"wt_mst1ox"=wt_mst1ox,"mst1ox_mst1oxko"=mst1ox_mst1oxko)
multi <- mitch_import(mylist,DEtype="edgeR",geneTable=gt2)
## Note: Mean no. genes in input = 15249
## Note: no. genes in output = 15245
## Note: estimated proportion of input genes in output = 1
multi_go <- mitch_calc(x=multi,genesets=go,cores=8,priority="effect")
## Note: Enrichments with large effect sizes may not be 
##             statistically significant.
head(multi_go$enrichment_result,20)
##                                                                                             set
## 980                                 GOBP FATTY ACID BETA OXIDATION USING ACYL COA DEHYDROGENASE
## 5245                                                            GOCC NADH DEHYDROGENASE COMPLEX
## 3275                                              GOBP PROTON MOTIVE FORCE DRIVEN ATP SYNTHESIS
## 6099 GOMF OXIDOREDUCTASE ACTIVITY ACTING ON THE CH CH GROUP OF DONORS WITH A FLAVIN AS ACCEPTOR
## 5386                                                                           GOCC RESPIRASOME
## 6022                                                GOMF NADH DEHYDROGENASE UBIQUINONE ACTIVITY
## 1604                            GOBP MITOCHONDRIAL ELECTRON TRANSPORT UBIQUINOL TO CYTOCHROME C
## 1602                               GOBP MITOCHONDRIAL ELECTRON TRANSPORT CYTOCHROME C TO OXYGEN
## 5387                                                          GOCC RESPIRATORY CHAIN COMPLEX IV
## 1755                                                   GOBP NADH DEHYDROGENASE COMPLEX ASSEMBLY
## 60                                                        GOBP AEROBIC ELECTRON TRANSPORT CHAIN
## 5032                                                                    GOCC CYTOCHROME COMPLEX
## 1603                                   GOBP MITOCHONDRIAL ELECTRON TRANSPORT NADH TO UBIQUINONE
## 5221                                           GOCC MITOCHONDRIAL RESPIRATORY CHAIN COMPLEX III
## 5201                                                           GOCC MHC CLASS I PROTEIN COMPLEX
## 5495                                   GOCC TRICARBOXYLIC ACID CYCLE HETEROMERIC ENZYME COMPLEX
## 179                                               GOBP ATP SYNTHESIS COUPLED ELECTRON TRANSPORT
## 6021                                                           GOMF NADH DEHYDROGENASE ACTIVITY
## 6029                                      GOMF NATURAL KILLER CELL LECTIN LIKE RECEPTOR BINDING
## 261                                            GOBP BRANCHED CHAIN AMINO ACID CATABOLIC PROCESS
##      setSize      pMANOVA s.wt_gal3ko s.wt_mst1ox s.mst1ox_mst1oxk  p.wt_gal3ko
## 980       12 3.426896e-10 -0.19581391  -0.9436859        0.9142213 2.402544e-01
## 5245      43 3.568675e-33  0.31207338  -0.9328883        0.8330269 4.002678e-04
## 3275      47 6.421535e-36  0.29170692  -0.9297920        0.8356167 5.424282e-04
## 6099      13 2.084808e-10 -0.30108678  -0.9261474        0.8196408 6.018454e-02
## 5386      80 8.157503e-57  0.34971316  -0.8672585        0.8059446 6.457531e-08
## 6022      16 2.329879e-11  0.23184385  -0.9216544        0.7871003 1.084158e-01
## 1604      12 1.266554e-08  0.47032758  -0.7788026        0.8280050 4.787548e-03
## 1602      15 1.117969e-10  0.48736266  -0.8263252        0.7593434 1.083013e-03
## 5387      22 2.061451e-15  0.46257159  -0.8214484        0.7731065 1.727902e-04
## 1755      55 9.697151e-38  0.19587049  -0.9122174        0.7781148 1.202148e-02
## 60        59 2.702058e-40  0.34263048  -0.8491943        0.7941324 5.345632e-06
## 5032      33 1.125690e-22  0.47420298  -0.8002534        0.7689623 2.423260e-06
## 1603      28 9.330857e-19  0.22463598  -0.8717365        0.8002469 3.969534e-02
## 5221      12 2.863847e-08  0.46931005  -0.7788573        0.7881026 4.879441e-03
## 5201      10 4.474539e-07 -0.62404989   0.5889071       -0.8144798 6.324205e-04
## 5495      20 1.740854e-12  0.12617406  -0.9162102        0.6760525 3.287504e-01
## 179       69 4.748165e-41  0.32284194  -0.7965533        0.7351386 3.558751e-06
## 6021      11 1.070711e-06  0.32028835  -0.8341748        0.6907038 6.588522e-02
## 6029      12 7.509553e-08 -0.59376573   0.4756122       -0.8222171 3.685443e-04
## 261       20 2.074108e-11  0.08526765  -0.8259442        0.7319278 5.092554e-01
##       p.wt_mst1ox p.mst1ox_mst1oxk   s.dist        SD p.adjustMANOVA
## 980  1.492716e-08     4.124763e-08 1.328415 0.9348181   6.205850e-09
## 5245 3.003685e-26     3.046845e-21 1.289032 0.9073568   5.627192e-31
## 3275 2.323008e-28     3.330618e-23 1.283690 0.9041170   1.064493e-33
## 6099 7.293615e-09     3.083815e-07 1.272876 0.8845439   3.850938e-09
## 5386 3.580856e-41     9.167709e-36 1.234497 0.8649447   4.394854e-54
## 6022 1.705007e-10     4.965566e-08 1.233988 0.8716565   5.004209e-10
## 1604 2.978955e-06     6.775967e-07 1.230176 0.8436123   1.819616e-07
## 1602 2.977272e-08     3.523071e-07 1.223494 0.8479480   2.157513e-09
## 5387 2.506516e-11     3.390999e-10 1.219198 0.8453544   7.404045e-14
## 1755 9.844348e-32     1.643099e-23 1.214894 0.8586899   1.843885e-35
## 60   1.333215e-29     4.412683e-26 1.212094 0.8490017   6.469928e-38
## 5032 1.700822e-15     2.017594e-14 1.206887 0.8340224   8.561863e-21
## 1603 1.349817e-15     2.242039e-13 1.204484 0.8494007   4.569999e-17
## 5221 2.974194e-06     2.266310e-06 1.203319 0.8281419   3.740358e-07
## 5201 1.260587e-03     8.168627e-06 1.183058 0.7612515   4.734516e-06
## 5495 1.269829e-12     1.648352e-07 1.145604 0.8087266   4.379229e-11
## 179  2.140799e-30     4.047495e-26 1.130996 0.7925817   1.334647e-38
## 6021 1.654144e-06     7.276526e-05 1.129382 0.7953246   1.053599e-05
## 6029 4.335001e-03     8.100747e-07 1.120181 0.6928347   9.194935e-07
## 261  1.581427e-10     1.442305e-08 1.106875 0.7826708   4.484652e-10
nrow(subset(multi_go$enrichment_result,p.adjustMANOVA<0.05))
## [1] 2275
mitch_report(res=multi_go,outfile="multi_go.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpiyZ1VC/multi_go.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: /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpiyZ1VC/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/RtmpiyZ1VC/rmarkdown-str333f02246bafb9.html
## 
## Output created: /tmp/RtmpiyZ1VC/mitch_report.html
## [1] TRUE
multi_re <- mitch_calc(x=multi,genesets=reactome,cores=8,priority="effect")
## Note: Enrichments with large effect sizes may not be 
##             statistically significant.
head(multi_re$enrichment_result,20)
##                                                        set setSize
## 217                             ENDOSOMAL VACUOLAR PATHWAY      10
## 141                                   COMPLEX I BIOGENESIS      58
## 591                                    PROTEIN LIPOYLATION      10
## 139                                   COMPLEX III ASSEMBLY      17
## 82                    BRANCHED CHAIN AMINO ACID CATABOLISM      20
## 124                            CITRIC ACID CYCLE TCA CYCLE      33
## 658                         RESPIRATORY ELECTRON TRANSPORT     124
## 449                MITOCHONDRIAL FATTY ACID BETA OXIDATION      33
## 882                                 UBIQUINOL BIOSYNTHESIS      11
## 415  MATURATION OF TCA ENZYMES AND REGULATION OF TCA CYCLE      18
## 450           MITOCHONDRIAL IRON SULFUR CLUSTER BIOGENESIS      10
## 30  AEROBIC RESPIRATION AND RESPIRATORY ELECTRON TRANSPORT     202
## 452                              MITOCHONDRIAL TRANSLATION      87
## 150                       CROSSLINKING OF COLLAGEN FIBRILS      18
## 451                      MITOCHONDRIAL PROTEIN DEGRADATION      70
## 74           BETA OXIDATION OF VERY LONG CHAIN FATTY ACIDS      11
## 140                                    COMPLEX IV ASSEMBLY      38
## 134                           COLLAGEN CHAIN TRIMERIZATION      34
## 330                                      HEME BIOSYNTHESIS      12
## 473                                     NCAM1 INTERACTIONS      16
##           pMANOVA s.wt_gal3ko s.wt_mst1ox s.mst1ox_mst1oxk  p.wt_gal3ko
## 217  7.635582e-08 -0.68547424   0.5499442       -0.8634460 1.741564e-04
## 141  5.306638e-39  0.18871403  -0.9065875        0.7664518 1.296909e-02
## 591  1.193824e-06  0.03186085  -0.8553331        0.8213325 8.615216e-01
## 139  4.918035e-11  0.26436595  -0.8290765        0.8024382 5.918009e-02
## 82   5.565709e-13  0.16400657  -0.8836125        0.7677635 2.042680e-01
## 124  1.618500e-20  0.15511279  -0.8864015        0.7226751 1.231671e-01
## 658  1.518749e-74  0.20577343  -0.8431342        0.7336944 7.707120e-05
## 449  8.219842e-19  0.05581718  -0.8237715        0.7387230 5.790795e-01
## 882  6.385530e-07 -0.29150107  -0.8748255        0.6018833 9.415388e-02
## 415  3.448302e-10  0.09650985  -0.8290099        0.7178185 4.784929e-01
## 450  2.102677e-05  0.16550049  -0.7304496        0.7612077 3.648702e-01
## 30  1.782117e-101  0.17610178  -0.7856692        0.6527460 1.652967e-05
## 452  7.759373e-43  0.03830002  -0.7773809        0.6701988 5.372737e-01
## 150  6.677075e-09 -0.34009034   0.6924396       -0.6757879 1.249955e-02
## 451  5.269094e-32  0.06608990  -0.7614818        0.6279445 3.393409e-01
## 74   5.656368e-05  0.01694774  -0.6704143        0.7005741 9.224768e-01
## 140  1.802214e-16  0.22609394  -0.7088979        0.6161394 1.590691e-02
## 134  9.660585e-15 -0.33990494   0.7334050       -0.4717329 6.048689e-04
## 330  4.814730e-05 -0.05912602  -0.6815685        0.6289963 7.228982e-01
## 473  6.116079e-07 -0.50088647   0.6191723       -0.4649271 5.227461e-04
##      p.wt_mst1ox p.mst1ox_mst1oxk    s.dist        SD p.adjustMANOVA
## 217 2.600620e-03     2.255354e-06 1.2320116 0.7698057   1.205618e-06
## 141 5.552755e-33     5.142162e-24 1.2020658 0.8497575   9.551949e-37
## 591 2.804835e-06     6.850828e-06 1.1862533 0.8388073   1.432589e-05
## 139 3.211499e-09     1.004461e-08 1.1837078 0.8313622   1.134931e-09
## 82  7.667006e-12     2.745599e-09 1.1820026 0.8355708   1.615851e-11
## 124 1.138948e-18     6.563266e-13 1.1541347 0.8160889   1.324227e-18
## 658 1.763032e-59     2.202680e-45 1.1364530 0.8026307   4.556247e-72
## 449 2.487310e-16     2.009804e-13 1.1078929 0.7833077   5.284184e-17
## 882 5.025280e-07     5.468274e-04 1.1011612 0.7437598   8.209967e-06
## 415 1.118140e-09     1.336824e-07 1.1008337 0.7783839   7.053345e-09
## 450 6.327649e-05     3.062275e-05 1.0678878 0.7508479   1.802294e-04
## 30  3.088775e-83     8.163806e-58 1.0365159 0.7327154   1.603905e-98
## 452 3.758092e-36     2.882071e-27 1.0271098 0.7257317   1.745859e-40
## 150 3.635653e-07     6.881679e-07 1.0255844 0.7130752   1.155648e-07
## 451 2.719542e-28     9.865125e-20 0.9892101 0.6989350   5.269094e-30
## 74  1.178926e-04     5.727193e-05 0.9698178 0.6854950   3.915947e-04
## 140 3.848991e-14     4.882226e-11 0.9660655 0.6809392   7.723773e-15
## 134 1.313376e-13     1.932750e-06 0.9359221 0.6610258   3.344049e-13
## 330 4.340089e-05     1.612553e-04 0.9293373 0.6555566   3.551850e-04
## 473 1.799311e-05     1.283239e-03 0.9221816 0.6365396   7.977495e-06
nrow(subset(multi_go$enrichment_result,p.adjustMANOVA<0.05))
## [1] 2275
mitch_report(res=multi_re,outfile="multi_re.html",overwrite=TRUE)
## Note: overwriting existing report
## Dataset saved as " /tmp/RtmpiyZ1VC/multi_re.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: /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS /home/mark.ziemann@domain.internal.burnet.edu.au/projects/du_lipid_paper/old_analysis/edgeR/mitch.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /tmp/RtmpiyZ1VC/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/RtmpiyZ1VC/rmarkdown-str333f0252e3896c.html
## 
## Output created: /tmp/RtmpiyZ1VC/mitch_report.html
## [1] TRUE
# GAL3KOvsMST1TGGAL3KO.tsv
# MST1TGvsMST1TGGAL3KO.tsv
# WTvsGAL3KO.tsv
# WTvsMST1TGandMST1TGGAL3KO.tsv
# WTvsMST1TGGAL3KO.tsv
# WTvsMSTTG.tsv