A bunch of helper functions for working with the sbg cavatica platform
install.packages("remotes") # Can skip if you already have 'remotes' package installed
remotes::install_github("selkamand/utilitybeltcavatica")
This package extends functionality of the sevenbridges
package on bioconductor.
Create a new file at: ~/.sevenbridges/credentials
Add the following contents:
[default]
api_endpoint = https://cavatica-api.sbgenomics.com/v2
auth_token = my_cav_auth_token
my_cav_auth_token
can be generated from web interface (hosted here):
Jump into R load up the libraries we need
library(sevenbridges) # This library is automatically installed when you install this package
library(utilitybeltcavatica)
First lets list all all our projects
a <- Auth(from="file",platform = "cavatica")
message("\nPossible Projects:")
a$project()
Then choose one of these to connect to:
project <- a$project(id = "my_project_id")
message("\nProject Selected:")
project
Now we're all set to start using any functions in either the sevenbridges or utilitybeltcavatica packages. Examples of the latter are described below.
All functions described bellow are vectorised
# Get File Object
find_file_using_filepath(project, filepath)
# Get File Identifier
find_fileid_using_filepath(project, filepath)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.