attachments | R Documentation |
Interact with attachments using these endpoints. Only FCS files can be analyzed in Cytobank, but any file can be uploaded as an attachment. Exported PDFs, statistics, and files also automatically attach themselves to the Experiment they are exported from. Learn more about attachments in Cytobank.
## S4 method for signature 'UserSession'
attachments.delete(
UserSession,
experiment_id,
attachment_id,
timeout = UserSession@short_timeout
)
## S4 method for signature 'UserSession'
attachments.download(
UserSession,
experiment_id,
attachment_id,
directory = getwd(),
timeout = UserSession@long_timeout
)
## S4 method for signature 'UserSession'
attachments.download_zip(
UserSession,
experiment_id,
attachment_id,
timeout = UserSession@long_timeout
)
## S4 method for signature 'UserSession'
attachments.list(
UserSession,
experiment_id,
output = "default",
timeout = UserSession@short_timeout
)
## S4 method for signature 'UserSession'
attachments.show(
UserSession,
experiment_id,
attachment_id,
output = "default",
timeout = UserSession@short_timeout
)
## S4 method for signature 'UserSession'
attachments.update(
UserSession,
attachment,
timeout = UserSession@short_timeout
)
## S4 method for signature 'UserSession'
attachments.upload(
UserSession,
experiment_id,
file_path,
output = "default",
timeout = UserSession@long_timeout
)
UserSession |
Cytobank UserSession object |
experiment_id |
integer representing an experiment ID |
attachment_id |
integer representing an attachment ID |
timeout |
integer representing the request timeout time in seconds [optional] |
directory |
character representing a specific directory to which the file will be downloaded (optional ending directory slash), if left empty, the default will be the current working directory [optional] |
output |
character representing the output format [optional] |
attachment |
dataframe representing an attachment (can retrieve via the attachments.show endpoint) |
file_path |
character representing a file path |
attachments.delete
Permanently delete an attachment.
attachments.download
Download an attachment from an experiment.
attachments.download_zip
Download all or a select set of attachments as a zip file from an experiment. The download link of the zip file will be sent to the user's registered email address.
attachments.list
List all attachments from an experiment. Outputs a dataframe [default] or raw list with all fields present.
- Optional output parameter, specify one of the following: ("default", "raw")
attachments.show
Show attachment details from an experiment.
- Optional output parameter, specify one of the following: ("default", "raw")
attachments.update
Update an attachment description from an experiment.
attachments.upload
Upload an attachment to an experiment.
- Optional output parameter, specify one of the following: ("default", "raw")
## Not run: # Authenticate via username/password
cyto_session <- authenticate(site="premium", username="cyril_cytometry", password="cytobank_rocks!")
Authenticate via auth_token
cyto_session <- authenticate(site="premium", auth_token="my_secret_auth_token")
## End(Not run)
## Not run: attachments.delete(cyto_session, 22, attachment_id=2)
## Not run: # Download an attachment to the current working directory
attachments.download(cyto_session, 22)
# Download an attachment to a new directory
attachments.download(cyto_session, 22, directory="/my/new/download/directory/")
## End(Not run)
## Not run: # Download the all attachment files as a zip file
attachments.download_zip(cyto_session, experiment_id=22)
# Download a select set of attachment files as a zip file
attachments.download_zip(cyto_session, experiment_id=22, attachment_id=2)
## End(Not run)
## Not run: # Dataframe of all attachments with all fields present
attachments.list(cyto_session, 22)
# Raw list of all attachments with all fields present
attachments.list(cyto_session, 22, output="raw")
## End(Not run)
## Not run: attachments.show(cyto_session, 22, attachment_id=2)
## Not run: attachments.update(cyto_session, attachment=cyto_attachment)
## Not run: attachments.upload(cyto_session, 22, file_path="/path/to/my_attachment.txt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.