galaxy: Make a function available in Galaxy

Description Usage Arguments Value See Also Examples

Description

Makes an R function available in the Galaxy web platform. Automates all the work necessary to expose an R function in Galaxy. See the vignette for more information

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
galaxy(func, 
        package=getPackage(func),
        manpage=func, 
        name=getFriendlyName(func),
        version=getVersion(func),
        galaxyConfig,
        dirToRoxygenize,
        RserveConnection=NULL,
        path.to.R="",
        functionalTestDirectory)

Arguments

func

Required. TA character vector naming the function to make available in Galaxy. This function should be entirely-self contained, and should accept as arguments the full paths to its input and output file(s).

package

The name of the package where func lives, or NULL if it is not in a package. By default, RGalaxy will try to determine which package the code lives in and set the parameter to NULL if it cannot.

manpage

The full path to the Rd-formatted manual page for the function, or if the func is in a package, an alias that will pull up that manpage.

name

Text describe the action this function performs. Becomes a clickable link in Galaxy. By default, if your function is called "fooBar", name is set to "Foo Bar".

version

The version of this function. If func lives in a package, defaults to the version of package.

galaxyConfig

Required. A link{GalaxyConfig} object describing your Galaxy configuration.

dirToRoxygenize

If present, points to the directory of a source package upon which to run roxygenize() from the roxygen2 package, creating manual pages from source code comments.

RserveConnection

If set (by calling RserveConnection), sends the function to a running Rserve for evaluation. This can make functions run faster since dependencies have already been loaded. If NULL (the default), function is run normally. See vignette for more information.

path.to.R

If not empty, Galaxy will look for R in this directory. This is useful if there are multiple versions of R on your system and your Galaxy configuration prevents you from setting your PATH to point to the right one.

functionalTestDirectory

If package is not specified, this directory is searched for functional test fixtures.

Value

invisible(NULL)

See Also

GalaxyConfig, GalaxyOutput, GalaxyParam

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## set up galaxyHome (you don't need to do this if 
## you really have Galaxy installed)
galaxyHome <- tempdir()
dir.create(galaxyHome, recursive=TRUE, showWarnings=FALSE)
file.copy(system.file("galaxy", "tool_conf.xml", package="RGalaxy"),
    file.path(galaxyHome, "tool_conf.xml"), overwrite=FALSE)

## Not run: 
galaxy("functionToGalaxify",
    galaxyConfig=GalaxyConfig(galaxyHome, "mytool",
      "Test Section", "testSectionId"),
    RserveConnection=RserveConnection())

## End(Not run)

dtenenba/RGalaxy2 documentation built on May 15, 2019, 4:54 p.m.