---
title: "idiogramFISH: Shiny App. Idiograms with Marks and Karyotype Indices"
author: "Fernando Roa, Mariana PC Telles"
date: "22 08 2023"
pkgdown:
  as_is: true
output:
  rmdformats::readthedown:
    highlight: tango
    includes:
      in_header: myheader.html
    toc_depth: 2
    number_sections: true
    pandoc_args: ["--lua-filter=refs/multiple-bibliographies.lua"]

bibliography_normal: [refs/normal_noabs.bib]
bibliography_software: [refs/software.bib]
bibliography_docs: [refs/docs.bib]
bibliography_shiny: [refs/shinyApp.bib]

csl: refs/clima5.csl
link-citations: yes
resource_files:
  - ../pkgdown/myheader.html
    
  - ../man/figures/readme.svg
  - ../man/figures/cranmanualbookdown.svg
  - ../man/figures/develmanualvignette.svg
  - ../man/figures/develmanualpkgdown.svg
  - ../man/figures/manual.svg
  - ../man/figures/cranversion.svg
  - ../man/figures/archive.svg
  - ../man/figures/pkgdownver.svg
  - ../man/figures/shiny.jpg
  - ../man/figures/colab2.jpg
  - ../man/figures/colab-badge.svg
  - ../man/figures/GitHub-Mark-120px-plus.png
  
  - ../man/figures/kofi1.svg
  
  - ../man/figures/gitbadge.svg
  - ../man/figures/doibadge.svg
  - ../man/figures/logo.png
  - ../man/figures/logo2.png
  - ../man/figures/realdownloads.svg
  - ../man/figures/NEWS.svg
  
  - ../man/figures/circular.png
  - ../man/figures/dfOfChrSize.svg

  - ../onlinefigures/ggplot.svg
  - ../onlinefigures/nostoc.jpg
  - ../onlinefigures/nostocSmall.jpg
  - ../onlinefigures/firstplot2.png
  - ../onlinefigures/secondplot2.png
  - ../onlinefigures/thirdplot2.png
  
  - ../man/figures/ggplot.svg
  - ../man/figures/nostoc.jpg
  - ../man/figures/nostocSmall.jpg
  - ../man/figures/firstplot2.png
  - ../man/figures/secondplot2.png
  - ../man/figures/thirdplot2.png
  
  - firstplot.png
  - secondplot.png
  - thirdplot.png
  - firstplot2.png
  - secondplot2.png
  - thirdplot2.png
  
  - dfOfChrSize.svg
  - monoholoCS.png
  - climon.svg
  - dfOfChrSizeVector.png
  - bigdfChrSizeHolo.png
  - bigdfChrSizeHolo2.png
  - mydfChrSize2.png
  
  - refs/shinyApp.bib
  - refs/normal_noabs.bib
  - refs/software.bib
  - refs/docs.bib
  - refs/multiple-bibliographies.lua
  
  - js/jquery.min.js
  - js/clipboard.min.js
  - js/bootstrap.min.js
  - js/pkgdown2.js

  - css/mystyle.css

  - css/all.minMod.css
  - css/bootstrap.minO.css
  
  - css/fonts/fa-regular-400.svg
  - css/fonts/fa-regular-400.eot
  - css/fonts/fa-regular-400.ttf
  - css/fonts/fa-regular-400.woff
  - css/fonts/fa-regular-400.woff2
  
vignette: >
  %\VignetteIndexEntry{idiogramFISH: Shiny App. Idiograms with Marks and Karyotype Indices}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
  
---

<!-- onlinefigures copied to man/figures -->

``` {r hide_chunk, results = "asis", echo = FALSE, message = FALSE, eval = TRUE}
myfile <- "js/hideOutput.js"
if (file.exists(myfile)) {
  cat(paste0('<script src="', myfile, '"></script>'))
}
```

