idiogramFISH: Shiny App. Idiograms with Marks and Karyotype Indices

```{css, echo=FALSE, eval=T} body { counter-reset: counter-rchunks; }

header {

padding-left: 3em; }

main {

padding-left: 3em; }

div.sourceCode { counter-increment: counter-rchunks; position: relative; overflow: visible; }

div.sourceCode::before { content: 'Code [' counter(counter-rchunks) ']: '; display: inline; position: absolute; left: -5em; font-size: 0.7em;
color: rgb(48, 63, 159); }

``` {r cssjs, results="asis", echo=FALSE, message=FALSE, eval=TRUE}
# <!-- pkgdown --> 
# <!-- jquery --><script src="js/jquery.min.js" crossorigin="anonymous"></script>

myfile<-"js/jquery.min.js"
if(file.exists(myfile)){
cat(paste0('<script src="',myfile,'" crossorigin="anonymous"></script> <!-- # -->'))
}
# <!-- clipboard.js --><script src="js/clipboard.min.js"  crossorigin="anonymous"></script>
myfile<-"js/clipboard.min.js"
if(file.exists(myfile)){
cat(paste0('<script src="',myfile,'" crossorigin="anonymous"></script>'))
}
myfile<-"js/hideOutput.js"
if(file.exists(myfile)){
cat(paste0('<script src="',myfile,'" crossorigin="anonymous"></script>'))
}
# <!-- Font Awesome icons --><link rel="stylesheet" href="css/all.minMod.css"  crossorigin="anonymous">
myfile<-"css/all.minMod.css"
if(file.exists(myfile)){
cat(paste0('<link rel="stylesheet" href="',myfile,'"  crossorigin="anonymous">'))
}
# <!-- Bootstrap --><link rel="stylesheet" href="css/bootstrap.minO.css" crossorigin="anonymous">
myfile<-"css/bootstrap.minO.css"
if(file.exists(myfile)){
cat(paste0('<link rel="stylesheet" href="',myfile,'"  crossorigin="anonymous">'))
}
# <!-- # <script src="js/bootstrap.min.js"  crossorigin="anonymous"></script> -->
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> <!-- # -->'))
}

#Create myheader.html

  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>
