# Using ISAnalytics without RStudio support

Giulia Pais1*

1San Raffaele Telethon Institute for Gene Therapy - SR-Tiget, Via Olgettina 60, 20132 Milano - Italia

*giuliapais1@gmail.com, calabria.andrea@hsr.it

#### 19 May 2021

#### Package

ISAnalytics 1.2.0

# 1 Introduction

In this vignette we offer support for users that wish to use our package outside of RStudio and optionally in remote servers.

## 1.1 How to install ISAnalytics

To install the package run the following code:

    ## For release version
    if(!requireNamespace("BiocManager", quietly = TRUE))
        install.packages("BiocManager")
    BiocManager::install("ISAnalytics")

    ## For devel version
    if(!requireNamespace("BiocManager", quietly = TRUE))
        install.packages("BiocManager")
    # The following initializes usage of Bioc devel
    BiocManager::install(version='devel')
    BiocManager::install("ISAnalytics")

To install from GitHub:

    # For release version
    if (!require(devtools)) {
      install.packages("devtools")
    }
    devtools::install_github("calabrialab/ISAnalytics",
                             ref = "RELEASE_3_12",
                             dependencies = TRUE,
                             build_vignettes = TRUE)

    ## Safer option for vignette building issue
    devtools::install_github("calabrialab/ISAnalytics",
                             ref = "RELEASE_3_12")

    # For devel version
    if (!require(devtools)) {
      install.packages("devtools")
    }
    devtools::install_github("calabrialab/ISAnalytics",
                             ref = "master",
                             dependencies = TRUE,
                             build_vignettes = TRUE)

    ## Safer option for vignette building issue
    devtools::install_github("calabrialab/ISAnalytics",
                             ref = "master")

    library(ISAnalytics)

## 1.2 Setting options

`ISAnalytics` has a verbose option that allows some functions to print additional information to the console while they’re executing. To disable this feature do:

    # DISABLE
    options("ISAnalytics.verbose" = FALSE)

    # ENABLE
    options("ISAnalytics.verbose" = TRUE)

Some functions also produce report in a user-friendly HTML format, to set this feature:

    # DISABLE HTML REPORTS
    options("ISAnalytics.widgets" = FALSE)

    # ENABLE HTML REPORTS
    options("ISAnalytics.widgets" = TRUE)

# 2 Recommendations

We highly encourage the use of widgets because some of the functions included in this package produce extensive and detailed reports that are made easy to explore via HTML format: we are talking, usually, about potentially very large data frames which are highly impractical to print on console.

Since we are aware that not all users can or want to use RStudio, here we present a few proposed solutions to maintain widget functionality.

## 2.1 Running the package on a client machine

If code is run on the user machine but from R gui or console, user should not encounter problems, since widgets will be visualized in your preferred browser. If that’s not the case try:

    options(browser = "firefox")

of course “firefox” can be replaced with whatever is needed.

## 2.2 Running code on a remote machine via VPN

Users can visualize widgets even if they’re running code on a remote machine via VPN with the use of X11.

Provided the server machine has a browser installed (for example firefox), you can enable X11 via ssh by doing:

    ssh YOUR_USERNAME@server_address -X -Y

On the client side, users must have an X11 client such as XQuartz to allow X11 forwarding.

If users are working from a Windows machine the procedure is a bit more complicated, since the operating system is not Unix-like.

1. Download Xming here: http://www.straightrunning.com/XmingNotes/ and puTTY here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
2. Once installed, run Xming and puTTY
3. In puTTY configurations, on the left side, find “SSH” -> “X11”
4. Check the option “Enable X11 forwarding”
5. Back in the “Session” panel enter the IP address and as connection type select “SSH”
6. Finally open a connection and try opening the browser from console

Once connected, open R and set the browser option, then load ISAnalytics:

    options(browser = "firefox")
    library(ISAnalytics)

# 3 Reproducibility

The ISAnalytics package (calabrialab, 2021) was made possible thanks to:

- R (R Core Team, 2021)
- BiocStyle (Oleś, 2021)
- knitcitations (Boettiger, 2021)
- knitr (Xie, 2021)
- rmarkdown (Allaire, Xie, McPherson, Luraschi, et al., 2021)
- sessioninfo (Csárdi, core, Wickham, Chang, et al., 2018)
- testthat (Wickham, 2011)

This package was developed using biocthis.

