I'm trying to use Pathview for pathway analysis of my differentially expressed genes. I used the below command
pathview(gene.data=foldchanges, pathway.id=keggresids, species="hsa", limit = c(-10,10))
before this I run gage function to get up-regulated pathways from my all differentially expressed genes. Then, I extracted kegg ids and gave as input to pathview function.
keggres = gage(foldchanges, gsets=kegg.sets.hs, same.dir=TRUE) keggrespathways <- rownames(keggres$greater) keggresids = substr(keggrespathways, start=1, stop=8)
Finally, I got KEGG pathway plots that have both red and green colors. My question is : 1) If it is up-regulated pathway, why do I get both red and green colors. I know that red color indicates positive fold value, so I thought I should get mostly red colored genes for up-regulated pathway.
2) Also, in this
keggres$greater, greater than what? I do not clearly understand the meaning of up-regulated pathway. Tutorial says that gage performs some pair-wise comparisons for all proper gene sets, and I do not get the meaning.
Here is my R session info :
> sessionInfo() R version 3.6.2 (2019-12-12) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale:  LC_COLLATE=Korean_Korea.949 LC_CTYPE=Korean_Korea.949  LC_MONETARY=Korean_Korea.949 LC_NUMERIC=C  LC_TIME=Korean_Korea.949 attached base packages:  parallel stats4 stats graphics grDevices utils datasets  methods base other attached packages:  gageData_2.24.0 gage_2.36.0  pathview_1.26.0 org.Hs.eg.db_3.10.0  AnnotationDbi_1.48.0 DESeq2_1.26.0  SummarizedExperiment_1.16.1 DelayedArray_0.12.2  BiocParallel_1.20.1 matrixStats_0.55.0  Biobase_2.46.0 GenomicRanges_1.38.0  GenomeInfoDb_1.22.0 IRanges_2.20.2  S4Vectors_0.24.3 BiocGenerics_0.32.0 loaded via a namespace (and not attached):  httr_1.4.1 bit64_0.9-7 splines_3.6.2  Formula_1.2-3 assertthat_0.2.1 latticeExtra_0.6-29  blob_1.2.1 GenomeInfoDbData_1.2.2 yaml_2.2.0  pillar_1.4.3 RSQLite_2.2.0 backports_1.1.5  lattice_0.20-38 glue_1.3.2 digest_0.6.25  RColorBrewer_1.1-2 XVector_0.26.0 checkmate_2.0.0  colorspace_1.4-1 htmltools_0.4.0 Matrix_1.2-18  XML_3.99-0.3 pkgconfig_2.0.3 genefilter_1.68.0  zlibbioc_1.32.0 purrr_0.3.3 xtable_1.8-4  scales_1.1.0 jpeg_0.1-8.1 htmlTable_1.13.3  tibble_2.1.3 annotate_1.64.0 KEGGREST_1.26.1  ggplot2_3.3.0 nnet_7.3-12 survival_3.1-8  magrittr_1.5 crayon_1.3.4 KEGGgraph_1.46.0  memoise_1.1.0 foreign_0.8-72 graph_1.64.0  tools_3.6.2 data.table_1.12.8 lifecycle_0.1.0  stringr_1.4.0 locfit_1.5-9.1 munsell_0.5.0  cluster_2.1.0 Biostrings_2.54.0 compiler_3.6.2  rlang_0.4.4 grid_3.6.2 RCurl_1.98-1.1  rstudioapi_0.11 htmlwidgets_1.5.1 bitops_1.0-6  base64enc_0.1-3 gtable_0.3.0 DBI_1.1.0  R6_2.4.1 gridExtra_2.3 knitr_1.28  dplyr_0.8.4 bit_1.1-15.2 Hmisc_4.3-1  Rgraphviz_2.30.0 stringi_1.4.6 Rcpp_1.0.4  geneplotter_1.64.0 vctrs_0.2.3 rpart_4.1-15  acepack_1.4.1 png_0.1-7 tidyselect_1.0.0  xfun_0.12
Please kindly let me know some answers. Thank you.