``` {r cssjs, results = "asis", echo = FALSE, message = FALSE, eval = TRUE}
myfile <- "js/jquery.min.js"
if (file.exists(myfile)) {
  cat(paste0('<script src="', myfile, '" crossorigin = "anonymous"></script> <!-- # -->'))
}

myfile <- "js/clipboard.min.js"
if (file.exists(myfile)) {
  cat(paste0('<script src="', myfile, '" crossorigin = "anonymous"></script>'))
}

myfile <- "css/all.minMod.css"
if (file.exists(myfile)) {
  cat(paste0('<link rel="stylesheet" href="', myfile, '"  crossorigin = "anonymous">'))
}

myfile <- "css/bootstrap.minO.css"
if (file.exists(myfile)) {
  cat(paste0('<link rel="stylesheet" href="', myfile, '"  crossorigin = "anonymous">'))
}

myfile <- "js/bootstrap.min.js"
if (file.exists(myfile)) {
  cat(paste0('<script src="', myfile, '" crossorigin = "anonymous"></script> <!-- # -->'))
}

myfile <- "js/pkgdown2.js"
if (file.exists(myfile)) {
  cat(paste0('<script src="', myfile, '"></script> <!-- # -->'))
}
```
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/rmd_formats.css">
<link rel="stylesheet" href="css/code_folding.css">


```{r setup, include = FALSE, eval = T}
# Create myheader.html
options(knitr.svg.object = TRUE)

line1 <- '<script src="https://kit.fontawesome.com/af0a13599b.js" crossorigin = "anonymous"></script>'
line2 <- '<link rel="shortcut icon" href="../man/figures/logo.png" />'
file <- "myheader.html"

if (Sys.info()["sysname"] == "Windows") {
  # check internet response
  res <- !as.logical(system(paste("ping", "www.google.com")))
  if (res) {
    write(line1, file = file)
    write(line2, file = file, append = TRUE)
  }
} else {
  write(line1, file = file)
  write(line2, file = file, append = TRUE)
}

require(idiogramFISH)

knitr::opts_chunk$set(eval = TRUE)

pasteLinks <- function(link) {
  cat(paste0(
    "
</br>
Jupyter interactive version:
<br>
</br>
<table>
<tr>
<td>",
    '<a href="https://colab.research.google.com/github/fernandoroa/IFjupyter/blob/main/',
    link, '" target="_blank">',
    paste0(readLines("../man/figures/colab-badge.svg"), collapse = ""),
    "</a>",
    "</td>
<td>
&emsp;&emsp;<img src='../man/figures/GitHub-Mark-120px-plus.png' height=25 width=25>&emsp;[<kbd>Github</kbd>](https://github.com/fernandoroa/IFjupyter/blob/main/",
    link,
    "){target='_blank'}
</td>
<td>
&emsp;&emsp;[<kbd>Raw</kbd>](https://github.com/fernandoroa/IFjupyter/raw/main/",
    link,
    "){target='_blank'}
</td>
</tr>
</table>
</br>
"
  ))
}
```

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = TRUE}
if (requireNamespace("RCurl", quietly = TRUE)) {
  # version of manual
  v <- sub("Version: ", "", readLines("../DESCRIPTION")[3])
  pkg <- "idiogramFISH"
  link <- tryCatch(suppressWarnings(badger::badge_custom("Documentation", paste(pkg, v), "cornflowerblue")), error = function(e) NA)
  if (!is.na(link)) {
    svglink <- gsub("\\[|\\]|!|\\(|\\)", "", link)
    manual_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(svglink)), error = function(e) NA)
    if (!is.na(manual_cont)) {
      manual_contFile <- "../man/figures/manual.svg"
      writeLines(manual_cont, con = manual_contFile)
      manual_contFile <- normalizePath(manual_contFile)
      cat(paste0("<img src=", manual_contFile, ">"))
    }
  }
}
```

# Introduction {-}

<div style = "float: right; width: 20%">
```{r, echo = F,  results = "asis", eval = T}
img1_path <- "../man/figures/logo.png"
if (file.exists(img1_path)) {
  cat(paste0("<img src=", img1_path, ">"))
}
```
</div>

The goal of idiogramFISH functions or the shiny-app is to plot karyotypes, plasmids and circular chr. having a set of data.frames for chromosome data and optionally marks' data [@Roa2021]. Karyotypes can also be plotted in concentric circles.<br>
    <br>It is possible to calculate also chromosome and karyotype indexes [@Watanabe1999;@Zarco1986new] and classify chromosome morphology in the categories of Levan [-@Levan1964], and [Guerra](https://ferroao.gitlab.io/guerra1986/Guerra1986.pdf) [-@Guerra1986d].<br>
    <br>Six styles of marks are available: `square` (and `squareLeft`), `dots`, `cM` (`cMLeft`), `cenStyle`, `upArrow` (`downArrow`), `exProtein` (`inProtein`) (in column `style` in `dfMarkColor` data.frame); its legend (label) (parameter `legend`) can be drawn `inline` or to the right (`aside`) of karyotypes. Three styles of centromere are available: `rounded`, `triangle` and `inProtein` (`cenFormat` parameter). Chromosome regions (column `chrRegion` in `dfMarkPos` data.frame) for monocentrics are `p` (short), `q` (long), `cen`, `pcen`, `qcen`. The last three cannot accommodate most mark styles, but can be colored. The region `w` (whole) can be used both in monocentrics and holocentrics.
    
IdiogramFISH was written in R [@R-base] and also uses crayon [@R-crayon], tidyr [@R-tidyr], plyr [@plyr2011] and dplyr packages [@R-dplyr]. Documentation was written with R-packages roxygen2 [@R-roxygen2], usethis [@R-usethis], bookdown [@bookdown2016], knitr [@Xie2015], pkgdown [@R-pkgdown], Rmarkdown [@rmarkdown2018], rvcheck [@R-rvcheck], badger [@R-badger], kableExtra [@R-kableExtra], rmdformats [@R-rmdformats] and RCurl [@R-RCurl]. For some vignette figures, packages rentrez [@rentrez2017], phytools [@phytools2012], ggtree [@ggtree2018], ggplot2 [@ggplot22016] and ggpubr [@R-ggpubr] were used. 

In addition, the shiny app `runBoard()` uses shiny [@R-shiny], shinydashboard [@R-shinydashboard], rhandsontable [@R-rhandsontable], gtools [@R-gtools] and rclipboard [@R-rclipboard].

<div class="goright95">
<a href="#content">top <i class="fa fa-caret-square-o-up" aria-hidden="true"></i></a>
</div>

## Run the Shiny app with docker {-}

- No need to install R
- Install docker on your system
- Make sure you can run a docker example image, i.e. ubuntu, in the console (system terminal)

```
docker pull fercyto/idiogramfish