[<img src='../man/figures/colab-badge.svg'>](https://colab.research.google.com/github/ferroao/IFjupyter/blob/main/"
,note
,"){target='_blank'}&emsp;
</td>
<td>
&emsp;&emsp;<img src='../man/figures/GitHub-Mark-120px-plus.png' height=25 width=25>&emsp;[Github](https://github.com/ferroao/IFjupyter/blob/main/"
,note
,"){target='_blank'}
</td>
<td>
&emsp;&emsp;[Raw](https://github.com/ferroao/IFjupyter/raw/main/"
,note
,"){target='_blank'}
</td>
</tr>
</table>
</br>
") )
}

``` {r, echo=F, message=FALSE, fig.show = "hold", fig.align = "default", results="asis"} 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 )

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) knitr::include_graphics(manual_contFile) # cat(paste0(" '',")" ) ) } } } # rcurl

# Introduction {-}

<!-- <div style="width:150px;"> -->
<div style="float: right; width: 20%">
```r
img1_path <- "../man/figures/logo.png"
if(file.exists(img1_path)) {
cat(paste0("<img src=",img1_path,">") )
}

The goal of idiogramFISH is to plot idiograms of karyotypes, plasmids and circular chr. having a set of data.frames for chromosome data and optionally marks' data (?plotIdiograms function) [@Roa2021]. Idiograms can also be plotted in concentric circles. Separated chromatids can be visible when not in a circular plot.

Six styles of marks are available: square (squareLeft), dots, cM (cMLeft), cenStyle, upArrow (downArrow), exProtein (inProtein); its legend (label) can be drawn inline or to the right of karyotypes. Three styles of centromere are available: rounded, triangular and internal (inProtein). It is possible to calculate also chromosome and karyotype indexes [@Watanabe1999;@Zarco1986new] and classify chromosome morphology in the categories of Levan [-@Levan1964], and Guerra [-@Guerra1986d].

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], rclipboard [@R-rclipboard].

top

Installation instructions {-}

``` {r, echo=F, message=FALSE, fig.show = "hold", fig.align = "default", results="asis"}

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) # knitr::include_graphics(cranversion_contFile) # cat(paste0("https://CRAN.R-project.org/package=idiogramFISH,")" ) ) cat(paste0("CRAN repo,")" ) ) } # cran version

crandownloads<-"https://cranlogs.r-pkg.org/badges/grand-total/idiogramFISH?color=orange"

crandownloads_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(crandownloads) ), error=function(e) NA )

doibadge <- "https://zenodo.org/badge/DOI/10.5281/zenodo.3579417.svg" doibadge_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(doibadge) ), 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(" 10.5281/zenodo.3579417 ,")" ) ) } # doi

} # rcurl

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

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

Windows users: To avoid installation of packages in OneDrive

.libPaths("D:R/lib") # for example
.libPaths()          # set or read libraries

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

Devel. version {-}

``` {r, echo=F, message=FALSE, warning=FALSE, include=TRUE, fig.show = "hold", fig.align = "default", results="asis"} if (requireNamespace("RCurl", quietly = TRUE) ) { # v<-tryCatch(suppressWarnings(rvcheck:::check_github_gitlab("ferroao/idiogramFISH", "gitlab")$latest_version), error=function(e) NA ) v<-sub("Version: ","",readLines("../DESCRIPTION")[3]) link<-tryCatch(suppressWarnings(badger::badge_custom("devel version", v, "cornflowerblue","?logo=gitlab") ), error=function(e) NA ) if(!is.na(link)){ svglink<-gsub("\[|\]|!|\(|\)","", link) gitbadge_cont <- tryCatch(suppressWarnings(RCurl::getURLContent(svglink) ), error=function(e) NA ) if (!is.na(gitbadge_cont)){ # gitbadge_contFile <- tempfile(fileext = ".svg") gitbadge_contFile <- "../man/figures/gitbadge.svg" writeLines(gitbadge_cont, con = gitbadge_contFile) gitbadge_contFile <- normalizePath(gitbadge_contFile) cat(paste0("gitlab repo,"){target='_blank'}") ) } } }

Install Gitlab dev. ver. with devtools [@R-devtools]:

Attention windows users, please install [Rtools](https://cran.r-project.org/bin/windows/Rtools/){target="_blank"} and [git](https://git-scm.com/download/win) (compilation tools).

Vignettes (optional) use a lua filter, so you would need [pandoc](https://pandoc.org/installing.html){target="_blank"} ver. > 2. and `pandoc-citeproc` or `citeproc`. RStudio comes with pandoc. `rmarkdown::pandoc_version()` 

<div class="fold s">
``` {r, eval=FALSE}
# This installs package devtools, necessary for installing the dev version
install.packages("devtools")

url <- "https://gitlab.com/ferroao/idiogramFISH"

# Packages for vignettes: (optional)
list.of.packages <- c(
    "knitr",
    "kableExtra",
    "rmdformats",
    "rmarkdown",
    "RCurl",
    "rvcheck",
    "badger",
    "rentrez"
    )
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)

# Linux with vignettes and Windows
devtools::install_git(url = url,build_vignettes = TRUE, force=TRUE)

# Mac with vignettes
devtools::install_git(url = url, build_opts=c("--no-resave-data","--no-manual") )

Installing in system terminal {-}

``` {r, eval=FALSE} # clone repository: git clone "https://gitlab.com/ferroao/idiogramFISH" R CMD build idiogramFISH # install R CMD INSTALL idiogramFISH_*.tar.gz wzxhzdk:6 ``` {r, echo=F, message=FALSE, fig.show = "hold", fig.align = "default", results="asis"} 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'}" ) ) } } # rcurl wzxhzdk:7
top
## Need help? {-} ### Manual in Bookdown style {-} ``` {r, echo=F, message=FALSE, fig.show = "hold", fig.align = "default", results="asis"} if (requireNamespace("RCurl", quietly = TRUE) ) { # version of manual # 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" 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/)" ) ) } } } # rcurl wzxhzdk:8 ### Vignettes: {-} Online: ``` {r, echo=F, message=FALSE, fig.show = "hold", fig.align = "default", results="asis"} 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" 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) # manual_contFile <- normalizePath(manual_contFile) # knitr::include_graphics(manual_contFile) cat(paste0("[![https://ferroao.gitlab.io/idiogramfishhelppages](",knitr::include_graphics(vignettemanual_contFile),")](https://ferroao.gitlab.io/idiogramfishhelppages)" ) ) } } } # rcurl wzxhzdk:9
top
## Citation {-} wzxhzdk:10 To write citation to file: wzxhzdk:11
top
## Authors {-} wzxhzdk:12 ``` {r, echo=F, message=FALSE, fig.show = "hold", fig.align = "default", results="asis", eval=FALSE} cat("Buy Me a Coffee at ko-fi.com") wzxhzdk:13
top
wzxhzdk:14 wzxhzdk:15 wzxhzdk:16 wzxhzdk:17 wzxhzdk:18 wzxhzdk:19 wzxhzdk:20 wzxhzdk:21 wzxhzdk:22 wzxhzdk:23 wzxhzdk:24 wzxhzdk:25 wzxhzdk:26 wzxhzdk:27 wzxhzdk:28 wzxhzdk:29 wzxhzdk:30 wzxhzdk:31 wzxhzdk:32 wzxhzdk:33 wzxhzdk:34 wzxhzdk:35 wzxhzdk:36 wzxhzdk:37 wzxhzdk:38 wzxhzdk:39 wzxhzdk:40 wzxhzdk:41 wzxhzdk:42 wzxhzdk:43 wzxhzdk:44 wzxhzdk:45 wzxhzdk:46 wzxhzdk:47 wzxhzdk:48 wzxhzdk:49 wzxhzdk:50 wzxhzdk:51 wzxhzdk:52 wzxhzdk:53 wzxhzdk:54 wzxhzdk:55 wzxhzdk:56 wzxhzdk:57 wzxhzdk:58 wzxhzdk:59 wzxhzdk:60 wzxhzdk:61 wzxhzdk:62 wzxhzdk:63 wzxhzdk:64 wzxhzdk:65 wzxhzdk:66 wzxhzdk:67 wzxhzdk:68 wzxhzdk:69 wzxhzdk:70 wzxhzdk:71 wzxhzdk:72 wzxhzdk:73 wzxhzdk:74 wzxhzdk:75 wzxhzdk:76 # References {-} ::: {#refs_normal} ::: ## R-packages {-} ::: {#refs_software} ::: ## Shiny App {-} ::: {#refs_shiny} ::: ## Documentation {-} ::: {#refs_docs} :::

Try the idiogramFISH package in your browser

Any scripts or data that you put into this service are public.

idiogramFISH documentation built on Sept. 30, 2021, 5:07 p.m.