% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import-functions.R
\name{import_association_file}
\alias{import_association_file}
\title{Import the association file from disk}
\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{
\item{path}{The path on disk to the association file.}

\item{root}{The path on disk of the root folder of Vispa2 output or NULL.
See details.}

\item{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)}

\item{dates_format}{A single string indicating how dates should be parsed.
Must be a value in: \code{date_formats()}}

\item{separator}{The column separator used in the file}

\item{filter_for}{A named list where names represent column names that
must be filtered. For example: \verb{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.}

\item{import_iss}{Import Vispa2 stats and merge them with the
association file?}

\item{convert_tp}{Should be time points be converted into months and
years?}

\item{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 \code{{user_home}/ISAnalytics_reports}.}

\item{...}{Additional arguments to pass to
\code{\link{import_Vispa2_stats}}}
}
\value{
The data frame holding metadata
}
\description{
\lifecycle{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.
}
\details{
If the \code{root} argument is set to \code{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:
\code{vignette("import_functions_howto", package = "ISAnalytics")}
}
\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)
}
\seealso{
\code{\link{date_formats}}

Other Import functions: 
\code{\link{import_Vispa2_stats}()},
\code{\link{import_parallel_Vispa2Matrices}()},
\code{\link{import_single_Vispa2Matrix}()}
}
\concept{Import functions}
