---
title: "gDRimport"
author: "gDR team"
output: BiocStyle::html_document
vignette: >
  %\VignetteIndexEntry{gDRimport}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, echo=FALSE}
library(gDRimport)
log_level <- futile.logger::flog.threshold("ERROR")
```

# Overview

The `gDRimport` package is a part of the gDR suite. It helps to prepare raw drug response data for downstream processing. It mainly contains helper functions for importing/loading/validating dose response data provided in different file formats. 

# Use Cases

## Test Data 
There are currently four test datasets that can be used to see what's the expected input data for the gDRimport. 

```{r}
# primary test data
td1 <- get_test_data()
summary(td1)
td1

# test data in Tecan format
td2 <- get_test_Tecan_data()
summary(td2)

# test data in D300 format
td3 <- get_test_D300_data()
summary(td3)

# test data obtained from EnVision
td4 <- get_test_EnVision_data()
summary(td4)
```

## Load data
The `load_data` is the key function. It wraps `load_manifest`, `load_templates` and `load_results` functions and supports different file formats.

```{r}
ml <- load_manifest(manifest_path(td1))
summary(ml)

t_df <- load_templates(template_path(td1))
summary(t_df)

r_df <- suppressMessages(load_results(result_path(td1)))
summary(r_df)

l_tbl <-
  suppressMessages(
    load_data(manifest_path(td1), template_path(td1), result_path(td1)))
summary(l_tbl)
```

## Package installation
The function `installAllDeps` assists in installing package dependencies.  

# SessionInfo {-}

```{r sessionInfo}
sessionInfo()
```
