一、RamiGO 安装

  1. $ /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/bin/R CMD INSTALL /Bioinfo/Pipeline/SourceCode/pkgs/RamiGO_1.20.0.tar.gz
  2. * installing to library ‘/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library
  3. ERROR: dependencies gsubfn’, igraph’, RCurl’, png’, RCytoscape’, graph are not available for package RamiGO
  4. * removing ‘/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library/RamiGO
  5. # 安装 gsubfn, igraph, RCurl
  6. install.packages(c("igraph", "igraph", "RCurl", "png"))
  7. # 安装 graph
  8. BiocManager::install("graph")
  9. $ /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/bin/R CMD INSTALL /Bioinfo/Pipeline/SourceCode/pkgs/RCytoscape_1.12.0.tar.gz
  10. * installing to library ‘/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library
  11. ERROR: dependency XMLRPC is not available for package RCytoscape
  12. * removing ‘/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library/RCytoscape
  13. install.packages("devtools")
  14. install_github("duncantl/XMLRPC")
  15. $ /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/bin/R CMD INSTALL /Bioinfo/Pipeline/SourceCode/pkgs/RamiGO_1.20.0.tar.gz
  16. * installing to library ‘/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library
  17. * installing *source* package RamiGO ...
  18. ** using staged installation
  19. ** R
  20. ** data
  21. ** inst
  22. ** byte-compile and prepare package for lazy loading
  23. Error in dyn.load(file, DLLpath = DLLpath, ...) :
  24. unable to load shared object '/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library/png/libs/png.so':
  25. libpng16.so.16: cannot open shared object file: No such file or directory
  26. Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
  27. Execution halted
  28. ERROR: lazy loading failed for package RamiGO
  29. * removing ‘/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library/RamiGO
  30. $ export LD_LIBRARY_PATH=/Bioinfo/Pipeline/SoftWare/LibDependence/libpng-1.6.37/
  31. bin/ include/ lib/ share/
  32. $ export LD_LIBRARY_PATH=/Bioinfo/Pipeline/SoftWare/LibDependence/libpng-1.6.37/lib:$LD_LIBRARY_PATH
  33. $ /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/bin/R CMD INSTALL /Bioinfo/Pipeline/SourceCode/pkgs/RamiGO_1.20.0.tar.gz
  34. * installing to library ‘/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library
  35. * installing *source* package RamiGO ...
  36. ** using staged installation
  37. ** R
  38. ** data
  39. ** inst
  40. ** byte-compile and prepare package for lazy loading
  41. ** help
  42. *** installing help indices
  43. ** building package indices
  44. ** installing vignettes
  45. ** testing if installed package can be loaded from temporary location
  46. ** testing if installed package can be loaded from final location
  47. ** testing if installed package keeps a record of temporary installation path
  48. * DONE (RamiGO)

二、RamiGO 使用与 libpng 依赖库异常

使用 RamiGO R 包过程中,如果发现:

  1. > library('RamiGO')
  2. Loading required package: gsubfn
  3. Loading required package: proto
  4. > goIDs <- c("GO:0051130","GO:0019912","GO:0005783","GO:0043229","GO:0050789")
  5. > color <- c("lightblue","red","yellow","green","pink")
  6. > getAmigoTree(goIDs=goIDs, color=color, filename="example", picType="png",saveResult = TRUE)
  7. Error in readPNG(aa) :
  8. libpng error: Incompatible libpng version in application and library
  9. In addition: Warning messages:
  10. 1: In readPNG(aa) :
  11. libpng warning: Application was compiled with png.h from libpng-1.6.37
  12. 2: In readPNG(aa) :
  13. libpng warning: Application is running with png.c from libpng-1.2.49

首先,如果是源码编译安装的 R(参考:《手把手教你如何在 Linux 源码安装最新版本的 R》),可以尝试在 configure 的时候把 libpng 相关的的 LDFLAGS 和 CPPFLAGS 去掉,重新安装 R。