`R` session information.

    #> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
    #>  setting  value
    #>  version  R version 4.1.0 (2021-05-18)
    #>  os       Ubuntu 20.04.2 LTS
    #>  system   x86_64, linux-gnu
    #>  ui       X11
    #>  language (EN)
    #>  collate  C
    #>  ctype    en_US.UTF-8
    #>  tz       America/New_York
    #>  date     2021-05-19
    #>
    #> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
    #>  package       * version date       lib source
    #>  assertthat      0.2.1   2019-03-21 [2] CRAN (R 4.1.0)
    #>  BiocManager     1.30.15 2021-05-11 [2] CRAN (R 4.1.0)
    #>  BiocParallel    1.26.0  2021-05-19 [2] Bioconductor
    #>  BiocStyle     * 2.20.0  2021-05-19 [2] Bioconductor
    #>  bookdown        0.22    2021-04-22 [2] CRAN (R 4.1.0)
    #>  bslib           0.2.5.1 2021-05-18 [2] CRAN (R 4.1.0)
    #>  cellranger      1.1.0   2016-07-27 [2] CRAN (R 4.1.0)
    #>  cli             2.5.0   2021-04-26 [2] CRAN (R 4.1.0)
    #>  colorspace      2.0-1   2021-05-04 [2] CRAN (R 4.1.0)
    #>  crayon          1.4.1   2021-02-08 [2] CRAN (R 4.1.0)
    #>  data.table      1.14.0  2021-02-21 [2] CRAN (R 4.1.0)
    #>  DBI             1.1.1   2021-01-15 [2] CRAN (R 4.1.0)
    #>  digest          0.6.27  2020-10-24 [2] CRAN (R 4.1.0)
    #>  dplyr           1.0.6   2021-05-05 [2] CRAN (R 4.1.0)
    #>  ellipsis        0.3.2   2021-04-29 [2] CRAN (R 4.1.0)
    #>  evaluate        0.14    2019-05-28 [2] CRAN (R 4.1.0)
    #>  fansi           0.4.2   2021-01-15 [2] CRAN (R 4.1.0)
    #>  fs              1.5.0   2020-07-31 [2] CRAN (R 4.1.0)
    #>  generics        0.1.0   2020-10-31 [2] CRAN (R 4.1.0)
    #>  ggplot2         3.3.3   2020-12-30 [2] CRAN (R 4.1.0)
    #>  ggrepel         0.9.1   2021-01-15 [2] CRAN (R 4.1.0)
    #>  glue            1.4.2   2020-08-27 [2] CRAN (R 4.1.0)
    #>  gtable          0.3.0   2019-03-25 [2] CRAN (R 4.1.0)
    #>  highr           0.9     2021-04-16 [2] CRAN (R 4.1.0)
    #>  hms             1.1.0   2021-05-17 [2] CRAN (R 4.1.0)
    #>  htmltools       0.5.1.1 2021-01-22 [2] CRAN (R 4.1.0)
    #>  htmlwidgets     1.5.3   2020-12-10 [2] CRAN (R 4.1.0)
    #>  httr            1.4.2   2020-07-20 [2] CRAN (R 4.1.0)
    #>  ISAnalytics   * 1.2.0   2021-05-19 [1] Bioconductor
    #>  jquerylib       0.1.4   2021-04-26 [2] CRAN (R 4.1.0)
    #>  jsonlite        1.7.2   2020-12-09 [2] CRAN (R 4.1.0)
    #>  knitcitations * 1.0.12  2021-01-10 [2] CRAN (R 4.1.0)
    #>  knitr           1.33    2021-04-24 [2] CRAN (R 4.1.0)
    #>  lattice         0.20-44 2021-05-02 [2] CRAN (R 4.1.0)
    #>  lazyeval        0.2.2   2019-03-15 [2] CRAN (R 4.1.0)
    #>  lifecycle       1.0.0   2021-02-15 [2] CRAN (R 4.1.0)
    #>  lubridate       1.7.10  2021-02-26 [2] CRAN (R 4.1.0)
    #>  magrittr      * 2.0.1   2020-11-17 [2] CRAN (R 4.1.0)
    #>  mnormt          2.0.2   2020-09-01 [2] CRAN (R 4.1.0)
    #>  munsell         0.5.0   2018-06-12 [2] CRAN (R 4.1.0)
    #>  nlme            3.1-152 2021-02-04 [2] CRAN (R 4.1.0)
    #>  pillar          1.6.1   2021-05-16 [2] CRAN (R 4.1.0)
    #>  pkgconfig       2.0.3   2019-09-22 [2] CRAN (R 4.1.0)
    #>  plotly          4.9.3   2021-01-10 [2] CRAN (R 4.1.0)
    #>  plyr            1.8.6   2020-03-03 [2] CRAN (R 4.1.0)
    #>  ps              1.6.0   2021-02-28 [2] CRAN (R 4.1.0)
    #>  psych           2.1.3   2021-03-27 [2] CRAN (R 4.1.0)
    #>  purrr           0.3.4   2020-04-17 [2] CRAN (R 4.1.0)
    #>  R6              2.5.0   2020-10-28 [2] CRAN (R 4.1.0)
    #>  Rcapture        1.4-3   2019-12-16 [2] CRAN (R 4.1.0)
    #>  Rcpp            1.0.6   2021-01-15 [2] CRAN (R 4.1.0)
    #>  reactable       0.2.3   2020-10-04 [2] CRAN (R 4.1.0)
    #>  readr           1.4.0   2020-10-05 [2] CRAN (R 4.1.0)
    #>  readxl          1.3.1   2019-03-13 [2] CRAN (R 4.1.0)
    #>  RefManageR      1.3.0   2020-11-13 [2] CRAN (R 4.1.0)
    #>  rlang           0.4.11  2021-04-30 [2] CRAN (R 4.1.0)
    #>  rmarkdown       2.8     2021-05-07 [2] CRAN (R 4.1.0)
    #>  rstudioapi      0.13    2020-11-12 [2] CRAN (R 4.1.0)
    #>  sass            0.4.0   2021-05-12 [2] CRAN (R 4.1.0)
    #>  scales          1.1.1   2020-05-11 [2] CRAN (R 4.1.0)
    #>  sessioninfo   * 1.1.1   2018-11-05 [2] CRAN (R 4.1.0)
    #>  stringi         1.6.2   2021-05-17 [2] CRAN (R 4.1.0)
    #>  stringr         1.4.0   2019-02-10 [2] CRAN (R 4.1.0)
    #>  tibble          3.1.2   2021-05-16 [2] CRAN (R 4.1.0)
    #>  tidyr           1.1.3   2021-03-03 [2] CRAN (R 4.1.0)
    #>  tidyselect      1.1.1   2021-04-30 [2] CRAN (R 4.1.0)
    #>  tmvnsim         1.0-2   2016-12-15 [2] CRAN (R 4.1.0)
    #>  upsetjs         1.9.0   2021-02-15 [2] CRAN (R 4.1.0)
    #>  utf8            1.2.1   2021-03-12 [2] CRAN (R 4.1.0)
    #>  vctrs           0.3.8   2021-04-29 [2] CRAN (R 4.1.0)
    #>  viridisLite     0.4.0   2021-04-13 [2] CRAN (R 4.1.0)
    #>  withr           2.4.2   2021-04-18 [2] CRAN (R 4.1.0)
    #>  xfun            0.23    2021-05-15 [2] CRAN (R 4.1.0)
    #>  xml2            1.3.2   2020-04-23 [2] CRAN (R 4.1.0)
    #>  yaml            2.2.1   2020-02-01 [2] CRAN (R 4.1.0)
    #>  zip             2.1.1   2020-08-27 [2] CRAN (R 4.1.0)
    #>
    #> [1] /tmp/Rtmpxb65TG/Rinst5bff6471148ea
    #> [2] /home/biocbuild/bbs-3.13-bioc/R/library

