mintDOI wrapper function in R client

Description

Prototype code:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 mintDOI = function(synId){ #mints a doi for the current version of the file #library(synapseClient) #synapseLogin() synObj <- synGet(synId,downloadFile=F) if(synGetProperty(synObj,'entityType')=='org.sagebionetworks.repo.model.FileEntity'){ version <- synGetProperty(synObj,'versionNumber') synRestPUT(paste0('/entity/',synId,'/version/',version,'/doi'),body=list()) }else{ synRestPUT(paste0('/entity/',synId,'/doi'),body=list()) } }

Also the code is here on github:

https://github.com/Sage-Bionetworks/rSynapseUtilities/blob/dev/R/mintDOI.R

Environment

None

Status

Assignee

Unassigned

Reporter

Ben Logsdon

Validator

Ben Logsdon

Release Version History

None

Priority

Major
Configure