arrayQualityMetrics: "All SVG style attribute must have length 1" and other errors
Entering edit mode
Paulo Nuin ▴ 200
Last seen 7.5 years ago




I am trying to run arrayQualityMetrics on a number of samples (CEL files) and encountering the same error on two different machines with fresh installs of Bioconductor and arrayQualityMetrics, one with R 3.1.1 and another with 3.1.2 on Macs. The sessionInfo() of the 3.1.1 machine is as follow 

R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)

[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

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

other attached packages:
 [1] pd.hugene.2.0.st_3.10.0    RSQLite_1.0.0             
 [3] DBI_0.3.1                  oligo_1.30.0              
 [5] Biostrings_2.34.1          XVector_0.6.0             
 [7] IRanges_2.0.1              S4Vectors_0.4.0           
 [9] Biobase_2.26.0             oligoClasses_1.28.0       
[11] BiocGenerics_0.12.1        arrayQualityMetrics_3.22.0
[13] BiocInstaller_1.16.1      

loaded via a namespace (and not attached):
 [1] acepack_1.3-3.3       affxparser_1.38.0     affy_1.44.0          
 [4] affyio_1.34.0         affyPLM_1.42.0        annotate_1.44.0      
 [7] AnnotationDbi_1.28.1  base64_1.1            beadarray_2.16.0     
[10] BeadDataPackR_1.18.0  bit_1.1-12            Cairo_1.5-6          
[13] cluster_1.15.3        codetools_0.2-9       colorspace_1.2-4     
[16] ff_2.2-13             foreach_1.4.2         foreign_0.8-61       
[19] Formula_1.1-2         gcrma_2.38.0          genefilter_1.48.1    
[22] GenomeInfoDb_1.2.4    GenomicRanges_1.18.3  grid_3.1.1           
[25] gridSVG_1.4-2         Hmisc_3.14-6          hwriter_1.3.2        
[28] illuminaio_0.8.0      iterators_1.0.7       lattice_0.20-29      
[31] latticeExtra_0.6-26   limma_3.22.1          nnet_7.3-8           
[34] plyr_1.8.1            preprocessCore_1.28.0 RColorBrewer_1.1-2   
[37] Rcpp_0.11.3           reshape2_1.4.1        RJSONIO_1.3-0        
[40] rpart_4.1-8           setRNG_2013.9-1       splines_3.1.1        
[43] stringr_0.6.2         survival_2.37-7       SVGAnnotation_0.93-1 
[46] tools_3.1.1           vsn_3.34.0            XML_3.98-1.1         
[49] xtable_1.7-4          zlibbioc_1.12.0      

Basically I am running oligo to read the files and calling arrayQualityMetrics just after



mydata <- read.celfiles(filenames = list.celfiles())

arrayQualityMetrics(expressionset = mydata, force = T, do.logtransform = T)

The error when running arrayQualityMetrics the first time gives

The directory 'arrayQualityMetrics report for mydata' has been created. Error in svgStyleAttributes(style) : All SVG style attribute values must have length 1​

and when running a second time

Error in gridsvg(name = "arrayQualityMetrics report for mydata/pca.svg",  :
  Only one 'gridsvg' device may be used at a time
In addition: Warning message:
closing unused connection 3 (arrayQualityMetrics report for mydata/index.html) 

Traceback is as follows:

7: stop("Only one 'gridsvg' device may be used at a time")
6: gridsvg(name = "arrayQualityMetrics report for mydata/pca.svg",
       width = 4.44721359549996, height = 4.44721359549996, res = 72,
       prefix = paste("Fig", "pca", sep = ":"), usePaths = "none")
5: eval(expr, envir, enclos)
4: eval(substitute(gridsvg(name = path, width = w, height = h, res = dpi,
       prefix = paste("Fig", name, sep = ":"), usePaths = "none")))
3: reportModule(p = p, module = modules[[i]], currentIndex = currentIndex,
       arrayTable = arrayTableCompact, outdir = outdir)
2: aqm.writereport(modules = m, arrayTable = x$pData, reporttitle = reporttitle,
       outdir = outdir)
1: arrayQualityMetrics(expressionset = mydata, do.logtransform = T,
       force = T)​

Any help appreciated.


arrayqualitymetrics svg software error • 2.9k views
Entering edit mode

The second error you got is simply a consequence of that fact that the device was not closed due to the first error, and a feature of gridsvg to limit the number of open devices to 1.

And btw, the eval(substitute(...)) in the above frame 4 looks like ugly code but seems currently the least-worst to avoid a weird interaction between argument processing in gridsvg and lazy evaluation.

Entering edit mode
Last seen 6 days ago
EMBL European Molecular Biology Laborat…

Dear Paulo

the problem is fixed by using gridSVG >= 1.4-3 (thanks to Paul Murrell for his quick response!). Currently this can be obtained from R-Forge, eventually also from CRAN. Let me know whether this works for you.




Entering edit mode

I'm getting the same error using gridSVG_1.5-1. Do you know how can I correct this ?

Entering edit mode

Installed from source and it works fine now. Just a guide to whoever is having the same error:

svn checkout svn://

cd gridsvg

tar -czvf gridsvg.tar.gz pkg/


and install from the generated package.


Entering edit mode

Hi Wolfgang, 

It looks like the error: "Only one 'gridsvg' device may be used at a time" has re-emerged for the most current versions: gridSVG_1.5-1, arrayQualityMetrics_3.32.0 on R version 3.4.1.

I am only able to produce the following files: heatmap (hm), outlier heatmap (out hm), index, .css, .js, before the error pops out while ploting the pca.

GSE58644 <- getGEO('GSE58644', GSEMatrix = TRUE)[[1]]
arrayQualityMetrics(expressionset = GSE58644, force = TRUE, do.logtransform = FALSE)

Error in gridsvg(name = "arrayQualityMetrics report for GSE58644/pca.svg",  : 
  Only one 'gridsvg' device may be used at a time

R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.5

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.4/Resources/lib/libRlapack.dylib

[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] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] arrayQualityMetrics_3.32.0 GEOquery_2.42.0            Biobase_2.36.2             BiocGenerics_0.22.0        BiocInstaller_1.26.0      

loaded via a namespace (and not attached):
 [1] httr_1.2.1              vsn_3.44.0              bit64_0.9-7             jsonlite_1.5            splines_3.4.1          
 [6] setRNG_2013.9-1         Formula_1.2-2           affy_1.54.0             stats4_3.4.1            latticeExtra_0.6-28    
[11] blob_1.1.0              GenomeInfoDbData_0.99.0 gcrma_2.48.0            RSQLite_2.0             backports_1.1.0        
[16] lattice_0.20-35         limma_3.32.3            digest_0.6.12           GenomicRanges_1.28.4    RColorBrewer_1.1-2     
[21] XVector_0.16.0          checkmate_1.8.3         colorspace_1.3-2        htmltools_0.3.6         preprocessCore_1.38.1  
[26] Matrix_1.2-10           plyr_1.8.4              XML_3.98-1.9            genefilter_1.58.1       zlibbioc_1.22.0        
[31] xtable_1.8-2            scales_0.4.1            affyio_1.46.0           openssl_0.9.6           htmlTable_1.9          
[36] tibble_1.3.3            annotate_1.54.0         SVGAnnotation_0.93-1    IRanges_2.10.2          ggplot2_2.2.1          
[41] nnet_7.3-12             lazyeval_0.2.0          survival_2.41-3         magrittr_1.5            memoise_1.1.0          
[46] hwriter_1.3.2           foreign_0.8-69          beadarray_2.26.1        Cairo_1.5-9             tools_3.4.1            
[51] data.table_1.10.4       stringr_1.2.0           affyPLM_1.52.1          S4Vectors_0.14.3        munsell_0.4.3          
[56] cluster_2.0.6           base64_2.0              AnnotationDbi_1.38.1    Biostrings_2.44.1       compiler_3.4.1         
[61] GenomeInfoDb_1.12.2     rlang_0.1.1             grid_3.4.1              RCurl_1.95-4.8          htmlwidgets_0.9        
[66] bitops_1.0-6            base64enc_0.1-3         gtable_0.2.0            codetools_0.2-15        DBI_0.7                
[71] BeadDataPackR_1.28.0    reshape2_1.4.2          R6_2.2.2                illuminaio_0.18.0       gridExtra_2.2.1        
[76] knitr_1.16              bit_1.1-12              Hmisc_4.0-3             gridSVG_1.5-1           stringi_1.1.5          
[81] Rcpp_0.12.11            rpart_4.1-11            acepack_1.4.1       
Entering edit mode


When I run your example code I actually get a different error:

Error in : invalid filename argument

If I then run it again I then see

Only one 'gridsvg' device may be used at a time

which is presumably because it didn't close the device properly during the first run.  Can you just confirm for me  if you see the same behaviour.  I don't want to go chasing a bug in gridSVG if the problem lies elsewhere in arrayQualityMetrics.



Entering edit mode

Mike you are correct, I restarted R Studio and cleared my workspace, the actual error is:

Error in : invalid filename argument

arrayQualityMetrics produces the output folder and the following files: heatmap (hm), outlier heatmap (out hm), index, .css, .js before this error is produced. The 'Only one 'gridsvg' device may be used at a time error' comes up only if I rerun.

I encountered the '' error before but assumed it was because I incorrectly supplied an output directory, I then removed that argument, cleared my workshpace with rm(list=ls()) and ran arrayQualityMetrics again with default settings and then encountered the gridsvg error. I see  now that simply clearing the workspace did not shut down the device properly;  if I restart R Studio and rerun the code, the problem is with arrayQualityMetrics producing the  'Error in : invalid filename argument'

I have found another thread that addresses the '' error and the exact problem I'm encountering: arrayQualityMetrics does not complete successfully


Entering edit mode
Stane ▴ 40
Last seen 4.5 years ago

I recently got the same error and use == "gridsvg")) to make it work  

Entering edit mode
Last seen 6 days ago
EMBL European Molecular Biology Laborat…

Dear Paulo

thank you for your report! In fact the same problem occurs now on the build servers, both in release ( ) and devel ( ). I'll explore and get back with, hopefully, a solution.

The problem seems to be an interaction of the gridSVG and lattice packages, I reproduced it with the following small example:



df = data.frame(x=1:10, y=1:10, which=factor(rep(1:2, each=5)))
p1 = xyplot(y~x, groups=which, data=df, type = "l")

gridsvg(name = "test1.svg")

# Error in svgStyleAttributes(style) :
#  All SVG style attribute values must have length 1

I contacted the maintainer of gridSVG as well as the author of gridSVG::gridsvg.




Best wishes


Entering edit mode

Thanks a lot. 

Entering edit mode

In the mean time, is there a way to request only .PNG and .PDF output to avoid the .SVG error? I have the same errors as above.


Login before adding your answer.

Traffic: 377 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6