Skip to content

orca error #1322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Schuch666 opened this issue Aug 10, 2018 · 13 comments
Closed

orca error #1322

Schuch666 opened this issue Aug 10, 2018 · 13 comments

Comments

@Schuch666
Copy link

orca function works with the Rpackage Examples code:

p <- plot_ly(z = ~volcano) %>% add_surface()
orca(p, "surface-plot.png")

but with a slightly larger dataset (dataframe with date and 1 variable with 8784 observations) test.zip

test <- readRDS("test.Rds")
p <- plot_ly(x = test$date, y = test$no, type = "scatter", mode = "lines")
orca(p,"test.png")

returns the following error:

Error in process_initialize(self, private, command, args, stdout, stderr, :
processx error, create process: #206 Filename or extension is too long.
at 'win/processx.c:761

but p plots fine on RStudio... how to avoid this BUG / limitation?

@cpsievert
Copy link
Collaborator

Thanks, fixed via c4f1001

@Schuch666
Copy link
Author

Thank you @cpsievert

@0navarro
Copy link

0navarro commented Oct 9, 2018

I am having this same issue using Orca's Windows release 1.1.1. Does this release include the bugfix mentioned above?

@cpsievert
Copy link
Collaborator

It shoud be fixed on the master branch: devtools::install_github("ropensci/plotly")

@0navarro
Copy link

0navarro commented Oct 9, 2018

Thanks @cpsievert

@wasimaftab
Copy link

I just installed plotly using "devtools::install_github("ropensci/plotly")"
packageVersion('plotly')
[1] ‘4.8.0.9000’
I still get this error
Any idea?

@ndrubins
Copy link

Same here,

My sessionInfo() is:

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] plotly_4.8.0.9000 webshot_0.5.1     dplyr_0.7.8       bindrcpp_0.2.2    ggplot2_3.1.0    

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0         RColorBrewer_1.1-2 git2r_0.23.0       pillar_1.3.0       compiler_3.5.1     later_0.7.5        plyr_1.8.4        
 [8] bindr_0.1.1        tools_3.5.1        digest_0.6.18      memoise_1.1.0      jsonlite_1.6       tibble_1.4.2       gtable_0.2.0      
[15] viridisLite_0.3.0  pkgconfig_2.0.2    rlang_0.3.0.1      shiny_1.2.0        rstudioapi_0.8     crosstalk_1.0.1    curl_3.2          
[22] yaml_2.2.0         withr_2.1.2        httr_1.4.0         devtools_1.13.6    htmlwidgets_1.3    grid_3.5.1         tidyselect_0.2.5  
[29] glue_1.3.0         data.table_1.11.8  R6_2.3.0           processx_3.2.0     purrr_0.2.5        tidyr_0.8.2        magrittr_1.5      
[36] ps_1.1.0           promises_1.0.1     scales_1.0.0       htmltools_0.3.6    assertthat_0.2.0   xtable_1.8-3       mime_0.6          
[43] colorspace_1.3-2   httpuv_1.4.5       lazyeval_0.2.1     munsell_0.5.0      crayon_1.3.4   

Right before installing plotly (using devtools::install_github("ropensci/plotly"), I installed the orca utility which required the mapbox token to be set as and env).

@cpsievert
Copy link
Collaborator

Please report devtools::session_info() instead of sessionInfo()

@ndrubins
Copy link

Sure:

> devtools::session_info()
Session info -------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.1.456)           
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/Los_Angeles         
 date     2018-12-17                  

