import_association_file {ISAnalytics}R Documentation

Import the association file from disk

Description

[Stable] Imports the association file and immediately performs a check on the file system starting from the root to assess the alignment between the two.

Usage

import_association_file(
  path,
  root = NULL,
  tp_padding = 4,
  dates_format = "ymd",
  separator = "\t",
  filter_for = NULL,
  import_iss = FALSE,
  convert_tp = TRUE,
  report_path = default_report_path(),
  ...
)

Arguments

path

The path on disk to the association file.

root

The path on disk of the root folder of Vispa2 output or NULL. See details.

tp_padding

Timepoint padding, indicates the number of digits of the "TimePoint" column once imported. Fills the content with 0s up to the length specified (ex: 1 becomes 0001 with a tp_padding of 4)

dates_format

A single string indicating how dates should be parsed. Must be a value in: date_formats()

separator

The column separator used in the file

filter_for

A named list where names represent column names that must be filtered. For example: list(ProjectID = c("PROJECT1", "PROJECT2)) will filter the association file so that it contains only those rows for which the value of the column "ProjectID" is one of the specified values. If multiple columns are present in the list all filtering conditions are applied as a logical AND.

import_iss

Import Vispa2 stats and merge them with the association file?

convert_tp

Should be time points be converted into months and years?

report_path

The path where the report file should be saved. Can be a folder, a file or NULL if no report should be produced. Defaults to {user_home}/ISAnalytics_reports.

...

Additional arguments to pass to import_Vispa2_stats

Details

If the root argument is set to NULL no file system alignment is performed. This allows to import the basic file but it won't be possible to perfom automated matrix and stats import. For more details see the "How to use import functions" vignette: vignette("import_functions_howto", package = "ISAnalytics")

Value

The data frame holding metadata

See Also

date_formats

Other Import functions: import_Vispa2_stats(), import_parallel_Vispa2Matrices(), import_single_Vispa2Matrix()

Examples

fs_path <- system.file("extdata", "fs.zip", package = "ISAnalytics")
fs <- unzip_file_system(fs_path, "fs")
af_path <- system.file("extdata", "asso.file.tsv.gz", package = "ISAnalytics")
af <- import_association_file(af_path, root = fs, report_path = NULL)
head(af)

[Package ISAnalytics version 1.4.3 Index]