arrayQualityMetrics does not complete successfully
5
1
Entering edit mode
Jan-Niklas ▴ 10
@jan-niklas-9833
Last seen 8.7 years ago

Dear all,

recently I am encountering problems using arrayQualityMetrics. Execution is always stopped at the same point and an error is thrown:

"Error in file.info(x): invalid filename argument"

Figure 1 (Distances between arrays) and Figure 2 (Outlier detection for Distances between arrays) are always created successfully, but nothing more. This happens to me on Ubuntu as well as on OS X.
I tried with different data sets, but nothing worked. I'm calling arrayQualityMetrics() with:

arrayQualityMetrics(raw_data, intgroup = "Group", outdir = quality_report_path, force = T, showWarnings = F)

Error traceback:

14: file.info(x)
13: length.path(paths)
12: length(paths)
11: grobApply(path, function(path) {
        grid.set(path, garnishGrob(grid.get(path), ..., group = group), 
            redraw = redraw)
    }, strict = strict, grep = grep, global = global)
10: grid.garnish(annotationInfo@gridObjId, group = FALSE, grep = TRUE, 
        class = class, onclick = callbacks[, 1], onmouseover = callbacks[, 
            2], onmouseout = callbacks[, 3])
9: annotateSvgGrid(annotationInfo = module@svg, name = name)
8: reportModule(p = p, module = modules[[i]], currentIndex = currentIndex, 
       arrayTable = arrayTableCompact, outdir = outdir)
7: aqm.writereport(modules = m, arrayTable = x$pData, reporttitle = reporttitle, 
       outdir = outdir)
6: arrayQualityMetrics(raw_data, intgroup = "Group", outdir = quality_report_path, 
       force = T, showWarnings = F) at quality_control.r#27
5: eval(expr, envir, enclos)
4: eval(ei, envir)
3: withVisible(eval(ei, envir))
2: source("Src/quality_control.r") at pipeline_structure.r#46
1: run_analysis()

 

Output of sessionInfo():

R version 3.2.2 (2015-08-14)

Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.3 (Yosemite)

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

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

other attached packages:
 [1] hgu133plus2probe_2.18.0    hgu133plus2cdf_2.18.0      plotly_2.0.16              ggplot2_2.0.0              WriteXLS_4.0.0            
 [6] RColorBrewer_1.1-2         gdata_2.17.0               xlsx_0.5.7                 xlsxjars_0.6.1             rJava_0.9-8               
[11] biomaRt_2.26.1             illuminaHumanv4.db_1.26.0  GEOquery_2.36.0            lumi_2.22.1                pd.huex.1.0.st.v2_3.14.1  
[16] oligoData_1.8.0            oligo_1.34.2               Biostrings_2.38.4          XVector_0.10.0             oligoClasses_1.32.0       
[21] hgu133a.db_3.2.2           annaffy_1.42.0             GO.db_3.2.2                affyQCReport_1.48.0        lattice_0.20-33           
[26] affycoretools_1.42.0       affyPLM_1.46.0             preprocessCore_1.32.0      simpleaffy_2.46.0          gcrma_2.42.0              
[31] genefilter_1.52.1          affy_1.48.0                hgu133plus2.db_3.2.2       stringr_1.0.0              pathview_1.10.1           
[36] org.Hs.eg.db_3.2.3         KEGG.db_3.2.2              RSQLite_1.0.0              DBI_0.3.1                  AnnotationDbi_1.32.3      
[41] IRanges_2.4.8              S4Vectors_0.8.11           Biobase_2.30.0             BiocGenerics_0.16.1        limma_3.26.8              
[46] arrayQualityMetrics_3.26.1 BiocInstaller_1.20.1
   