# Run the image
docker run -d -p 8080:8080 fercyto/idiogramfish
```

In your internet browser go to [http://localhost:8080](http://localhost:8080){target='_blank'}

```
# Stop the container
docker ps
docker stop {container id}
```

## Installation instructions {-}

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = TRUE}
if (requireNamespace("RCurl", quietly = TRUE)) {
  cranversion <- "https://www.r-pkg.org/badges/version/idiogramFISH"
  cranversion_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(cranversion)), error = function(e) NA)

  if (!is.na(cranversion_cont)) {
    cranversion_contFile <- "../man/figures/cranversion.svg"
    writeLines(cranversion_cont, con = cranversion_contFile)
    cranversion_contFile <- normalizePath(cranversion_contFile)
    cat(paste0("[![CRAN repo](", knitr::include_graphics(cranversion_contFile), ")](https://CRAN.R-project.org/package=idiogramFISH)"))
  }

  doi_link <- tryCatch(suppressWarnings(badger::badge_custom("DOI", "10.5281/zenodo.3579417", "violet")), error = function(e) NA)
  if (!is.na(doi_link)) {
    doi_link <- gsub("\\[|\\]|!|\\(|\\)", "", doi_link)
    doibadge_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(doi_link)), error = function(e) NA)
    if (!is.na(doibadge_cont)) {
      doibadge_contFile <- "../man/figures/doibadge.svg"
      writeLines(doibadge_cont, con = doibadge_contFile)
      doibadge_contFile <- normalizePath(doibadge_contFile)
      cat(paste0("&nbsp;[![https://doi.org/10.5281/zenodo.3579417](", knitr::include_graphics(doibadge_contFile), ")](https://doi.org/10.5281/zenodo.3579417){target='_blank'}"))
    }
  }
}
```


