makeFilePath: Builder of path to file within project's results folder.

Description Usage Arguments Value See Also

Description

makeFilePath uses information about file paths from a project configuration object, in conjunction with a sample name and how to deal with subfolder(s), to create a path to the output file that's known to the project for the sample indicated by sampleName, and that corresponds to a particular type/format (e.g., as generated by a particular pipeline).

Usage

1
makeFilePath(base, sampleName, subdir, extension, suffix = NULL)

Arguments

base

Project configuration object (environment- or list-like), from which the parent folder is derived. Alternatively, an actual path to a parent folder.

sampleName

Name for the sample for which to create filepath.

subdir

What to assume about the project's folder structure. If a Boolean value, this indicates whether the expectation is for the file to live within a results subfolder named with the sampleName. If a string, this indicates the actual name of the subfolder within the project's results folder. If a function, it should accept sampleName and the derive a name for the appropriate subfolder that way.

suffix

Text to place between the sample name and the extension. The default is no suffix, which will also result from an argument that's empty, NULL, or FALSE.

Value

Path expected for file for the project defined by base and the sample indicated by sampleName. The correspondence with file type/format is captured by the subdir and extension specifications.

See Also

Other paths: .envVarPath, .filepath, .isDir, expandPath, makedirs


vreuter/SwissR documentation built on May 14, 2019, 11:29 a.m.