Skip to contents

Targets for workflow inputs using file paths

Usage

tar_input_file_path(name, mzML_files, sample_info)

Arguments

name

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

mzML_files

A characer vector of mzML file paths.

sample_info

A tibble containing the sample information. See details for the specifications.

Value

A list of target objects specifically for analysis pipeline input using file paths.

Details

The tibble containing sample information should at least contain the following columns:

  • fileOrder - the numeric file order of the input files when order alphabetically as returned by list.files().

  • injOrder - the sample injection order during MS analysis

  • fileName - the sample file name

  • batch - the analytical batch number

  • block - the randomised block number

  • name - the sample name

  • class - the sample class name

The file names contained within the argument mzML_files should match in name and order to those within the fileName sample information column.

Examples

## File path input 
targets::tar_dir({
targets::tar_script({
    library(hrmtargets)
    file_paths <- metaboData::filePaths('FIE-HRMS','UrineTechnical',ask = FALSE)
    sample_info <- metaboData::runinfo('FIE-HRMS','UrineTechnical',ask = FALSE)
    
    list(
        tar_input_file_path(test,
                            file_paths,
                            sample_info)
    )
})
targets::tar_make()
})
#> • start target test_mzML_files
#> • built target test_mzML_files [0.001 seconds]
#> • start target test_sample_information
#> • built target test_sample_information [0.001 seconds]
#> • start branch test_mzML_3f27ec6d
#> • built branch test_mzML_3f27ec6d [0 seconds]
#> • start branch test_mzML_4ab8dcd7
#> • built branch test_mzML_4ab8dcd7 [0.001 seconds]
#> • start branch test_mzML_a66a628e
#> • built branch test_mzML_a66a628e [0.001 seconds]
#> • start branch test_mzML_3948e8b7
#> • built branch test_mzML_3948e8b7 [0.001 seconds]
#> • start branch test_mzML_f160fe11
#> • built branch test_mzML_f160fe11 [0 seconds]
#> • start branch test_mzML_520039d6
#> • built branch test_mzML_520039d6 [0 seconds]
#> • start branch test_mzML_e7d05c2d
#> • built branch test_mzML_e7d05c2d [0.001 seconds]
#> • start branch test_mzML_a2bee6bc
#> • built branch test_mzML_a2bee6bc [0 seconds]
#> • start branch test_mzML_7773970a
#> • built branch test_mzML_7773970a [0.001 seconds]
#> • start branch test_mzML_7c630941
#> • built branch test_mzML_7c630941 [0 seconds]
#> • built pattern test_mzML
#> • end pipeline [0.131 seconds]
#>