You can install idiogramFISH from [CRAN](https://cran.r-project.org/package = idiogramFISH) with:

``` r
install.packages("idiogramFISH")
```

Windows users: To avoid installation of R-packages in OneDrive  

``` 
.libPaths()          # read library location
.libPaths("D:R/lib") # set
```

To do that permanently: Search (magnifier) "environment variables" and set R_LIBS_USER to 
`D:\R\lib` (example)

Other option: something in the line of [this link](https://answers.microsoft.com/en-us/windows/forum/all/removing-onedrive-from-default-filefolder-location/7d3c0dd0-3af5-414a-adf4-364dc28f3148?auth = 1)


<div class="goright95">
<a href="#content">top <i class="fa fa-caret-square-o-up" aria-hidden="true"></i></a>
</div>

## Releases {-}

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = TRUE}
if (requireNamespace("RCurl", quietly = TRUE)) {
  # cran version
  v <- "NEWS" # tryCatch(suppressWarnings(rvcheck::check_cran("idiogramFISH")$latest_version), error = function(e) NA )

  link <- tryCatch(suppressWarnings(badger::badge_custom("gitlab", paste(v), "orange", "?logo=gitlab")), error = function(e) NA)
  if (!is.na(link)) {
    svglink <- gsub("\\[|\\]|!|\\(|\\)", "", link)
    news_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(svglink)), error = function(e) NA)
    if (!is.na(news_cont)) {
      news_cont_contFile <- "../man/figures/NEWS.svg"
      writeLines(news_cont, con = news_cont_contFile)
      cat(paste0("[![NEWS](", knitr::include_graphics(news_cont_contFile), ")](https://gitlab.com/ferroao/idiogramFISH/blob/master/NEWS.md){target='_blank'}"))
    }
  }
}
```

<!-- [CRAN archive](https://cran.r-project.org/src/contrib/Archive/idiogramFISH/) -->

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = TRUE}
if (requireNamespace("RCurl", quietly = TRUE)) {
  archivelink <- tryCatch(suppressWarnings(badger::badge_custom("CRAN", "archive", "gray")), error = function(e) NA)
  if (!is.na(archivelink)) {
    svgnewdownlink <- gsub("\\[|\\]|!|\\(|\\)", "", archivelink)
    archive_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(svgnewdownlink)), error = function(e) NA)
  }
  if (!is.na(archive_cont)) {
    archive_contFile <- "../man/figures/archive.svg"
    writeLines(archive_cont, con = archive_contFile)
    cat(paste0("[![archive](", knitr::include_graphics(archive_contFile), ")](https://cran.r-project.org/src/contrib/Archive/idiogramFISH/){target='_blank'}"))
  }
}
```

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = TRUE}
if (requireNamespace("RCurl", quietly = TRUE)) {
  newdownlink <- tryCatch(suppressWarnings(badger::badge_custom("CRAN", "downloads", "green")), error = function(e) NA)
  if (!is.na(newdownlink)) {
    svgnewdownlink <- gsub("\\[|\\]|!|\\(|\\)", "", newdownlink)
    realdo_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(svgnewdownlink)), error = function(e) NA)
  }
  if (!is.na(realdo_cont)) {
    realdo_contFile <- "../man/figures/realdownloads.svg"
    writeLines(realdo_cont, con = realdo_contFile)
    # message                                              # link
    cat(paste0("[![downloads](", knitr::include_graphics(realdo_contFile), ")](https://ferroao.gitlab.io/idiogramfishhelppages/downloads.png){target='_blank'}"))
  }
}
```

<div class="goright95">
<a href="#content">top <i class="fa fa-caret-square-o-up" aria-hidden="true"></i></a>
</div>

## Need help? {-}

### Manual in Bookdown style {-}

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = TRUE}
if (requireNamespace("RCurl", quietly = TRUE)) {
  # version of manual
  # cran version
  v <- tryCatch(suppressWarnings(rvcheck::check_cran("idiogramFISH")$latest_version), error = function(e) NA)
  if (is.na(v)) {
    # pkgdown rendering with rvcheck::check_cran fails, so, this is the code for rvcheck::check_cran
    check_release <- function(repo, pkg, msg) {
      installed_version <- tryCatch(packageVersion(pkg), error = function(e) NA)
      repos <- BiocManager::repositories()
      base_url <- repos[repo]
      n <- nchar(base_url)
      suffix <- substring(base_url, n, n)

      if (suffix != "/") {
        base_url <- paste0(base_url, "/")
      }
      if (repo == "CRAN") {
        url <- paste0(base_url, "web/packages/", pkg)
      } else if (repo == "BioCsoft") {
        url <- paste0(base_url, "html/", pkg, ".html")
      }

      x <- readLines(url)
      remote_version <- gsub("\\D+([\\.0-9-]+)\\D+", "\\1", x[grep("<td>Version:{0,1}</td>", x) + 1])

      res <- list(package = pkg,
        installed_version = as.character(installed_version),
        latest_version = remote_version,
        up_to_date = NA)

      if (is.na(installed_version)) {
        message(paste("##", pkg, "is not installed..."))
        message(msg)
      } else {
        if (remote_version > installed_version) {
          message(paste("##", pkg, "is out of date..."))
          message(msg)
          res$up_to_date <- FALSE
        } else if (remote_version == installed_version) {
          message("package is up-to-date release version")
          res$up_to_date <- TRUE
        } else {
          message("devel branch is used, this function only works for release version...")
        }
      }
      return(res)
    }


    check_cran <- function(pkg) {
      msg <- paste("## try",
        paste0('install.packages("', pkg, '")'),
        sep = "\n")
      check_release("CRAN", pkg, msg)
    }
    v <- tryCatch(suppressWarnings(check_cran("idiogramFISH")$latest_version), error = function(e) NA)

  }
  pkg <- "idiogramFISH"
  link <- tryCatch(suppressWarnings(badger::badge_custom("bookdown", paste(pkg, v), "orange")), error = function(e) NA)
  if (!is.na(link)) {
    svglink <- gsub("\\[|\\]|!|\\(|\\)", "", link)
    manual_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(svglink)), error = function(e) NA)
    if (!is.na(manual_cont)) {
      bookdown_contFile <- "../man/figures/cranmanualbookdown.svg"
      writeLines(manual_cont, con = bookdown_contFile)
      #    manual_contFile <- normalizePath(manual_contFile)
      # knitr::include_graphics(manual_contFile)
      cat(paste0("[![https://ferroao.gitlab.io/manualidiogramfish](", knitr::include_graphics(bookdown_contFile), ")](https://ferroao.gitlab.io/manualidiogramfish/)"))
    }
  }
}
```

