output_path: Analysis-runner GCS output path

Description Usage Arguments Value See Also Examples

View source: R/utils.R

Description

In contrast to the bucket_path function, output_path takes the "output" parameter from the analysis-runner invocation into account. Requires the DATASET, ACCESS_LEVEL, and OUTPUT environment variables to be set.

Usage

1
output_path(path_suffix, bucket_category = NULL)

Arguments

path_suffix

A suffix to append to the bucket + output directory.

bucket_category

A category like "upload", "tmp", "web". If omitted, defaults to the "main" and "test" buckets based on the access level. See https://github.com/populationgenomics/team-docs/tree/main/storage_policies for a full list of categories and their use cases.

Value

Full GCS path.

See Also

bucket_path

Examples

1
2
3
4
5
# Assuming that the analysis-runner has been invoked with
# `--dataset tob-wgs --access-level test --output snp/v1`:
Sys.setenv("DATASET" = "proj1", "ACCESS_LEVEL" = "test", "OUTPUT" = "dirA/v1")
(o1 <- output_path("report.html", "web")) # gs://cpg-proj1-test-web/dirA/v1/report.html
(o2 <- output_path("output.txt")) # gs://cpg-proj1-test/dirA/v1/output.txt

populationgenomics/cpgr documentation built on Dec. 22, 2021, 9:48 a.m.