# 4 Bibliography

This vignette was generated using BiocStyle (Oleś, 2021) with knitr (Xie, 2021) and rmarkdown (Allaire, Xie, McPherson, Luraschi, et al., 2021) running behind the scenes.

Citations made with knitcitations (Boettiger, 2021).

[1] J. Allaire, Y. Xie, J. McPherson, J. Luraschi, et al. rmarkdown: Dynamic Documents for R. R package version 2.8. 2021. <URL: https://github.com/rstudio/rmarkdown>.

[2] C. Boettiger. knitcitations: Citations for ‘Knitr’ Markdown Files. R package version 1.0.12. 2021. <URL: https://CRAN.R-project.org/package=knitcitations>.

[3] G. Csárdi, R. core, H. Wickham, W. Chang, et al. sessioninfo: R Session Information. R package version 1.1.1. 2018. <URL: https://CRAN.R-project.org/package=sessioninfo>.

[4] A. Oleś. BiocStyle: Standard styles for vignettes and other Bioconductor documents. R package version 2.20.0. 2021. <URL: https://github.com/Bioconductor/BiocStyle>.

[5] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. Vienna, Austria, 2021. <URL: https://www.R-project.org/>.

[6] H. Wickham. “testthat: Get Started with Testing”. In: The R Journal 3 (2011), pp. 5-10. <URL: https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf>.

[7] Y. Xie. knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.33. 2021. <URL: https://yihui.org/knitr/>.

[8] calabrialab. Analyze gene therapy vector insertion sites data identified from genomics next generation sequencing reads for clonal tracking studies. https://github.com/calabrialab/ISAnalytics - R package version 1.2.0. 2021. DOI: 10.18129/B9.bioc.ISAnalytics. <URL: http://www.bioconductor.org/packages/ISAnalytics>.