然后,通过拷贝缺失的共享库解决存在的问题。

  1. > library(RamiGO)
  2. Loading required package: gsubfn
  3. Loading required package: proto
  4. Error: package or namespace load failed for RamiGO in dyn.load(file, DLLpath = DLLpath, ...):
  5. unable to load shared object '/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library/png/libs/png.so':
  6. libpng16.so.16: cannot open shared object file: No such file or directory
  7. > goIDs <- c("GO:0051130","GO:0019912","GO:0005783","GO:0043229","GO:0050789")
  8. > color <- c("lightblue","red","yellow","green","pink")
  9. > getAmigoTree(goIDs=goIDs, color=color, filename="example", picType="png",saveResult = TRUE)
  10. Error in getAmigoTree(goIDs = goIDs, color = color, filename = "example", :
  11. could not find function "getAmigoTree"
  1. $ ldd /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library/png/libs/png.so
  2. linux-vdso.so.1 => (0x00007fff48999000)
  3. libpng16.so.16 => not found
  4. libm.so.6 => /lib64/libm.so.6 (0x00007f100a740000)
  5. libz.so.1 => /RiboBio/Bioinfo/APPS/R-3.3.2/lib/libz.so.1 (0x00007f100a528000)
  6. libR.so => not found
  7. libc.so.6 => /lib64/libc.so.6 (0x00007f100a194000)
  8. /lib64/ld-linux-x86-64.so.2 (0x0000003636a00000)
  9. $ ln -s /Bioinfo/Pipeline/SoftWare/LibDependence/libpng-1.6.37/lib/libpng16.so.16.37.0 /usr/lib64/libpng16.so.16
  10. $ ln -s /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/lib/libR.so /usr/lib64/libR.so
  11. $ ldd /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library/png/libs/png.so
  12. linux-vdso.so.1 => (0x00007fff079ff000)
  13. libpng16.so.16 (0x00007fd903bed000)
  14. libm.so.6 => /lib64/libm.so.6 (0x00007fd903969000)
  15. libz.so.1 => /Bioinfo/APPS/R-3.3.2/lib/libz.so.1 (0x00007fd903751000)
  16. libR.so => /usr/lib64/libR.so (0x00007fd9030aa000)
  17. libc.so.6 => /lib64/libc.so.6 (0x00007fd902d16000)
  18. libRblas.so => not found
  19. libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007fd902a23000)
  20. libreadline.so.6 => /lib64/libreadline.so.6 (0x00007fd9027e0000)
  21. libpcre.so.1 => /Bioinfo/APPS/R-3.3.2/lib/libpcre.so.1 (0x00007fd9025ad000)
  22. liblzma.so.5 => /Bioinfo/APPS/R-3.3.2/lib/liblzma.so.5 (0x00007fd902388000)
  23. librt.so.1 => /lib64/librt.so.1 (0x00007fd902180000)
  24. libdl.so.2 => /lib64/libdl.so.2 (0x00007fd901f7b000)
  25. libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x00007fd901c96000)
  26. libgomp.so.1 => /Bioinfo/APPS/gcc-5.1.0/lib64/libgomp.so.1 (0x00007fd901a77000)
  27. libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd901859000)
  28. /lib64/ld-linux-x86-64.so.2 (0x0000003636a00000)
  29. libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007fd901638000)
  30. $ ln -s /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/lib/libRblas.so /usr/lib64/libRblas.so
  31. $ ldd /Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/library/png/libs/png.so
  32. linux-vdso.so.1 => (0x00007fff2b7ff000)
  33. libpng16.so.16 (0x00007fed3cd93000)
  34. libm.so.6 => /lib64/libm.so.6 (0x00007fed3cb0f000)
  35. libz.so.1 => /Bioinfo/APPS/R-3.3.2/lib/libz.so.1 (0x00007fed3c8f7000)
  36. libR.so => /usr/lib64/libR.so (0x00007fed3c250000)
  37. libc.so.6 => /lib64/libc.so.6 (0x00007fed3bebc000)
  38. libRblas.so => /usr/lib64/libRblas.so (0x00007fed3bc90000)
  39. libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007fed3b99e000)
  40. libreadline.so.6 => /lib64/libreadline.so.6 (0x00007fed3b75b000)
  41. libpcre.so.1 => /Bioinfo/APPS/R-3.3.2/lib/libpcre.so.1 (0x00007fed3b528000)
  42. liblzma.so.5 => /Bioinfo/APPS/R-3.3.2/lib/liblzma.so.5 (0x00007fed3b303000)
  43. librt.so.1 => /lib64/librt.so.1 (0x00007fed3b0fb000)
  44. libdl.so.2 => /lib64/libdl.so.2 (0x00007fed3aef6000)
  45. libiconv.so.2 => /usr/local/lib/libiconv.so.2 (0x00007fed3ac11000)
  46. libgomp.so.1 => /Bioinfo/APPS/gcc-5.1.0/lib64/libgomp.so.1 (0x00007fed3a9f2000)
  47. libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fed3a7d4000)
  48. /lib64/ld-linux-x86-64.so.2 (0x0000003636a00000)
  49. libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007fed3a5b3000)

最后,RamiGO 包可以正常使用:
image.png