### Documentation in Pkgdown style {-}

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = TRUE}
if (requireNamespace("RCurl", quietly = TRUE)) {
  # version of manual
  # v<-sub("Version: ","",readLines("DESCRIPTION")[3])
  v <- tryCatch(suppressWarnings(rvcheck:::check_github_gitlab("ferroao/idiogramFISH", "gitlab")$latest_version), error = function(e) NA)
  # cran version
  # v<-tryCatch(suppressWarnings(rvcheck::check_cran("idiogramFISH")$latest_version), error = function(e) NA )

  pkg <- "idiogramFISH"
  pkglink <- tryCatch(suppressWarnings(badger::badge_custom("pkgdown", paste(pkg, v), "cornflowerblue")), error = function(e) NA)
  if (!is.na(pkglink)) {
    pkgsvglink <- gsub("\\[|\\]|!|\\(|\\)", "", pkglink)
    develpkgmanual_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(pkgsvglink)), error = function(e) NA)
    if (!is.na(develpkgmanual_cont)) {
      pkgdownmanual_contFile <- "../man/figures/pkgdownver.svg"
      writeLines(develpkgmanual_cont, con = pkgdownmanual_contFile)
      cat(paste0("[![https://ferroao.gitlab.io/idiogramFISH/articles/index.html](", knitr::include_graphics(pkgdownmanual_contFile), " )](https://ferroao.gitlab.io/idiogramFISH/articles/index.html)"))
    }
  }
}
```


### Vignettes {-}

Online:

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = TRUE}
if (requireNamespace("RCurl", quietly = TRUE)) {
  # version of manual
  v <- tryCatch(suppressWarnings(rvcheck:::check_github_gitlab("ferroao/idiogramFISH", "gitlab")$latest_version), error = function(e) NA)

  pkg <- "idiogramFISH"
  link <- tryCatch(suppressWarnings(badger::badge_custom("vignettes", paste(pkg, v), "cornflowerblue")), error = function(e) NA)
  if (!is.na(link)) {
    vignettelink <- gsub("\\[|\\]|!|\\(|\\)", "", link)
    vignettemanual_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(vignettelink)), error = function(e) NA)
    if (!is.na(vignettemanual_cont)) {
      vignettemanual_contFile <- "../man/figures/develmanualvignette.svg"
      writeLines(vignettemanual_cont, con = vignettemanual_contFile)
      cat(paste0("[![https://ferroao.gitlab.io/idiogramfishhelppages](", knitr::include_graphics(vignettemanual_contFile), ")](https://ferroao.gitlab.io/idiogramfishhelppages)"))
    }
  }
}
```