loaded via a namespace (and not attached):
  [1] R.utils_2.2.0              htmlwidgets_0.6            beadarray_2.20.1           grid_3.2.2                 BiocParallel_1.4.3        
  [6] munsell_0.4.3              codetools_0.2-14           nleqslv_3.0                colorspace_1.2-6           BiocInstaller_1.20.1      
 [11] Category_2.36.0            OrganismDbi_1.12.1         knitr_1.12.3               setRNG_2013.9-1            KEGGgraph_1.28.0          
 [16] hwriter_1.3.2              lambda.r_1.1.7             biovizBase_1.18.0          affxparser_1.42.0          R6_2.1.2                  
 [21] GenomeInfoDb_1.6.3         illuminaio_0.12.0          gridSVG_1.5-1              RJSONIO_1.3-0              locfit_1.5-9.1            
 [26] bitops_1.0-6               reshape_0.8.5              RcppArmadillo_0.6.500.4.0  scales_0.4.0               nnet_7.3-12               
 [31] gtable_0.2.0               Cairo_1.5-9                methylumi_2.16.0           ggbio_1.18.5               splines_3.2.2             
 [36] rtracklayer_1.30.2         acepack_1.3-3.3            dichromat_2.0-0            rgl_0.95.1441              reshape2_1.4.1            
 [41] SVGAnnotation_0.93-1       GenomicFeatures_1.22.13    Hmisc_3.17-2               RBGL_1.46.0                tools_3.2.2               
 [46] nor1mix_1.2-1              affyio_1.40.0              gplots_2.17.0              ff_2.2-13                  siggenes_1.44.0           
 [51] Rcpp_0.12.3                plyr_1.8.3                 base64enc_0.1-3            zlibbioc_1.16.0            RCurl_1.95-4.8            
 [56] rpart_4.1-10               viridis_0.3.2              bumphunter_1.10.0          SummarizedExperiment_1.0.2 cluster_2.0.3             
 [61] magrittr_1.5               futile.options_1.0.0       matrixStats_0.50.1         xtable_1.8-2               XML_3.98-1.4              
 [66] mclust_5.1                 gridExtra_2.2.1            ellipse_0.3-8              minfi_1.16.1               KernSmooth_2.23-15        
 [71] htmltools_0.3              ReportingTools_2.10.0      R.oo_1.20.0                GOstats_2.36.0             mgcv_1.8-11               
 [76] corpcor_1.6.8              Formula_1.2-1              geneplotter_1.48.0         MASS_7.3-45                Matrix_1.2-3              
 [81] vsn_3.38.0                 quadprog_1.5-5             R.methodsS3_1.7.1          igraph_1.0.1               GenomicRanges_1.22.4      
 [86] GenomicAlignments_1.6.3    registry_0.3               foreign_0.8-66             foreach_1.4.3              annotate_1.48.0           
 [91] BeadDataPackR_1.22.0       rngtools_1.2.4             pkgmaker_0.22              multtest_2.26.0            beanplot_1.2              
 [96] AnnotationForge_1.12.2     doRNG_1.6                  VariantAnnotation_1.16.4   digest_0.6.9               graph_1.48.0              
[101] base64_1.1                 edgeR_3.12.0               GSEABase_1.32.0            Rsamtools_1.22.0           gtools_3.5.0              
[106] jsonlite_0.9.19            nlme_3.1-125               PFAM.db_3.2.2              mixOmics_5.2.0             futile.logger_1.4.1       
[111] BSgenome_1.38.0            GGally_1.0.1               KEGGREST_1.10.1            httr_1.1.0                 survival_2.38-3           
[116] png_0.1-7                  iterators_1.0.8            bit_1.1-12                 Rgraphviz_2.14.0           stringi_1.0-1             
[121] DESeq2_1.10.1              latticeExtra_0.6-28        caTools_1.17.1  
 

Is anybody experiencing the same problems? Hope someone can help.

Best regards,

Jan-Niklas

arrayqualitymetrics • 4.1k views
ADD COMMENT
1
Entering edit mode

I'm getting the same error.

ADD REPLY
4
Entering edit mode
ian.roberts ▴ 40
@ianroberts-11201
Last seen 8.3 years ago

Hi - I've spent the last 48 hr with this problem and finally tracked it down to a third party package dependency conflict.

For me, this was the length.path function defined in httr package, write-function.R module, ~LN89

Essentially, I had GEOquery and arrayQualityMetrics libraries loaded, and every time I tried to generate a QC report by calling arrayQualityMetrics on my GEO downloaded data it would die with the above error. 

"Error in file.info(x): invalid filename argument", and an incomplete HTML report ... the first 2 plots are generated, but nothing else.

(Short method to recreate error)

> library(arrayQualityMetrics)

> library(httr) 

> load('small_affy_batch.RData')

> z <- arrayQualityMetrics(ab, force=T)

After much back tracking I discovered that gridSVG, an aqm dependency, and httr, a GEOquery dependency both implement length.path, somehow resulting in a conflict (to be sure, I do not understand the exact nature of the error)

I simply added an 's' to the length.path function definition of the httr package (in write-function.R module) and now all is well for my use-case.  Obviously its not a great idea to rename functions at random, however I could not find anywhere that made use of the httr's length.paths ... so for me, no harm done.

Hope this helps.

Ian

 

ADD COMMENT
0
Entering edit mode

Can you tell me how you did this? I don't get it

Here?

length.path <- function(x) file.info(x)$size
#and here
write_stream <- function(f) {
  stopifnot(is.function(f), length(formals(f)) == 1)
  request(output = write_function("write_stream", f = f))

 

 

}

 

 

ADD REPLY
1
Entering edit mode
@wolfgang-huber-3550
Last seen 12 weeks ago
EMBL European Molecular Biology Laborat…

Dear Ian

Thank you for digging into this! This is indeed rather curious, and subtle.

Initially I expected that the code in gridSVG should be shielded from such stray function definitions via R's namespace system, but looking into it, indeed httr has a line S3method(length,path) in its NAMESPACE file, and apparently that method is visible when length(paths) is called within gridSVG (the class of paths is "path") and is unintentionally invoked instead of the default length function, leading to the error.

There is not much I can do at the level of the arrayQualityMetrics package, other than advise not to have the httr package loaded at the same time. And lament on the way how R's handling of the generic function length doesn't work with namespaces.

On another note.... the software technologies used in the arrayQualityMetrics package for the interactive plots are getting dated, and there is limited incentive to maintain them. Someone should implement something like this package, but with Rmarkdown output and ggvis (or plotly?, shiny?). [And a demo for how to look at transformed (DESeq2-VST, edgeR-voom) RNA-Seq count data with the same diagnostics would be a bonus.]

