bvieth / powsimR

Power analysis is essential to optimize the design of RNA-seq experiments and to assess and compare the power to detect differentially expressed genes. PowsimR is a flexible tool to simulate and evaluate differential expression from bulk and especially single-cell RNA-seq data making it suitable for a priori and posterior power analyses.
https://bvieth.github.io/powsimR/
Artistic License 2.0
103 stars 23 forks source link

Cairo #11

Closed swvanderlaan closed 6 years ago

swvanderlaan commented 6 years ago

Hi, I have a new MacBook and try to install powsimR. I've install R using homebrew. I follow the manual instructions on your GitHub. I now get this error below. Do you know a way to solve this?

Best,

Sander

> ipak <- function(pkg, repository = c("CRAN", "Bioconductor", "github")) {
+     new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
+     if (length(new.pkg)) {
+         if (repository == "CRAN") {
+             install.packages(new.pkg, dependencies = TRUE)
+         }
+         if (repository == "Bioconductor") {
+             source("https://bioconductor.org/biocLite.R")
+             biocLite(new.pkg, dependencies = TRUE, ask = FALSE)
+         }
+         if (repository == "github") {
+             devtools::install_github(new.pkg, build_vignettes = FALSE, dependencies = TRUE)
+         }
+     }
+ }
> cranpackages <- c("methods", "stats", "matrixStats", "Rtsne", "moments", "minpack.lm",
+     "glmnet", "cluster", "mclust", "MASS", "gtools", "doParallel", "parallel",
+     "snow", "reshape2", "plyr", "dplyr", "tidyr", "tibble", "data.table", "ggplot2",
+     "grid", "ggthemes", "ggExtra", "cowplot", "scales", "cobs", "msir", "drc",
+     "DrImpute", "VGAM", "NBPSeq")
> ipak(cranpackages, repository = "CRAN")
>
> biocpackages <- c("S4Vectors", "DEDS", "AnnotationDbi", "Biobase", "BiocGenerics",
+     "SummarizedExperiment", "BiocParallel", "RUVSeq", "scran", "scater", "SingleCellExperiment",
+     "Linnorm", "edgeR", "limma", "DESeq2", "baySeq", "NOISeq", "EBSeq", "MAST",
+     "scde", "scDD", "ROTS", "monocle", "IHW", "qvalue")
> ipak(biocpackages, repository = "Bioconductor")
Bioconductor version 3.6 (BiocInstaller 1.28.0), ?biocLite for help
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.3 (2017-11-30).
Installing package(s) ‘scde’
also installing the dependency ‘Cairo’

trying URL 'https://cran.rstudio.com/src/contrib/Cairo_1.5-9.tar.gz'
Content type 'application/x-gzip' length 86982 bytes (84 KB)
==================================================
downloaded 84 KB

trying URL 'https://bioconductor.org/packages/3.6/bioc/src/contrib/scde_2.6.0.tar.gz'
Content type 'application/x-gzip' length 1110245 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

* installing *source* package ‘Cairo’ ...
** package ‘Cairo’ successfully unpacked and MD5 sums checked
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking whether pkg-config knows about cairo... no
configure: CAIRO_LIBS is unset, attempting to guess it.
configure: CAIRO_CFLAGS=-I/usr/local/include/cairo
checking if R was compiled with the RConn patch... no
checking cairo.h usability... yes
checking cairo.h presence... yes
checking for cairo.h... yes
checking for PNG support in Cairo... yes
checking for ATS font support in Cairo... no
configure: CAIRO_LIBS=-L/usr/local/lib -lcairo
checking for library containing deflate... -lz
checking whether Cairo programs can be compiled... yes
checking whether cairo_image_surface_get_format is declared... no
checking for FreeType support in cairo... yes
checking whether FreeType needs additional flags... yes
checking whether pkg-config knows about fontconfig or freetype2... yes
checking whether additional flags work... yes
checking wheter libjpeg works... yes
checking wheter libtiff works... yes
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/cconfig.h
** libs
clang -I/usr/local/Cellar/r/3.4.3/lib/R/include -DNDEBUG -I/usr/local/include/cairo  -I/usr/local/Cellar/fontconfig/2.12.6/include -I/usr/local/opt/freetype/include/freetype2 -I. -Iinclude  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -g -O2 -fPIC  -g -O2  -c cairobem.c -o cairobem.o
clang -I/usr/local/Cellar/r/3.4.3/lib/R/include -DNDEBUG -I/usr/local/include/cairo  -I/usr/local/Cellar/fontconfig/2.12.6/include -I/usr/local/opt/freetype/include/freetype2 -I. -Iinclude  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -g -O2 -fPIC  -g -O2  -c cairogd.c -o cairogd.o
clang -I/usr/local/Cellar/r/3.4.3/lib/R/include -DNDEBUG -I/usr/local/include/cairo  -I/usr/local/Cellar/fontconfig/2.12.6/include -I/usr/local/opt/freetype/include/freetype2 -I. -Iinclude  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/include  -g -O2 -fPIC  -g -O2  -c cairotalk.c -o cairotalk.o
In file included from cairotalk.c:10:
In file included from ./xlib-backend.h:7:
/usr/local/include/cairo/cairo-xlib.h:44:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
         ^~~~~~~~~~~~
1 error generated.
make: *** [cairotalk.o] Error 1
ERROR: compilation failed for package ‘Cairo’
* removing ‘/usr/local/Cellar/r/3.4.3/lib/R/library/Cairo’
ERROR: dependency ‘Cairo’ is not available for package ‘scde’
* removing ‘/usr/local/Cellar/r/3.4.3/lib/R/library/scde’

The downloaded source packages are in
    ‘/private/var/folders/kh/0s66cjl5487fg_fhwgxqd2340000gn/T/Rtmp10xDSi/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘Cairo’ had non-zero exit status
2: In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘scde’ had non-zero exit status
cziegenhain commented 6 years ago

Hi,

It seems like you need to install a X11 environment for your Mac: https://www.xquartz.org/

Cairo should compile fine afterwards.