Pack or unpack an identifier for a file in SebasDB.

unpackID(id)

packID(project, path, version)

Arguments

id

String containing an identifier for a file.

project

String containing the project name. This should not contain :.

path

String containing the relative rooted path to the result within the analysis project.

version

String containing the project version. This should not contain @.

Value

unpackID will break down id and return a list containing character vectors of its components. Note that the "commit" field is deprecated and is only returned for backwards compatibility.

packID will pack the components into a single string. If parallel components are supplied, a character vector is returned.

Author

Aaron Lun

Examples

unpackID(example.id)
#> $project
#> [1] "test-public"
#> 
#> $path
#> [1] "blah.txt"
#> 
#> $version
#> [1] "base"
#> 
packID(example.project, "blah.rds", example.version)
#> [1] "test-public:blah.rds@base"