Skip to main content
Skip table of contents

Upload Data Using Synapse R Client

Requirements

Step-by-Step

This option would typically be most suitable for upload of files residing on a cloud or your local machine; and in case of uploading large-number and/or large-size files.

You can modify the R code vignette below for your particular dataset upload. For more details, please refer to the synapser user guide.

For equivalent functionality in Python or the command line interface, please refer to the Synapse documentation.

  1. To get started, install the Synapse R client:

    CODE
    install.packages("synapser", repos=c("http://ran.synapse.org", "http://cran.fhcrc.org"))
  2. To upload a dataset from a local folder to a Synapse storage location, you can modify the script below

CODE
# Load the package
library(synapser)

# Log in to synapse
synLogin(authToken=<PAT>)

# Add a local file to an existing project (syn12345) on Synapse
file <- File(path='/path/to/raw_data.txt', parentId='syn12345')
file <- synStore(file)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.