Launch vignettes from R for the installed version:
``` r
library(idiogramFISH)
packageVersion("idiogramFISH")
browseVignettes("idiogramFISH")
```
<div class="goright95">
<a href="#content">top <i class="fa fa-caret-square-o-up" aria-hidden="true"></i></a>
</div>

## Citation {-}

```{r citation, echo = FALSE, comment = NA, results = 'asis'} 
print(citation("idiogramFISH"), bibtex = FALSE)
```

To write citation to file:
```{r, echo = TRUE, results = FALSE, eval = FALSE}
sink("idiogramFISH.bib")
toBibtex(citation("idiogramFISH"))
sink()
```

<div class="goright95">
<a href="#content">top <i class="fa fa-caret-square-o-up" aria-hidden="true"></i></a>
</div>

## Authors {-}

```{r, echo = F,  results = "asis", eval = T}
img1_path <- "../man/figures/kofi1.png"
img1_path <- normalizePath(img1_path)

if (file.exists(img1_path)) {
  cat(paste0("[Fernando Roa](https://ferroao.gitlab.io/curriculumpu/){target='_blank'}&nbsp;&nbsp;<a href = 'https://ko-fi.com/X7X71PZZG' target='_blank'><img src=", img1_path, " width=\"10%\">"))
} else {
  cat(paste0("[Fernando Roa](https://ferroao.gitlab.io/curriculumpu/){target='_blank'}"))
}
```

``` {r, echo = F, message = FALSE, fig.show = "hold", fig.align = "default", results = "asis", eval = FALSE}
cat("<a href = 'https://ko-fi.com/X7X71PZZG' target='_blank'><img height = '12' style = 'border:0px;height:12px;' src='../man/figures/kofi1.png' border = '0' alt = 'Buy Me a Coffee at ko-fi.com' /></a>")
```

