Skip to contents

Targets for workflow input for mzML data files and sample information stored in a GitHub release using the piggyback R package.

Usage

tar_input_piggyback(
  name,
  tag,
  file = NULL,
  dest = paste0("data/", tag),
  sample_info_file = "runinfo.csv",
  ext = ".mzML.gz",
  repo = guess_repo(),
  overwrite = TRUE,
  ignore = "manifest.json",
  use_timestamps = TRUE,
  show_progress = TRUE,
  .token = gh::gh_token()
)

Arguments

name

Symbol. The name for the collection of targets. This serves as a prefix for target names.

tag

tag for the GitHub release to which this data should be attached.

file

name or vector of names of files to be downloaded. If NULL, all assets attached to the release will be downloaded.

dest

The directory destination of the downloaded release data.

sample_info_file

The name of the file included in the release that contains the sample information.

ext

The file extension of the converted (mzML) data files.

repo

Repository name in format "owner/repo". Defaults to guess_repo().

overwrite

Should any local files of the same name be overwritten? default TRUE.

ignore

a list of files to ignore (if downloading "all" because file=NULL).

use_timestamps

DEPRECATED.

show_progress

logical, show a progress bar be shown for uploading? Defaults to [interactive()] - can also set globally with options("piggyback.verbose")

.token

GitHub authentication token, see [gh::gh_token()]

Value

A list of target objects specifically for analysis pipeline input data retrieval using piggyback.

Examples

if (FALSE) {
## Example piggyback input
targets::tar_dir({
    targets::tar_script({
        library(hrmtargets)
        list(
            tar_input_piggyback(example,
                                'FIE-HRMS_BdistachyonTechnical',
                                repo = 'jasenfinch/metaboData')
        )
    })
    targets::tar_make()
    targets::tar_read(example_sample_information)
})
}