Skip to content
R package for Synapse utilities
R Shell Python
Branch: master
Clone or download
kimyen Merge pull request #18 from Sage-Bionetworks/v0.1-rc
Release v0.1.6 with binary for R v3.6
Latest commit 2b9ab46 May 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R fix dependencies Apr 13, 2018
auto-man refactor Mar 13, 2018
inst/python update docs Apr 4, 2018
man from code review Apr 4, 2018
tools fix dependencies Apr 13, 2018
.Rbuildignore init Feb 21, 2018
.gitignore init Feb 21, 2018
DESCRIPTION Version 0.1.6 is succesfully built on 2019-05-31 May 31, 2019
LICENSE update description and license Feb 23, 2018
NAMESPACE init Feb 21, 2018
README.Rmd update readme Mar 15, 2019
README.md update readme Mar 15, 2019
configure rename Apr 4, 2018
configure.win add Rd files Feb 28, 2018
jenkins.sh fix linux build May 30, 2019

README.md

synapserutils

The synapserutils package provides a set of utility functions, built on top of the synapser package.

Installation

synapserutils is available as a ready-built package for Microsoft Windows and Mac OSX. For Linux systems, it is available to install from source. It can be installed or upgraded using the standard install.packages() command, adding the Sage Bionetworks R Archive Network (RAN) to the repository list, e.g.:

install.packages("synapserutils", repos=c("http://ran.synapse.org", "http://cran.fhcrc.org"))

Alternatively, edit your ~/.Rprofile and configure your default repositories:

options(repos=c("http://ran.synapse.org", "http://cran.fhcrc.org"))

after which you may run install.packages without specifying the repositories:

install.packages("synapserutils")

If you have been asked to validate a release candidate, please replace the URL https://sage-bionetworks.github.io/ran with https://sage-bionetworks.github.io/staging-ran, that is:

install.packages("synapserutils", repos=c("http://staging-ran.synapse.org", "http://cran.fhcrc.org"))

Usage

To get started, try logging into Synapse. If you don’t already have a Synapse account, register here:

library(synapserutils)
synLogin()

Available Utilities

Copy

Copy Entity (File, Folder, Table, Link, and Project)

The example below copies File ID syn123 to Project ID syn456:

copy("syn123", "syn456")

The first parameter in copy() can be a File ID, a Table ID, or a Link ID. The second parameter must be a Folder ID or a Project ID.

For more information on copy(), please see:

?copy

Copy Wiki and Wiki Subpage

To copy a wiki page that is associated with an Entity (Project/ File/ Folder/ Table) syn123 to another Entity syn789:

copyWiki("syn123", "syn789")

For more information on copyWiki(), please see:

?copyWiki

Batch Process

Upload Data in Bulk

syncToSynapse() takes a manifest file and uploads the files listed in the manifest file to Synapse:

syncToSynapse("/path/to/manifest.tsv")

The manifest file format and instructions on how to create one can be found here and by:

?syncToSynapse

Download Data in Bulk

To recursively download all files within a container (Folder/ Project) syn123:

syncFromSynapse("syn123")

More information on downloading data in bulk is available here and by:

?syncFromSynapse

Other Utilites

To recursively getting Entity (File/ Folder/ Table/ Link/ Project) metadata from a container (Folder/ Project):

walk("syn123")

For more information about walk(), please see:

?walk
You can’t perform that action at this time.