[Mariana PC Telles](http://lattes.cnpq.br/4648436798023532)  

```{r include = FALSE, eval = FALSE}
# automatically create a bib database for R packages, this is currently not used by vignette refs/packages2.bib
knitr::write_bib(c(
  .packages(), "bookdown", "knitr", "rmarkdown", "devtools", "pkgdown", "crayon", "ggtree", "ggplot2", "ggpubr", "phytools", "plyr", "dplyr", "tidyr", "rentrez"
), "refs/packages2.bib")
```
<div class="goright95">
<a href="#content">top <i class="fa fa-caret-square-o-up" aria-hidden="true"></i></a>
</div>

```{r, echo = F}
chapterFile_jupyter <- "../parts/01-jupyter.Rmd"
if (file.exists(chapterFile_jupyter)) {
  childExists_jupyter <- TRUE
  child_docs_jupyter <- chapterFile_jupyter
} else {
  childExists_jupyter <- FALSE
  child_docs_jupyter <- ""
}
```

```{r, child = child_docs_jupyter, eval = childExists_jupyter}

```


```{r, echo = F}
chapterFile_first <- "../parts/02-first.Rmd"
if (file.exists(chapterFile_first)) {
  childExists_first <- TRUE
  child_docs_first <- chapterFile_first
} else {
  childExists_first <- FALSE
  child_docs_first <- ""
}
```

```{r, child = child_docs_first, eval = childExists_first}

```

```{r, echo = F}
chapterFile_minimal <- "../chaptersBLOCK/03-minimal.Rmd"
if (file.exists(chapterFile_minimal)) {
  childExists_minimal <- TRUE
  child_docs_minimal <- chapterFile_minimal
} else {
  childExists_minimal <- FALSE
  child_docs_minimal <- ""
}
```

```{r, child = child_docs_minimal, eval = childExists_minimal}

```

```{r, results = "asis", eval=!childExists_minimal, echo = FALSE}
cat("# Minimal Examples")
```

```{r, results = "asis", eval=!childExists_minimal, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#minimal-examples)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists_minimal, comment = NA}
note <- "03-minimal.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile_plotting <- "../chaptersBLOCK/04-plotting.Rmd"
if (file.exists(chapterFile_plotting)) {
  childExists_plotting <- TRUE
  child_docs_plotting <- chapterFile_plotting
} else {
  childExists_plotting <- FALSE
  child_docs_plotting <- ""
}
```

```{r, child = child_docs_plotting, eval = childExists_plotting}

```


```{r, results = "asis", eval=!childExists_plotting, echo = FALSE}
cat("# Plotting chromosomes")
```

```{r, results = "asis", eval=!childExists_plotting, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#plotting-chromosomes)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists_plotting, comment = NA}
note <- "04-plotting.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile_multiple <- "../chaptersBLOCK/05-multiple.Rmd"
if (file.exists(chapterFile_multiple)) {
  childExists_multiple <- TRUE
  child_docs_multiple <- chapterFile_multiple
} else {
  childExists_multiple <- FALSE
  child_docs_multiple <- ""
}
```

```{r, child = child_docs_multiple, eval = childExists_multiple}

```

```{r, results = "asis", eval=!childExists_multiple, echo = FALSE}
cat("# Several OTUs")
```
```{r, results = "asis", eval=!childExists_multiple, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#multiple-otus)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists_multiple, comment = NA}
note <- "05-multiple.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile_units <- "../chaptersBLOCK/06-units.Rmd"
if (file.exists(chapterFile_units)) {
  childExists_units <- TRUE
  child_docs_units <- chapterFile_units
} else {
  childExists_units <- FALSE
  child_docs_units <- ""
}
```

```{r, child = child_docs_units, eval = childExists_units}

```

```{r, results = "asis", eval=!childExists_units, echo = FALSE}
cat("# Changing Units")
```
```{r, results = "asis", eval=!childExists_units, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#changing-units)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists_units, comment = NA}
note <- "06-units.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile0 <- "../chaptersBLOCK/07-gish.Rmd"
if (file.exists(chapterFile0)) {
  childExists0 <- TRUE
  child_docs0 <- chapterFile0
} else {
  childExists0 <- FALSE
  child_docs0 <- ""
}
```

```{r, child = child_docs0, eval = childExists0}

```

```{r, results = "asis", eval=!childExists0, echo = FALSE}
cat("# GISH")
```
```{r, results = "asis", eval=!childExists0, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#gish)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists0, comment = NA}
note <- "07-gish.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile1 <- "../chaptersBLOCK/08-groups.Rmd"
if (file.exists(chapterFile1)) {
  childExists1 <- TRUE
  child_docs1 <- chapterFile1
} else {
  childExists1 <- FALSE
  child_docs1 <- ""
}
```

```{r, child = child_docs1, eval = childExists1}

```

```{r, results = "asis", eval=!childExists1, echo = FALSE}
cat("# Using groups")
```
```{r, results = "asis", eval=!childExists1, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#groups)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists1, comment = NA}
note <- "08-groups.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile2 <- "../chaptersBLOCK/09-circular.Rmd"
if (file.exists(chapterFile2)) {
  childExists2 <- TRUE
  child_docs2 <- chapterFile2
} else {
  childExists2 <- FALSE
  child_docs2 <- ""
}
```

```{r, child = child_docs2, eval = childExists2}

```

```{r, results = "asis", eval=!childExists2, echo = FALSE}
cat("# Circular plots")
```

```{r, results = "asis", eval=!childExists2, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#circular-plots)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists2, comment = NA}
note <- "09-circular.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile3 <- "../chaptersBLOCK/10-phylogeny.Rmd"
if (file.exists(chapterFile3)) {
  childExists3 <- TRUE
  child_docs3 <- chapterFile3
} else {
  childExists3 <- FALSE
  child_docs3 <- ""
}
```

```{r, child = child_docs3, eval = childExists3}

```

```{r, results = "asis", eval=!childExists3, echo = FALSE}
cat("# Plotting alongside phylogeny")
```
```{r, results = "asis", eval=!childExists3, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#plotting-alongside-phylogeny)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists3, comment = NA}
note <- "10-phylogeny.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile <- "../chaptersBLOCK/11-citrushelp.Rmd"
if (file.exists(chapterFile)) {
  childExists <- TRUE
  child_docs <- chapterFile
} else {
  childExists <- FALSE
  child_docs <- ""
}
```

```{r, child = child_docs, eval = childExists}

```

```{r, results = "asis", eval=!childExists, echo = FALSE}
cat("# *Citrus*")
```
```{r, results = "asis", eval=!childExists, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#citrus)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists, comment = NA}
note <- "11-citrushelp.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile4 <- "../chaptersBLOCK/12-human.Rmd"
if (file.exists(chapterFile4)) {
  childExists4 <- TRUE
  child_docs4 <- chapterFile4
} else {
  childExists4 <- FALSE
  child_docs4 <- ""
}
```

```{r, child = child_docs4, eval = childExists4}

```

```{r, results = "asis", eval=!childExists4, echo = FALSE}
cat("# Human karyotype")
```
```{r, results = "asis", eval=!childExists4, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#human-karyotype)")
```

```{r , echo = FALSE, results = "asis", message = FALSE, eval=!childExists4, comment = NA}
note <- "12-human.ipynb"
pasteLinks(note)
``` 

```{r, echo = F}
chapterFile_param <- "../chaptersBLOCK/13-functions.Rmd"
if (file.exists(chapterFile_param)) {
  childExists_param <- TRUE
  child_docs_param <- chapterFile_param
} else {
  childExists_param <- FALSE
  child_docs_param <- ""
}
```

```{r, child = child_docs_param, eval = childExists_param}

```

```{r, results = "asis", eval=!childExists_param, echo = FALSE}
cat("# Functions")
```
```{r, results = "asis", eval=!childExists_param, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#functions)")
```


```{r, echo = F}
chapterFile_data <- "../chaptersBLOCK/14-datasets.Rmd"
if (file.exists(chapterFile_data)) {
  childExists_data <- TRUE
  child_docs_data <- chapterFile_data
} else {
  childExists_data <- FALSE
  child_docs_data <- ""
}
```

```{r, child = child_docs_data, eval = childExists_data}

```

```{r, results = "asis", eval=!childExists_data, echo = FALSE}
cat("# Datasets")
```
```{r, results = "asis", eval=!childExists_data, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#datasets)")
```

```{r, echo = F}
chapterFile_news <- "../chaptersBLOCK/15-news.Rmd"
if (file.exists(chapterFile_news)) {
  childExists_news <- TRUE
  child_docs_news <- chapterFile_news
} else {
  childExists_news <- FALSE
  child_docs_news <- ""
}
```

```{r, child = child_docs_news, eval = childExists_news}

```

```{r, results = "asis", eval=!childExists_news, echo = FALSE}
cat("# News {-}")
```
```{r, results = "asis", eval=!childExists_news, echo = FALSE}
cat("[https://ferroao.gitlab.io/idiogramfishhelppages](https://ferroao.gitlab.io/idiogramfishhelppages/#news)")
```

# References {-}

::: {#refs_normal}
:::

## R-packages {-}

::: {#refs_software}
:::

## Shiny App {-}

::: {#refs_shiny}
:::

## Documentation {-}

::: {#refs_docs}
:::


