Question: Unable to
0
gravatar for Guest User
6.9 years ago by
Guest User12k
Guest User12k wrote:
Hi there, I am new to Galaxy, and would like to create some tools that use some of my existing R scripts. I have played around with the example code, and have found this to be OK, however I am now having problems creating my own tools to use on Galaxy. My interest is in a user being able to upload a gene expression dataset, and then be able to carry out some functions using Galaxy for gene regulatory network inference and analysis. The first simple tool that I would like to create is a correlation matrix from a gene expression dataset that the user uploads to Galaxy. I have created the .Rd file, called corMat.Rd,which is as follows: \name{corMat} \alias{corMat} \title{a corMat function} \usage{ corMat(inputfile = GalaxyInputFile(), outputfile = GalaxyOutput("mydata"," csv")) } \arguments{ \item{input}{An input dataset} \item{output}{the output} } \description{ A correlation matrix function } \details{ nothing } I then defined the corMat function in R, which is as follows: corMat <- function (inputfile = GalaxyInputFile(), outputfile = GalaxyOutput("mydata", "csv")) { data1 <- tryCatch({ as.matrix(read.delim(inputfile1, row.names = 1)) }, error = function(err) { stop("failed to read first data file: ", conditionMessage(err)) }) data2 <- cor(data1) write.csv(data2, file = outputfile) } To carry this out, I wish to use the cor function in the package WGCNA, so I then have put the following code into R: galaxy( corMat, manpage="/home/adminuser/galaxy-dist/tools/Network/corMat.Rd", package="WGCNA", is.exported="TRUE", version="0.1", name="Correlation Matrix", galaxyConfig=GalaxyConfig( galaxyHome=path.expand("~/galaxy-dist"), toolDir="tools/Network", sectionName="Network", sectionId="NetworkId") ) However, this does not compile, and gives me the error message: Error in newXMLTextNode(title) : CHAR() can only be applied to a 'CHARSXP', not a 'NULL' This error seems to occur when I change the name of the package from RGalaxy to anything else, however I need to change this to WGCNA to specify where to find the function cor that I use in the corMat function I have written for Galaxy. I am obviously making a mistake somewhere, however I cannot see where this error is. Would you be able to help me with this? I can see the power of having a web based user interface that can carry out powerful and intensive biomedical applications in an easy to use format, so am keen to get this to work. Kind regards, Alex -- output of sessionInfo(): R version 2.14.1 (2011-12-22) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel splines tools stats graphics grDevices [7] utils datasets methods base other attached packages: [1] WGCNA_1.25-2 doParallel_1.0.1 iterators_1.0.6 [4] foreach_1.4.0 MASS_7.3-16 reshape_0.8.4 [7] plyr_1.8 cluster_1.14.1 Hmisc_3.10-1 [10] survival_2.36-10 flashClust_1.01-2 dynamicTreeCut_1.21 [13] impute_1.28.0 RGalaxy_1.0.0 digest_0.6.3 [16] optparse_1.0.1 XML_3.95-0.1 loaded via a namespace (and not attached): [1] Biobase_2.14.0 BiocGenerics_0.4.0 brew_1.0-6 [4] codetools_0.2-8 getopt_1.19.0 grid_2.14.1 [7] lattice_0.20-0 roxygen2_2.2.2 stringr_0.6.2 -- Sent via the guest posting facility at bioconductor.org.
network • 769 views
ADD COMMENTlink modified 6.9 years ago by Dan Tenenbaum8.2k • written 6.9 years ago by Guest User12k
Answer: Unable to
0
gravatar for Dan Tenenbaum
6.9 years ago by
Dan Tenenbaum8.2k
United States
Dan Tenenbaum8.2k wrote:
On Tue, Feb 26, 2013 at 8:41 PM, Maintainer <maintainer at="" bioconductor.org=""> wrote: > > Hi there, > > I am new to Galaxy, and would like to create some tools that use some of my existing R scripts. I have played around with the example code, and have found this to be OK, however I am now having problems creating my own tools to use on Galaxy. My interest is in a user being able to upload a gene expression dataset, and then be able to carry out some functions using Galaxy for gene regulatory network inference and analysis. > > The first simple tool that I would like to create is a correlation matrix from a gene expression dataset that the user uploads to Galaxy. I have created the .Rd file, called corMat.Rd,which is as follows: > > \name{corMat} > \alias{corMat} > \title{a corMat function} > \usage{ > corMat(inputfile = GalaxyInputFile(), > outputfile = GalaxyOutput("mydata"," csv")) > } > \arguments{ > \item{input}{An input dataset} > > \item{output}{the output} > } > \description{ > A correlation matrix function > } > \details{ > nothing > } > > > I then defined the corMat function in R, which is as follows: > > corMat <- function (inputfile = GalaxyInputFile(), > outputfile = GalaxyOutput("mydata", "csv")) > { > data1 <- tryCatch({ > as.matrix(read.delim(inputfile1, row.names = 1)) > }, error = function(err) { > stop("failed to read first data file: ", conditionMessage(err)) > }) > > data2 <- cor(data1) > write.csv(data2, file = outputfile) > } > > To carry this out, I wish to use the cor function in the package WGCNA, so I then have put the following code into R: > > galaxy( > corMat, > manpage="/home/adminuser/galaxy-dist/tools/Network/corMat.Rd", > package="WGCNA", > is.exported="TRUE", > version="0.1", > name="Correlation Matrix", > galaxyConfig=GalaxyConfig( > galaxyHome=path.expand("~/galaxy-dist"), > toolDir="tools/Network", > sectionName="Network", > sectionId="NetworkId") > ) > > However, this does not compile, and gives me the error message: > > Error in newXMLTextNode(title) : > CHAR() can only be applied to a 'CHARSXP', not a 'NULL' > > This error seems to occur when I change the name of the package from RGalaxy to anything else, however I need to change this to WGCNA to specify where to find the function cor that I use in the corMat function I have written for Galaxy. I am obviously making a mistake somewhere, however I cannot see where this error is. The 'package' argument to galaxy() is asking you what package your 'Galaxy-enabled' function is in, in this case the function corMat(), which you list above. That function should have library(WGCNA) in its body. >Would you be able to help me with this? I can see the power of having a web based user interface that can carry out powerful and intensive biomedical applications in an easy to use format, so am keen to get this to work. > > > Kind regards, > > Alex > > -- output of sessionInfo(): > > R version 2.14.1 (2011-12-22) RGalaxy should not be run in this version of R. It was part of the Bioconductor 2.11 release, which means it should only be used with R 2.15 or higher. Dan > Platform: i686-pc-linux-gnu (32-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] parallel splines tools stats graphics grDevices > [7] utils datasets methods base > > other attached packages: > [1] WGCNA_1.25-2 doParallel_1.0.1 iterators_1.0.6 > [4] foreach_1.4.0 MASS_7.3-16 reshape_0.8.4 > [7] plyr_1.8 cluster_1.14.1 Hmisc_3.10-1 > [10] survival_2.36-10 flashClust_1.01-2 dynamicTreeCut_1.21 > [13] impute_1.28.0 RGalaxy_1.0.0 digest_0.6.3 > [16] optparse_1.0.1 XML_3.95-0.1 > > loaded via a namespace (and not attached): > [1] Biobase_2.14.0 BiocGenerics_0.4.0 brew_1.0-6 > [4] codetools_0.2-8 getopt_1.19.0 grid_2.14.1 > [7] lattice_0.20-0 roxygen2_2.2.2 stringr_0.6.2 > > -- > Sent via the guest posting facility at bioconductor.org. > > ____________________________________________________________________ ____ > devteam-bioc mailing list > To unsubscribe from this mailing list send a blank email to > devteam-bioc-leave at lists.fhcrc.org > You can also unsubscribe or change your personal options at > https://lists.fhcrc.org/mailman/listinfo/devteam-bioc
ADD COMMENTlink written 6.9 years ago by Dan Tenenbaum8.2k
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: 430 users visited in the last hour