Project Agnostic ELITE VEOIBD
Project Agnostic ELITE VEOIBD
Breadcrumbs

Upload Data Using Synapse R Client

Requirements

  • R version 4.1.3 or higher

  • Python version 3.8 or higher

  • Reticulate version 1.28 or lower

  • You are a certified user on Synapse

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:

    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

# 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)