Packages -----------------------------------------------------------------------------------------------------------------
 package     * version    date       source                          
 assertthat    0.2.0      2017-04-11 CRAN (R 3.5.0)                  
 base        * 3.5.1      2018-07-05 local                           
 bindr         0.1.1      2018-03-13 cran (@0.1.1)                   
 bindrcpp      0.2.2      2018-03-29 cran (@0.2.2)                   
 colorspace    1.3-2      2016-12-14 cran (@1.3-2)                   
 compiler      3.5.1      2018-07-05 local                           
 crayon        1.3.4      2017-09-16 cran (@1.3.4)                   
 data.table    1.11.8     2018-09-30 cran (@1.11.8)                  
 datasets    * 3.5.1      2018-07-05 local                           
 devtools      1.13.6     2018-06-27 CRAN (R 3.5.0)                  
 digest        0.6.18     2018-10-10 CRAN (R 3.5.0)                  
 dplyr       * 0.7.8      2018-11-10 cran (@0.7.8)                   
 ggplot2     * 3.1.0      2018-10-25 cran (@3.1.0)                   
 glue          1.3.0      2018-07-17 cran (@1.3.0)                   
 graphics    * 3.5.1      2018-07-05 local                           
 grDevices   * 3.5.1      2018-07-05 local                           
 grid          3.5.1      2018-07-05 local                           
 gtable        0.2.0      2016-02-26 cran (@0.2.0)                   
 htmltools     0.3.6      2017-04-28 cran (@0.3.6)                   
 htmlwidgets   1.3        2018-09-30 cran (@1.3)                     
 httr          1.4.0      2018-12-11 cran (@1.4.0)                   
 jsonlite      1.6        2018-12-07 cran (@1.6)                     
 lazyeval      0.2.1      2017-10-29 cran (@0.2.1)                   
 magrittr      1.5        2014-11-22 CRAN (R 3.5.0)                  
 memoise       1.1.0      2017-04-21 CRAN (R 3.5.0)                  
 methods     * 3.5.1      2018-07-05 local                           
 munsell       0.5.0      2018-06-12 cran (@0.5.0)                   
 pillar        1.3.0      2018-07-14 cran (@1.3.0)                   
 pkgconfig     2.0.2      2018-08-16 CRAN (R 3.5.0)                  
 plotly      * 4.8.0.9000 2018-12-17 Github (ropensci/plotly@c6b8a5d)
 plyr          1.8.4      2016-06-08 cran (@1.8.4)                   
 processx      3.2.0      2018-08-16 CRAN (R 3.5.0)                  
 ps            1.1.0      2018-08-10 CRAN (R 3.5.0)                  
 purrr         0.2.5      2018-05-29 cran (@0.2.5)                   
 R6            2.3.0      2018-10-04 CRAN (R 3.5.0)                  
 Rcpp          1.0.0      2018-11-07 cran (@1.0.0)                   
 rlang         0.3.0.1    2018-10-25 cran (@0.3.0.1)                 
 rstudioapi    0.8        2018-10-02 CRAN (R 3.5.0)                  
 scales        1.0.0      2018-08-09 cran (@1.0.0)                   
 stats       * 3.5.1      2018-07-05 local                           
 tibble        1.4.2      2018-01-22 cran (@1.4.2)                   
 tidyr         0.8.2      2018-10-28 cran (@0.8.2)                   
 tidyselect    0.2.5      2018-10-11 cran (@0.2.5)                   
 tools         3.5.1      2018-07-05 local                           
 utils       * 3.5.1      2018-07-05 local                           
 viridisLite   0.3.0      2018-02-01 cran (@0.3.0)                   
 webshot     * 0.5.1      2018-09-28 CRAN (R 3.5.0)                  
 withr         2.1.2      2018-03-15 CRAN (R 3.5.0)                  
 yaml          2.2.0      2018-07-25 cran (@2.2.0)                   

Thanks a lot.

@cpsievert
Copy link
Collaborator

Also, a reproducible example, if possible. Thanks.

@ndrubins
Copy link

Thanks a lot for the quick response.

Here's an example where I build a (sparse) heatmap and add to it a column dendrogram:

library(ggplot2)
library(dplyr)
library(plotly)

