Skip to end of banner
Go to start of banner

Synapse scenarios: File / Folder API

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Ad hoc analysis

Alice is an data analyst / computational scientist starting a new project.  She creates a folder in her linux home directory and populates it with a set of files (e.g. starting data).  She starts some exploratory statistical analysis in an interactive R session.  After some time she arrives at some preliminary findings she wants to share with a biologist (Bob) she is collaborating with.  At this point she creates a new Synapse project.  At OS command line, she runs a command like:

  syn add . syn1234 -recurse = true -location = local  //Where syn1234 is syn id of her project.

or, more naturally

  syn add . AlicesProject - recurse = true -location = local

At this point her Synapse project is populated with a mirror of her local filesystem, although all the files are still living exclusively on her local file system.  Synapse has some metadata on the files and folders (e.g. SHA1, timestamp and user of when they were created, maybe file size).

Now, in her R session she has a plot and a data frame she'd also like to add to the project.  At R command line:

  synAdd('AlicesProject/localTopFolder', aRDataframe)
  synAdd('AlicesProject/localTopFolder', aRPlot)

These commands save the dataframe and plot to files.  Location defaults to Synapse S3 storage, so there are now two additional files in the Synapse project.  As these were pushed up to S3, Synapse generates previews for the plot and dataframe files.

At local OS command line

  syn update . -recurse = true

Pulls down the two new plot files locally.  Dataframe could be either .csv or Rbinary file.

At this point she switches over the the Synapse web client and uses the two new results files and the wiki features to write up a summary of her findings. Then she adds Bob to the project and emails him a link to view the results.

 



 

 

  • No labels