ADD COMMENT
1
Entering edit mode

Yes, here's a minimal example where loading (but not attaching to the search() path) httr leaks the method in an unavoidable way

> length(structure(1:5, class="path"))
[1] 5
> requireNamespace("httr")
Loading required namespace: httr
> length(structure(1:5, class="path"))
Error in file.info(x) : invalid filename argument
> base::length(structure(1:5, class="path"))
Error in file.info(x) : invalid filename argument
ADD REPLY
1
Entering edit mode

Dear Wolfgang,

I know it's a relatively old post, but I just wanted to add to your comment regarding httr, that GEOquery depends on it. So simply doing: unloadNamespace("GEOquery"); unloadNamespace("httr")before running arrayQualityMetrics should do the trick for those of us who work with historic data.

 

ADD REPLY
1
Entering edit mode
fmunoz ▴ 10
@fmunoz-11835
Last seen 8.0 years ago

Here is the issue in the package https://github.com/hadley/httr/issues/395

ADD COMMENT
0
Entering edit mode
Stane ▴ 40
@stane-10974
Last seen 6.9 years ago

Did someone find a fix, I have been trying to debug the exact same problem today, in my case paths is a gpath object :

> attributes(paths)
$names
[1] "path" "name" "n"   

$class
[1] "gPath" "path" 

$vpPath
[1] ""
>paths$name
[1] "plot_01.xyplot.points.panel.1.1"

I am not to familiar with grid package but creating a gPath inside length function result in the exact same error 

> length(gPath("g1"))
Error in file.info(x) : invalid filename argument
ADD COMMENT
0
Entering edit mode
@sofiafigueiredo-11041
Last seen 8.2 years ago

Dear Bioconductor community,

I am having exactly the same problem.

> celfiles <- rma (read.celfiles (list) )
> arrayQualityMetrics (expressionset=celfiles, outdir="Report for celfile RMA", force=TRUE)
The report will be written into directory 'Report for celfile RMA'. 
Error in file.info(x) : invalid filename argument

Does anyone know why this happens and how to fix it? Can it be that the normalized cel files are somehow corrupted?

Many thanks in advance,

Sofia

My session info:

sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

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

other attached packages:
 [1] pathview_1.12.0            org.Hs.eg.db_3.3.0         AnnotationDbi_1.34.3       arrayQualityMetrics_3.28.2 pd.hugene.2.0.st_3.14.1   
 [6] oligo_1.36.1               RSQLite_1.0.0              DBI_0.4-1                  Biostrings_2.40.2          XVector_0.12.0            
[11] Biobase_2.32.0             oligoClasses_1.34.0        GenomicRanges_1.24.2       GenomeInfoDb_1.8.2         IRanges_2.6.1             
[16] S4Vectors_0.10.1           BiocGenerics_0.18.0        BiocInstaller_1.22.3      

loaded via a namespace (and not attached):
 [1] httr_1.2.1                 vsn_3.40.0                 splines_3.3.1              foreach_1.4.3              setRNG_2013.9-1           
 [6] Formula_1.2-1              affy_1.50.0                latticeExtra_0.6-28        gcrma_2.44.0               lattice_0.20-33           
[11] limma_3.28.14              chron_2.3-47               RColorBrewer_1.1-2         colorspace_1.2-6           preprocessCore_1.34.0     
[16] Matrix_1.2-6               plyr_1.8.4                 XML_3.98-1.4               affxparser_1.44.0          genefilter_1.54.2         
[21] zlibbioc_1.18.0            xtable_1.8-2               scales_0.4.0               affyio_1.42.0              ff_2.2-13                 
[26] openssl_0.9.4              annotate_1.50.0            SVGAnnotation_0.93-1       KEGGREST_1.12.2            ggplot2_2.1.0             
[31] SummarizedExperiment_1.2.3 nnet_7.3-12                survival_2.39-5            RJSONIO_1.3-0              magrittr_1.5              
[36] KEGGgraph_1.30.0           hwriter_1.3.2              foreign_0.8-66             beadarray_2.22.2           Cairo_1.5-9               
[41] graph_1.50.0               tools_3.3.1                data.table_1.9.6           stringr_1.0.0              affyPLM_1.48.0            
[46] munsell_0.4.3              cluster_2.0.4              base64_2.0                 grid_3.3.1                 iterators_1.0.8           
[51] gtable_0.2.0               codetools_0.2-14           R6_2.1.2                   BeadDataPackR_1.24.2       reshape2_1.4.1            
[56] illuminaio_0.14.0          gridExtra_2.2.1            bit_1.1-12                 Hmisc_3.17-4               gridSVG_1.5-0             
[61] Rgraphviz_2.16.0           stringi_1.1.1              Rcpp_0.12.5                png_0.1-7                  rpart_4.1-10              
[66] acepack_1.3-3.3           

 

ADD COMMENT
0
Entering edit mode

I am getting the same error. Can anyone please fix the problem??

ADD REPLY

Login before adding your answer.

Traffic: 763 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6