#build the heatmap data.frame
row.text <- strsplit("ALLOGRAFT_REJECTION,APICAL_SURFACE,APOPTOSIS,EPITHELIAL_MESENCHYMAL_TRANSITION,ESTROGEN_RESPONSE_EARLY,HYPOXIA,IL2_STAT5_SIGNALING,IL6_JAK_STAT3_SIGNALING,INFLAMMATORY_RESPONSE,INTERFERON_ALPHA_RESPONSE,INTERFERON_GAMMA_RESPONSE,KRAS_SIGNALING_DN,KRAS_SIGNALING_UP,MYC_TARGETS_V1,P53_PATHWAY,PI3K_AKT_MTOR_SIGNALING,PROTEIN_SECRETION,TNFA_SIGNALING_VIA_NFKB,UV_RESPONSE_UP,ALLOGRAFT_REJECTION,APICAL_SURFACE,APOPTOSIS,EPITHELIAL_MESENCHYMAL_TRANSITION,ESTROGEN_RESPONSE_EARLY,HYPOXIA,IL2_STAT5_SIGNALING,IL6_JAK_STAT3_SIGNALING,INFLAMMATORY_RESPONSE,INTERFERON_ALPHA_RESPONSE,INTERFERON_GAMMA_RESPONSE,KRAS_SIGNALING_DN,KRAS_SIGNALING_UP,MYC_TARGETS_V1,P53_PATHWAY,PI3K_AKT_MTOR_SIGNALING,PROTEIN_SECRETION,TNFA_SIGNALING_VIA_NFKB,UV_RESPONSE_UP,ALLOGRAFT_REJECTION,APICAL_SURFACE,APOPTOSIS,EPITHELIAL_MESENCHYMAL_TRANSITION,ESTROGEN_RESPONSE_EARLY,HYPOXIA,IL2_STAT5_SIGNALING,IL6_JAK_STAT3_SIGNALING,INFLAMMATORY_RESPONSE,INTERFERON_ALPHA_RESPONSE,INTERFERON_GAMMA_RESPONSE,KRAS_SIGNALING_DN,KRAS_SIGNALING_UP,MYC_TARGETS_V1,P53_PATHWAY,PI3K_AKT_MTOR_SIGNALING,PROTEIN_SECRETION,TNFA_SIGNALING_VIA_NFKB,UV_RESPONSE_UP,ALLOGRAFT_REJECTION,APICAL_SURFACE,APOPTOSIS,EPITHELIAL_MESENCHYMAL_TRANSITION,ESTROGEN_RESPONSE_EARLY,HYPOXIA,IL2_STAT5_SIGNALING,IL6_JAK_STAT3_SIGNALING,INFLAMMATORY_RESPONSE,INTERFERON_ALPHA_RESPONSE,INTERFERON_GAMMA_RESPONSE,KRAS_SIGNALING_DN,KRAS_SIGNALING_UP,MYC_TARGETS_V1,P53_PATHWAY,PI3K_AKT_MTOR_SIGNALING,PROTEIN_SECRETION,TNFA_SIGNALING_VIA_NFKB,UV_RESPONSE_UP,ALLOGRAFT_REJECTION,APICAL_SURFACE,APOPTOSIS,EPITHELIAL_MESENCHYMAL_TRANSITION,ESTROGEN_RESPONSE_EARLY,HYPOXIA,IL2_STAT5_SIGNALING,IL6_JAK_STAT3_SIGNALING,INFLAMMATORY_RESPONSE,INTERFERON_ALPHA_RESPONSE,INTERFERON_GAMMA_RESPONSE,KRAS_SIGNALING_DN,KRAS_SIGNALING_UP,MYC_TARGETS_V1,P53_PATHWAY,PI3K_AKT_MTOR_SIGNALING,PROTEIN_SECRETION,TNFA_SIGNALING_VIA_NFKB,UV_RESPONSE_UP",split=",")[[1]]
col.text <- strsplit("APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,APC.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,B-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,T-cell.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Neutrophil.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm,Splenic-monocyte.nnn.vs.mmmmm",split=",")[[1]]
vals <- as.numeric(strsplit("1.82390874094432,NA,NA,1.72124639904717,NA,1.69897000433602,1.34678748622466,NA,2.74472749489669,3.76955107862173,3.76955107862173,NA,1.72124639904717,1.3767507096021,1.3767507096021,NA,NA,3.76955107862173,1.72124639904717,NA,NA,NA,NA,NA,NA,NA,NA,NA,3.60205999132796,3.60205999132796,NA,NA,NA,NA,NA,NA,NA,NA,2.20760831050175,NA,2.20760831050175,NA,NA,NA,NA,NA,NA,3.30102999566398,1.69897000433602,1.48148606012211,NA,NA,NA,NA,NA,NA,NA,2.72124639904717,NA,3.60205999132796,2.36653154442041,1.55284196865778,3.13667713987954,2.46852108295775,2.74472749489669,3.13667713987954,2.72124639904717,2.46852108295775,2.29242982390206,NA,NA,NA,2.72124639904717,1.3767507096021,3.60205999132796,NA,NA,1.30980391997149,NA,NA,NA,1.30980391997149,NA,NA,NA,1.79588001734408,NA,NA,NA,NA,NA,NA,NA,NA,1.30980391997149",split=",")[[1]])
plot.df <- data.frame(row = row.text, column = col.text, value = vals)

