synGet.Rd
Gets a Synapse entity from the repository service.
synGet(entity)
A Synapse ID (e.g. syn123 or syn123.1, with .1 denoting version), a Synapse Entity object, a plain dictionary in which 'id' maps to a Synapse ID or a local file that is stored in Synapse (found by the file MD5)
Optional. The specific version to get. Defaults to the most recent version. If not denoted in the entity input.
Optional. Whether associated files(s) should be downloaded. Defaults to TRUE.
Optional. Directory where to download the Synapse File Entity. Defaults to the local cache.
Optional. Whether the link returns the target Entity. Defaults to FALSE.
Optional. Determines how to handle file collisions. May be "overwrite.local", "keep.local", or "keep.both". Defaults to "keep.both".
Optional. A Synanpse ID used to limit the search in Synapse if entity is specified as a local file. That is, if the file is stored in multiple locations in Synapse only the ones in the specified folder/project will be returned.
Optional. The MD5 checksum for the file, if known. Otherwise if the file is a local file, it will be calculated automatically.
A new Synapse Entity object of the appropriate type.
if (FALSE) {
## download file
file <- synGet('syn1906479')
print(file$properties$name)
print(file$path)
## download a specific version of a file
file <- synGet('syn1906479', version=1)
print(file$versionLabel)
## to access the file's metadata without downloading the file
file <- synGet("syn1906479", downloadFile = FALSE)
md5 <- file$get("md5")
}