contributeData: contributeData

Usage Arguments Value Author(s) Examples

Usage

1
contributeData(contribution, project = NULL, keepLocal = FALSE, logFile = TRUE)

Arguments

contribution

Either a list containing properties or annotations for a single study / dataset, a dataframe with each row consisting of a single data entity to contribute, or a character string corresponding to a file name. Within the file should be a matrix with a header row, with each subsequent row consisting of a study / data entity to contribute.

project

The synapse ID corresponding to the project the user wishes to contribute data to.

keepLocal

A logical flag that determines if the data file will be deleted from the local file system once the entity has been created in Synapse.

logFile

A character string corresponding to a filename or set equal to TRUE in which case the log file will be set to a random file name.

Value

Either an entity or list of entities corresponding to the contributed data in synapse.

Author(s)

Brig Mecham <brig.mecham@sagebase.org>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (contribution, project = NULL, keepLocal = FALSE, logFile = TRUE) 
{
    if (logFile == "TRUE") {
        logFile <- .setUpLogFile(logFile)
        cat("log file for this workflow: ", logFile, "\n")
    }
    project <- handleProject(project)
    translatedContribution <- handleContribution(project, contribution, 
        logFile)
    if (class(translatedContribution[[1]]) == "character") {
        layer <- contribute(translatedContribution, keepLocal, 
            logFile)
    }
    else {
        layer <- sapply(translatedContribution, function(x) {
            contribute(x, keepLocal, logFile)
        })
    }
    return(layer)
  }

Sage-Bionetworks/rSCR documentation built on May 9, 2019, 12:13 p.m.