Resources
When you run or export with the DockerTarget
, resources are automatically added to the running container and stored under /resources
. In case of the NativeTarget
, this is not the case and since NextFlowTarget
uses the NativeTarget
it’s the same there. That does not mean that resources specified in functionality.yaml
are not available in these cases, we only have to point to them where appropriate.
The following snippet (from ct/singler
) illustrates this:
par = list(
input = "input.h5ad",
output = "output.h5ad",
reference = "HPCA",
outputField = "cellType",
pruningMADS = 3,
outputFieldPruned = "celltype-pruned",
reportOutputPath = "report.md"
)
par$resources_dir <- resources_dir
In other words, resources_dir
is automatically created by viash
in all current 3 environments. This means that we can point to the report.Rmd
file present in the resources like so:
rmarkdown::render(paste0(par$resources_dir, "/", "report.Rmd"), output_file = par$reportOutputPath)