Question: qrqc with error message of "unable to start device PNG" and "unable to open connection to X11 display"?
0
gravatar for Sang Chul Choi
7.3 years ago by
Sang Chul Choi230 wrote:
Thank you for the helpful message. I followed it, and it worked. Thank you, SangChul On May 31, 2012, at 10:40 AM, James W. MacDonald wrote: > Hi SangChul, > > On 5/31/2012 9:29 AM, Sang Chul Choi wrote: >> Hi, >> >> Thank you for the helpful replies. >> >> The command line that causes the problem is: >> makeReport(fq.file, outputDir=bwadir) >> from qrqc package. >> >> I do not know what parts in makeReport of qrqc R package cause the problem. Appended are outputs of capabilities() run at the head and compute nodes. A session info at the compute is also following that. >> >> I do not have access to the head node to run makeReport command of qrqc because the command takes too much memory and would cause problems that could affect other users. So, I have to use a compute node. Clearly, the compute nodes capabilities() shows that png cannot be produced. Thank you for the command. It was helpful. >> >> I am not sure whether I have options. What I want to have from my raw RNA-seq data is to plot "per-base sequence quality," one that is shown at >> http://www.bioinformatics.babraham.ac.uk/projects/fastqc/ >> >> I will appreciate if there are other ways. > > There are always other ways. This is R after all. > > First, please note two things. One, the makeReport() function is just a convenience function intended to create an HTML file. If you inspect the HTML template found in the <r-path>/library/qrqc/extdata /fastq-report-template.html, you can see that the plot you are after is produced by qualPlot(). Two, you can assign the results of calling qualPlot() to a variable rather than plotting it outright. > > So you can always do this as a two step process; first do all the computationally intensive steps on the compute node, then create and save all the plots you want. You can then go to the head node where you have the correct capabilities and do the plotting there. > > As an example, using the data that come with the qrqc package: > > First create the plot you want, on the node. > > s.fastq <- readSeqFile(system.file('extdata', 'test.fastq', package='qrqc')) > > toplot <- qualPlot(s.fastq) > > save(list = "toplot", file = "qualPlot.Rdata") > > You could do a whole bunch of different plots, and then save them all using > > save(list = ("firstplot","secondplot","thirdplot"), file = "myplots.Rdata") > > Now move the qualPlot.Rdata file to the head node (or just read it in from the compute node). > > > load("qualPlot.Rdata") > > library(ggplot2) > > plot(toplot) > > ggsave("./qualplot.png") > > Best, > > Jim > >> >> Thank you, >> >> SangChul >> >> I also tried to install cairo. But, it has the following errors when I ran an install command: >>> install.packages("Cairo") >> =================================================== >> checking for FreeType support in cairo... yes >> checking whether FreeType needs additional flags... yes >> checking whether pkg-config knows about fontconfig or freetype2... no >> checking whether fontconfig/freetype2 location can be guessed... no >> configure: error: Cannot find fontconfig/freetype2 although cairo claims to support it. Please check your cairo installation and/or update cairo if necessary or set CAIRO_CFLAGS/CAIRO_LIBS accordingly. >> ERROR: configuration failed for package 'Cairo' >> >> At the head node: >> =================================================== >>> capabilities() >> jpeg png tiff tcltk X11 aqua http/ftp sockets >> TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE >> libxml fifo cledit iconv NLS profmem cairo >> TRUE TRUE TRUE TRUE TRUE FALSE FALSE >> >> At the compute node: >> =================================================== >>> capabilities() >> jpeg png tiff tcltk X11 aqua http/ftp sockets >> FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE >> libxml fifo cledit iconv NLS profmem cairo >> TRUE TRUE TRUE TRUE TRUE FALSE FALSE >> >>> sessionInfo() >> R Under development (unstable) (2012-04-01 r58897) >> Platform: x86_64-unknown-linux-gnu (64-bit) >> >> locale: >> [1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C >> [3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915 >> [5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915 >> [7] LC_PAPER=C LC_NAME=C >> [9] LC_ADDRESS=C LC_TELEPHONE=C >> [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] qrqc_1.10.0 testthat_0.6 Rsamtools_1.8.5 >> [4] GenomicRanges_1.8.6 xtable_1.7-0 brew_1.0-6 >> [7] biovizBase_1.4.2 Biostrings_2.24.1 IRanges_1.14.3 >> [10] BiocGenerics_0.2.0 ggplot2_0.9.1 reshape_0.8.4 >> [13] plyr_1.7.1 >> >> loaded via a namespace (and not attached): >> [1] AnnotationDbi_1.18.1 Biobase_2.16.0 biomaRt_2.12.0 >> [4] bitops_1.0-4.1 BSgenome_1.24.0 cluster_1.14.2 >> [7] colorspace_1.1-1 DBI_0.2-5 dichromat_1.2-4 >> [10] digest_0.5.2 evaluate_0.4.2 GenomicFeatures_1.8.1 >> [13] grid_2.16.0 Hmisc_3.9-3 labeling_0.1 >> [16] lattice_0.20-6 MASS_7.3-18 memoise_0.1 >> [19] munsell_0.3 proto_0.3-9.2 RColorBrewer_1.0-5 >> [22] RCurl_1.91-1 reshape2_1.2.1 RSQLite_0.11.1 >> [25] rtracklayer_1.16.1 scales_0.2.1 stats4_2.16.0 >> [28] stringr_0.6 tools_2.16.0 XML_3.9-4 >> [31] zlibbioc_1.2.0 >> >> >> On May 30, 2012, at 12:06 PM, Dan Tenenbaum wrote: >> >>> Hi SangChul and Jim, >>> >>> On Wed, May 30, 2012 at 6:22 AM, James W. MacDonald<jmacdon at="" uw.edu=""> wrote: >>>> Hi SangChul, >>>> >>>> >>>> On 5/29/2012 4:46 PM, Sang Chul Choi wrote: >>>>> Hi, >>>>> >>>>> I am trying to use qrqc Bioc package in a linux machine used as a compute >>>>> node. I have the following error: >>>>> >>>>> ==================== >>>>> Error in X11(paste("png::", filename, sep = ""), g$width, g$height, >>>>> pointsize, : >>>>> unable to start device PNG >>>>> In addition: Warning message: >>>>> In grDevices::png(..., width = width, height = height, res = dpi, : >>>>> unable to open connection to X11 display '' >>>>> ==================== >>>>> >>>>> I have googled for an answer and bumped into following mailing list posts: >>>>> >>>>> https://stat.ethz.ch/pipermail/r-help/2008-March/155943.html >>>>> https://stat.ethz.ch/pipermail/r-help/2008-February/155021.html >>>>> https://stat.ethz.ch/pipermail/r-help/2008-February/155023.html >>>>> >>>>> It is not obvious what I should do. I will appreciate your answers. >>>> >>>> The simple answer is to run the code on the head rather than a compute node. >>>> In my experience, compute nodes usually don't have 'GUI-type' software >>>> installed (X11, png, etc), as it is not common for people to need that sort >>>> of thing. >>>> >>> If Jim's suggestion to run the relevant computations on your Windows >>> machine does not work out, you can go back on the Linux machine and >>> start R. What is the output of the >>> capabilities() >>> command? >>> And >>> sessionInfo() >>> for that matter? >>> >>> Can you tell what the exact command is that causes the error? >>> Do you need your files to be in png format? >>> >>> If you install the Cairo package: >>> biocLite("Cairo") >>> >>> Does qrqc then work? >>> Is it practical to use bitmap() to generate your png? >>> >>> What Linux distribution are you on? You may want to install Xvfb which >>> should solve the problem, though it can be sort of tricky, according >>> to this somewhat dated page for Ubuntu. >>> http://blog.martin-lyness.com/archives/installing-xvfb-on- ubuntu-9-10-karmic-koala >>> >>> Dan >>> >>> >>> >>> >>>> Best, >>>> >>>> Jim >>>> >>>> >>>> >>>>> Thank you, >>>>> >>>>> SangChul >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at r-project.org >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: >>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>> >>>> -- >>>> James W. MacDonald, M.S. >>>> Biostatistician >>>> University of Washington >>>> Environmental and Occupational Health Sciences >>>> 4225 Roosevelt Way NE, # 100 >>>> Seattle WA 98105-6099 >>>> >>>> >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor at r-project.org >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: >>>> http://news.gmane.org/gmane.science.biology.informatics.conductor > > -- > James W. MacDonald, M.S. > Biostatistician > University of Washington > Environmental and Occupational Health Sciences > 4225 Roosevelt Way NE, # 100 > Seattle WA 98105-6099 >
go qrqc assign • 1.6k views
ADD COMMENTlink written 7.3 years ago by Sang Chul Choi230
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 174 users visited in the last hour