# Frequently Asked Questions

    library(TSAR)

## FAQ

- What are required dependencies?

  Load `Shiny` separately if running shiny applications. Load `ggplot2` and `plotly` if intending to modify automated graphs.

- How are Tm values estimated?

  TSAR package estimates uses derivative method by locating maximum first derivative. Errors may occur during the process, edit estimation with caution if errors were perceived.

- Are smoothing applied to data, what kind?

  TSAR package utilizes `gam` function from package `mgcv`. Model assumes `method = "GACV.Cp"` and sets to `formula = y ~ s(x, bs = "ad")`. Smoothing may be toggled off by specifying parameters. Refer to function documentations for instructions.

- Got new suggestions or unmentioned-problems?

  Start a new issue in our github repository: `"CGAO123/TSAR"`

## Verify Data Input

TSAR package processes large amounts of data of similar properties, it is easy to confuse one with another and fail analysis. Verify your data input and out here by check for variable names. Consider renaming your data frame to theese following if issues are encountered.

- raw_data

  - required:

    - Temperature (double)

    - Fluorescence (double)

    - Well.Position (character)

- norm_data

  - required:

    - Temperature (double)

    - Fluorescence (double)

    - Well.Position (character)

  - generated by tsar:

    - norm_deriv (double)

    - tm (double)

- tsar_data

  - required:

    - Temperature (double)

    - Fluorescence (double)

    - Well.Position/Well (character)

    - norm_deriv (double)

    - Tm (double)

    - Protein (character)

    - Ligand (character)

  - generated by tsar:

    - ExperimentalFileName (character)

    - well_ID (character)

    - condition_ID (character)

For more detailed examples, refers to vignettes, `TSAR_Package_Structure` and `TSAR_Workflow_by_Command`.

## Locating Appropriate Function Calls

Given the two available workflows, here is a list of corresponding shiny functions and relative command line functions.

#### Under Data Pre-Processing, weed_raw():

- View Selected; `TSAR::screen()`

- Remove Selected; `remove_raw()`

#### Under Data Analysis, analyze_norm():

- View Model Fit; `view_model()`

- Analyze all Wells; `gam_analysis()`

  - function wraps together, `normalize()`, `model_gam()`, `model_fit()`, `Tm_est()`

- Upload Well Information & Set Conditions; `join_well_info()`

- Manual Input; load template using `data("well_information")`

  - edit empty template by writing file into local end, `write.csv()`

- Save File; `write_tsar()`, `read_tsar()`

#### Under Data Visualization, graph_tsar():

- Merge Replicate Trials; `merge_norm()`

- Generate Boxplot; `TSA_boxplot()`

- Generate Compare Plots; `TSA_compare_plot()`

- Graph Selected Curves; `TSA_wells_plot()`

- Compare Derivatives; `view_deriv()`

- List Condition IDs; `condition_IDs()`

- List Well IDs; `well_IDs()`

- List Tms; `TSA_Tms()`

- List Delta Tms; `Tm_difference()`

## Session Info

    sessionInfo()

    #> R version 4.5.2 (2025-10-31)
    #> Platform: x86_64-pc-linux-gnu
    #> Running under: Ubuntu 24.04.3 LTS
    #>
    #> Matrix products: default
    #> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
    #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
    #>
    #> locale:
    #>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
    #>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C
    #>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
    #>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
    #>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
    #> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
    #>
    #> time zone: Etc/UTC
    #> tzcode source: system (glibc)
    #>
    #> attached base packages:
    #> [1] stats     graphics  grDevices utils     datasets  methods   base
    #>
    #> other attached packages:
    #> [1] TSAR_1.9.3     rmarkdown_2.30
    #>
    #> loaded via a namespace (and not attached):
    #>  [1] gtable_0.3.6        xfun_0.56           bslib_0.10.0
    #>  [4] ggplot2_4.0.1       shinyjs_2.1.1       htmlwidgets_1.6.4
    #>  [7] rstatix_0.7.3       lattice_0.22-7      vctrs_0.7.1
    #> [10] tools_4.5.2         generics_0.1.4      tibble_3.3.1
    #> [13] pkgconfig_2.0.3     Matrix_1.7-4        data.table_1.18.2.1
    #> [16] RColorBrewer_1.1-3  S7_0.2.1            readxl_1.4.5
    #> [19] lifecycle_1.0.5     stringr_1.6.0       compiler_4.5.2
    #> [22] farver_2.1.2        minpack.lm_1.2-4    carData_3.0-6
    #> [25] httpuv_1.6.16       shinyWidgets_0.9.0  htmltools_0.5.9
    #> [28] sys_3.4.3           buildtools_1.0.0    sass_0.4.10
    #> [31] yaml_2.3.12         lazyeval_0.2.2      Formula_1.2-5
    #> [34] plotly_4.12.0       later_1.4.5         pillar_1.11.1
    #> [37] car_3.1-3           ggpubr_0.6.2        jquerylib_0.1.4
    #> [40] tidyr_1.3.2         cachem_1.1.0        abind_1.4-8
    #> [43] nlme_3.1-168        mime_0.13           tidyselect_1.2.1
    #> [46] zip_2.3.3           digest_0.6.39       stringi_1.8.7
    #> [49] dplyr_1.1.4         purrr_1.2.1         maketools_1.3.2
    #> [52] splines_4.5.2       fastmap_1.2.0       grid_4.5.2
    #> [55] cli_3.6.5           magrittr_2.0.4      broom_1.0.12
    #> [58] scales_1.4.0        promises_1.5.0      backports_1.5.0
    #> [61] httr_1.4.7          otel_0.2.0          cellranger_1.1.0
    #> [64] ggsignif_0.6.4      openxlsx_4.2.8.1    shiny_1.12.1
    #> [67] evaluate_1.0.5      knitr_1.51          viridisLite_0.4.2
    #> [70] mgcv_1.9-4          rlang_1.1.7         Rcpp_1.1.1
    #> [73] xtable_1.8-4        glue_1.8.0          rhandsontable_0.3.8
    #> [76] jsonlite_2.0.0      R6_2.6.1