import_association_file: Import the association file from disk

Description Usage Arguments Details Value See Also Examples

View source: R/import-functions.R

Description

\lifecycle

maturing 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

1
2
3
4
5
6
7
8
9
import_association_file(
  path,
  root = NULL,
  tp_padding = 4,
  dates_format = "ymd",
  separator = "\t",
  filter_for = NULL,
  export_widget_path = NULL
)

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.

export_widget_path

A path on disk to save produced widgets or NULL if the user doesn't wish to save the html file

Details

The import series of functions is designed to work in combination with the use of Vispa2 pipeline, please refer to this article for more details: VISPA2: A Scalable Pipeline for High-Throughput Identification and Annotation of Vector Integration Sites.
The pipeline automatically produces an hierarchical structure in the file system which follows this schema:

For each ProjectID there may be several nested PoolIDs. The alignment function only looks for PoolIDs in the quantification folder, since it's the location of the matrices to import. For more details on how to properly use these functions, refer to the vignette - vignette("how_to_import_functions").
If 'NULL' the file system alignment step is skipped.

Value

A tibble with the contents of the association file plus a column containing the path in the file system for every project and pool if found.

See Also

date_formats

Other Import functions: import_parallel_Vispa2Matrices_auto(), import_parallel_Vispa2Matrices_interactive(), import_single_Vispa2Matrix()

Examples

1
2
3
4
5
6
7
8
op <- options("ISAnalytics.widgets" = FALSE)
path <- system.file("extdata", "ex_association_file.tsv",
    package = "ISAnalytics"
)
root_pth <- system.file("extdata", "fs.zip", package = "ISAnalytics")
root <- unzip_file_system(root_pth, "fs")
association_file <- import_association_file(path, root, dates_format = "dmy")
options(op)

ISAnalytics documentation built on April 9, 2021, 6:01 p.m.