qaProcess.timeline in flowQ won't accept filepath with spaces
0
0
Entering edit mode
hefin_8 • 0
@hefin_8-12773
Last seen 7.6 years ago

I'm trying to get quality control metrics of flow cytometry data using the flowQ package using the code below:

# LOAD PACKAGES AND DATA ----
library(flowCore)
library(flowQ)
data(GvHD)

# CREATE QUALITY CONTROL METRICS ----
cellNum <- qaProcess.cellnumber(GvHD, outdir = getwd(), pdf = FALSE)
marginEvents <- qaProcess.marginevents(GvHD, outdir = getwd(), pdf = FALSE)
timeStab <- qaProcess.timeline(GvHD, outdir = getwd(), pdf = FALSE)

# GENERATE QUALITY CONTROL REPORT AND OPEN ----
qaReport <- writeQAReport(GvHD, outdir = getwd(), processes = list(cellNum, marginEvents, timeStab))
browseURL(qaReport)

My issue is that my working directory (I'm working within an RStudio project) contains spaces, and I get the following errors (which I believe may be related to ImageMagic?):

convert: unable to open image `/home/hefin/Documents/PhD': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: unable to open image `Documents/images/efpGoaJJLP/summary_1.pdf': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open image `/home/hefin/Documents/PhD': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: unable to open image `Documents/images/efpGoaJJLP/summary_2.pdf': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open image `/home/hefin/Documents/PhD': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: unable to open image `Documents/images/efpGoaJJLP/summary_3.pdf': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open image `/home/hefin/Documents/PhD': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: unable to open image `Documents/images/efpGoaJJLP/summary_4.pdf': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open image `/home/hefin/Documents/PhD': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: unable to open image `Documents/images/efpGoaJJLP/summary_5.pdf': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open image `/home/hefin/Documents/PhD': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: unable to open image `Documents/images/efpGoaJJLP/summary_6.pdf': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open image `/home/hefin/Documents/PhD': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: unable to open image `Documents/images/efpGoaJJLP/summary_7.pdf': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: unable to open image `/home/hefin/Documents/PhD': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: no images defined `Documents/images/efpGoaJJLP/summary.pdf' @ error/convert.c/ConvertImageCommand/3210.
Error in .local(.Object, ...) :
  Unable to find file '/home/hefin/Documents/PhD Documents/images/efpGoaJJLP/summary.pdf'
In addition: There were 35 warnings (use warnings() to see them)

This happens whether I type out my working directory in full surrounded by "" or by escaping spaces with \. The html report opens for me, and all of the individual timeline plots are produced, but not the large summary one.

If I provide a filepath with no spaces as a workaround, it works perfectly. Also qaProcess.cellnumber and qaProcess.marginevents have no problem with the same filepath.

My question is therefore, how can I pass a filepath to qaProcess.timeline in a way it can handle?

The output of traceback():

11: stop("Unable to find file '", fileName, "'")
10: .local(.Object, ...)
9: initialize(value, ...)
8: initialize(value, ...)
7: new("qaGraph", ...)
6: qaGraph(fileName = sfile, imageDir = idir, width = max(350, 150 * lp), pdf = pdf)
5: qaProcess.timeline(GvHD, outdir = getwd(), pdf = FALSE) at .active-rstudio-document#9
4: eval(expr, envir, enclos)
3: eval(ei, envir)
2: withVisible(eval(ei, envir))
1: source("~/.active-rstudio-document", echo = TRUE)

The output of sessionInfo():

R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.1

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] tools_3.3.1
flowQ qaProcess.timeline flowcore • 1.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 415 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