#build the column dendrogram, via clustering
plot.mat <- reshape2::acast(plot.df,column ~ row)
col.hc <- cluster::agnes(plot.mat,diss=FALSE,method="complete")
sorted.col.hc <- dendsort::dendsort(as.hclust(col.hc))
col.dend <- as.dendrogram(sorted.col.hc)
col.dendex <- dendextend::as.ggdend(col.dend)
leaf.heights <- dplyr::filter(col.dendex$nodes,!is.na(leaf))$height
leaf.xs <- dplyr::filter(col.dendex$nodes,!is.na(leaf))$x
leaf.seqments.idx <- which(col.dendex$segments$yend %in% leaf.heights & col.dendex$segments$x %in% leaf.xs)
col.dendex$segments$yend[leaf.seqments.idx] <- max(col.dendex$segments$yend[leaf.seqments.idx])
col.dendex$segments$col[leaf.seqments.idx] <- "black"
col.dendex$labels$label <- ""
col.dendex$labels$y <- max(col.dendex$segments$yend[leaf.seqments.idx])
col.dendex$labels$x <- col.dendex$segments$x[leaf.seqments.idx]
col.dendex$labels$col <- "black"
col.dendex$segments$lwd <- 0.5
col.ggdend <- ggplot(col.dendex,labels=F)+guides(fill=F)+theme_minimal()+
  theme(axis.title=element_blank(),axis.text=element_blank(),axis.ticks=element_blank(),panel.grid=element_blank(),legend.position="none",legend.text=element_blank(),legend.background=element_blank(),legend.key=element_blank())

legend.title <- "-log10(Q-value)"
color.vec <- c("black","yellow")

#build the heatmap
p <- plot_ly(z=c(plot.df$value),x=plot.df$column,y=plot.df$row,colors=grDevices::colorRamp(color.vec),type="heatmap",colorbar=list(title=legend.title,len=0.4)) %>%
  layout(yaxis=list(title=NULL),xaxis=list(title=NULL))

#add the dendrogram
p <- plotly::subplot(col.ggdend,plotly::plotly_empty(),p %>% plotly::layout(showlegend = F),nrows=2,margin=c(0,0,0,0),heights=c(0.2,0.8),widths=c(0.8,0.2))

I'm able to view the image of the heatmap + dendrogram on the RStudio viewer. However, when I try to save it to a pdf using:
plotly::orca(p, file="p.pdf")

I get the error:

done with code 1 in 41.38 sec - failed or incomplete task(s)
Error in processx::run("orca", args, echo = TRUE, spinner = TRUE, ...) : 
  System command error

Thanks a lot.

@cpsievert
Copy link
Collaborator

Thanks. I thikn this may be due to another issue, could you file a new one?

@ndrubins
Copy link

Just did.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants