⚠️There's a newer version (2.0.13) of this package. Take me there.

idiogramFISH

Idiograms with Marks and Karyotype Indices

      

The goal of idiogramFISH is to plot idiograms of karyotypes, plasmids and circ. chr. having a set of data.frames for chromosome data and optionally marks’ data (plotIdiograms function) (Roa and PC Telles, 2020). Idiograms can also be plotted in concentric circles. Six styles of marks are available: square, dots, cM, cenStyle, upArrow, downArrow; its legend (label) can be drawn inline or to the right of karyotypes. It is possible to calculate also chromosome and karyotype indexes (Romero-Zarco, 1986; Watanabe et al., 1999) and classify chromosome morphology in the categories of Levan (1964), and Guerra (1986).

IdiogramFISH was written in R (R Core Team, 2019) and also uses crayon (Csárdi, 2017), tidyr (Wickham and Henry, 2020) and dplyr packages (Wickham et al., 2019a). Documentation was written with R-packages roxygen2 (Wickham et al., 2018), usethis (Wickham and Bryan, 2019), bookdown (Xie, 2016), knitr (Xie, 2015), pkgdown (Wickham and Hesselberth, 2019), Rmarkdown (Xie et al., 2018), rvcheck (Yu, 2019a), badger (Yu, 2019b), kableExtra (Zhu, 2019), prettydoc (Qiu, 2019) and RCurl (Temple Lang and CRAN team, 2019). For some vignette figures, packages rentrez (Winter, 2017), plyr (Wickham, 2011), phytools (Revell, 2012), ggtree (Yu et al., 2018), ggplot2 (Wickham, 2016) and ggpubr (Kassambara, 2019) were used.

Installation

You can install idiogramFISH from CRAN with:

install.packages("idiogramFISH")

Or the devel version of idiogramFISH

From gitlab with devtools (Wickham et al., 2019b)

Attention windows users, please install Rtools and git.

Vignettes use a lua filter, so you need pandoc ver. > 2. rmarkdown::pandoc_version()

# This installs package devtools, necessary for installing the dev version
install.packages("devtools")

url <- "https://gitlab.com/ferroao/idiogramFISH"
# Necessary packages for vignettes:
list.of.packages <- c(
    "plyr",
    "knitr",
    "kableExtra",
    "prettydoc",
    "rmarkdown",
    "RCurl",
    "rvcheck",
    "badger"
    )
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") )
Or install it in terminal:
# clone repository:
git clone "https://gitlab.com/ferroao/idiogramFISH"

R CMD build idiogramFISH
# install
R CMD INSTALL idiogramFISH_*.tar.gz

Releases

News

CRAN archive

Download history

Need help?

Manual in Bookdown style

 

Documentation in Pkgdown style

 

Vignettes:

Online:

 

Launch vignettes from R for the installed version:

packageVersion("idiogramFISH")
browseVignettes("idiogramFISH")

Basic examples

1 How to plot a karyotype:

Define your plotting window size with something like par(pin=c(10,6)), or with svg(), png(), etc. Add chromosome morphology according to Guerra (1986) or (Levan et al., 1964)


library(idiogramFISH)

data(dfOfChrSize) # chromsome data
data(dfMarkColor) # mark general data
data(dfOfMarks2)  # mark position data (inc. cen.)

# svg("testing.svg",width=11,height=4.5 )

opar <- par(no.readonly = TRUE)      # make a copy of current settings if you want to restore them later
#par(opar) # recover par

par(mar=rep(0,4))
plotIdiograms(dfChrSize=dfOfChrSize,    # data.frame of chr. size
              dfMarkColor=dfMarkColor,  # d.f of mark style <- Optional
              dfMarkPos=dfOfMarks2,     # df of mark positions (includes cen. marks)
              
              karHeight=5,              # kar. height
              chrWidth = 1.2,           # chr. width
              chrSpacing = 1,           # space among chr.
              
              morpho="Guerra",          # chr. morpho. classif. (Guerra, Levan, both, "" ) ver. >= 1.12 only
              chrIndex="CI",            # cen. pos. (CI, AR, both, "" ) ver. >= 1.12 only
              
              rulerPos= 0,              # position of ruler
              ruler.tck=-0.01,          # size and orientation of ruler ticks
              rulerNumberSize=.8        # font size of rulers
              ,ylabline= -6             # ruler units (title) pos.
              
              ,legendWidth=1            # width of legend items
              ,fixCenBorder = TRUE      # use chrColor as border color of cen. or cen. marks
              ,distTextChr = 1.2        # chr. text separation
              
              ,xlimLeftMod = 2          # xlim left param.
              ,ylimBotMod = -1          # modify ylim bottom argument
              ,ylimTopMod = 0           # modify ylim top argument
              # ,asp=1                  # y/x aspect, see ?plot
)
# dev.off() # close svg()

Let’s explore the data.frames for monocentrics:

dfOfChrSize

chrName

shortArmSize

longArmSize

1

3

4

2

4

5

3

2

3

X

1

2

dfMarkColor

markName

markColor

style

5S

red

dots

45S

green

square

DAPI

blue

square

CMA

yellow

square

p, q and w marks can have empty columns markDistCen and markSize since v. 1.9.1 to plot whole arms (p, q) and whole chr. w.

dfOfMarks2

chrName

markName

chrRegion

markSize

markDistCen

1

5S

p

1

0.5

1

45S

q

1

0.5

X

45S

p

NA

NA

3

DAPI

q

1

1.0

1

DAPI

cen

NA

NA

X

CMA

cen

NA

NA

2 How to plot a karyotype of holocentrics:

function plotIdiogramsHolo deprecated after ver. > 1.5.1

library(idiogramFISH)

# load some package data.frames - optional
data(dfChrSizeHolo, dfMarkColor, dfMarkPosHolo)

# svg("testing.svg",width=14,height=8 )

par(mar = c(0, 0, 0, 0), omi=rep(0,4), oma=rep(0,4) )
plotIdiograms(dfChrSize  =dfChrSizeHolo, # data.frame of chr. size
              dfMarkColor=dfMarkColor,   # df of mark style
              dfMarkPos  =dfMarkPosHolo, # df of mark positions
              
              addOTUName=FALSE,        # do not add OTU names
              distTextChr = .5,        # chr. name distance to chr.
              
              rulerPos=-.4,            # position of ruler
              rulerNumberPos=.9,       # position of numbers of rulers
              ylabline=-3,             # ruler units (title) pos.
              
              xlimLeftMod=2,           # modify xlim left argument of plot
              ylimBotMod=.2            # modify ylim bottom argument of plot
              ,legendHeight=.5         # height of legend labels
              ,legendWidth = 1.2       # width of legend labels
              # ,asp=1                 # y/x aspect
              )                  
# dev.off() # close svg()

Let’s explore the data.frames for holocentrics:

dfChrSizeHolo

chrName

chrSize

1

3

2

4

3

2

4

5

dfMarkColor

markName

markColor

style

5S

red

dots

45S

green

square

DAPI

blue

square

CMA

yellow

square

dfMarkPosHolo

chrName

markName

markPos

markSize

3

5S

1.0

0.5

3

DAPI

1.5

0.5

1

45S

2.0

0.5

2

DAPI

2.0

0.5

4

CMA

2.0

0.5

4

5S

0.5

0.5

3. Plotting both mono. and holo.

See vignettes for a circular version.

Merge data.frames with plyr (Wickham, 2011)

# chromsome data, if only 1 species, column OTU is optional
require(plyr)
dfOfChrSize$OTU   <- "Species mono"
dfChrSizeHolo$OTU <- "Species holo"
 
monoholoCS <- plyr::rbind.fill(dfOfChrSize,dfChrSizeHolo)

dfOfMarks2$OTU     <-"Species mono"
dfOfMarks2[which(dfOfMarks2$markName=="5S"),]$markSize<-.7
dfMarkPosHolo$OTU <-"Species holo"

monoholoMarks <- plyr::rbind.fill(dfOfMarks2,dfMarkPosHolo)
library(idiogramFISH)

# svg("testing.svg",width=14,height=10 )
par(mar=rep(0,4))
plotIdiograms(dfChrSize  = monoholoCS,   # data.frame of chr. size
              dfMarkColor= dfMarkColor,  # df of mark style
              dfMarkPos  = monoholoMarks,# df of mark positions, includes cen. marks
              
              roundness = 4,             # vertices roundness
              addOTUName = TRUE,         # add OTU names
              OTUTextSize = .7,          # font size of OTU
              distTextChr = .5,          # separ. among chr. and text and among chr. name and indices
              
              karHeiSpace = 3,           # karyotype height inc. spacing
              karIndexPos = .2,          # move karyotype index
              
              legendHeight= 1,           # height of legend labels
              legendWidth = 1,           # width of legend labels
              fixCenBorder = TRUE,       # use chrColor as border color of cen. or cen. marks
              
              rulerPos= 0,               # position of ruler
              ruler.tck=-0.02,           # size and orientation of ruler ticks
              rulerNumberPos=.9,         # position of numbers of rulers
              ylabline=-6,               # ruler units (title) pos.
              
              xlimLeftMod=1,             # modify xlim left argument of plot
              xlimRightMod=3,            # modify xlim right argument of plot
              ylimBotMod= .2             # modify ylim bottom argument of plot
              
              # for Circular Plot, add:
              
              # ,circularPlot = TRUE       # circularPlot
              # ,shrinkFactor = .9         # percentage 1 = 100% of circle with chr.
              # ,circleCenter = 3          # X coordinate of circleCenter (affects legend pos.)
              # ,chrLabelSpacing = .9      # chr. names spacing
              
              # ,OTUsrt = 0                # angle for OTU name (or number)
              # ,OTUplacing = "number"     # Use number and legend instead of name
              # ,OTULabelSpacerx = -1.5    # modify position of OTU label, when OTUplacing="number" or "simple"
              # ,OTUlegendHeight = 1.5     # space among OTU names when in legend - OTUplacing
)
#dev.off() # close svg()

Citation

To cite idiogramFISH in publications, please use:

Roa F, Telles MPC (2020) idiogramFISH: Idiograms with Marks and Karyotype Indices, Universidade Federal de Goiás. Brazil. R-package. version 1.14.7 https://ferroao.gitlab.io/manualidiogramfish/. doi:10.5281/zenodo.3579417

To write citation to file:

sink("idiogramFISH.bib")
toBibtex(citation("idiogramFISH"))
sink()

Authors

Fernando Roa
Mariana PC Telles

References

Guerra M. 1986. Reviewing the chromosome nomenclature of Levan et al. Brazilian Journal of Genetics, 9(4): 741–743

Levan A, Fredga K, Sandberg AA. 1964. Nomenclature for centromeric position on chromosomes Hereditas, 52(2): 201–220. https://doi.org/10.1111/j.1601-5223.1964.tb01953.x. https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1601-5223.1964.tb01953.x

Romero-Zarco C. 1986. A new method for estimating karyotype asymmetry Taxon, 35(3): 526–530. https://onlinelibrary.wiley.com/doi/abs/10.2307/1221906

Watanabe K, Yahara T, Denda T, Kosuge K. 1999. Chromosomal evolution in the genus Brachyscome (Asteraceae, Astereae): statistical tests regarding correlation between changes in karyotype and habit using phylogenetic information Journal of Plant Research, 112: 145–161. http://link.springer.com/article/10.1007/PL00013869

R-packages references

Csárdi G. 2017. Crayon: Colored terminal output. R package version 1.3.4. https://CRAN.R-project.org/package=crayon

Kassambara A. 2019. Ggpubr: ’Ggplot2’ based publication ready plots. R package version 0.2.3. https://CRAN.R-project.org/package=ggpubr

R Core Team. 2019. R: A language and environment for statistical computing R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/

Revell LJ. 2012. Phytools: An r package for phylogenetic comparative biology (and other things). Methods in Ecology and Evolution, 3: 217–223. https://besjournals.onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2011.00169.x

Roa F, PC Telles M. 2020. idiogramFISH: Idiograms with marks and karyotype indices Universidade Federal de Goiás, UFG, Goiânia. R-package. version 1.12.1. https://doi.org/10.5281/zenodo.3579417. https://ferroao.gitlab.io/manualidiogramfish/

Wickham H. 2011. The split-apply-combine strategy for data analysis Journal of Statistical Software, 40(1): 1–29. http://www.jstatsoft.org/v40/i01/

Wickham H. 2016. Ggplot2: Elegant graphics for data analysis Springer-Verlag New York. https://ggplot2.tidyverse.org

Wickham H, François R, Henry L, Müller K. 2019a. Dplyr: A grammar of data manipulation. R package version 0.8.3. https://CRAN.R-project.org/package=dplyr

Wickham H, Henry L. 2020. Tidyr: Tidy messy data. R package version 1.0.2. https://CRAN.R-project.org/package=tidyr

Wickham H, Hester J, Chang W. 2019b. Devtools: Tools to make developing r packages easier. R package version 2.2.1. https://CRAN.R-project.org/package=devtools

Winter DJ. 2017. rentrez: An r package for the ncbi eUtils api The R Journal, 9(2): 520–526

Yu G, Lam TT-Y, Zhu H, Guan Y. 2018. Two methods for mapping and visualizing associated data on phylogeny using ggtree. Molecular Biology and Evolution, 35(2): 3041–3043. https://doi.org/10.1093/molbev/msy194. https://academic.oup.com/mbe/article/35/12/3041/5142656

Documentation references

Qiu Y. 2019. Prettydoc: Creating pretty documents from r markdown. R package version 0.3.0. https://CRAN.R-project.org/package=prettydoc

Temple Lang D, CRAN team. 2019. RCurl: General network (http/ftp/...) client interface for r. R package version 1.95-4.12. https://CRAN.R-project.org/package=RCurl

Wickham H, Bryan J. 2019. Usethis: Automate package and project setup. R package version 1.5.1. https://CRAN.R-project.org/package=usethis

Wickham H, Danenberg P, Eugster M. 2018. Roxygen2: In-line documentation for r. R package version 6.1.1. https://CRAN.R-project.org/package=roxygen2

Wickham H, Hesselberth J. 2019. Pkgdown: Make static html documentation for a package. R package version 1.4.1. https://CRAN.R-project.org/package=pkgdown

Xie Y. 2015. Dynamic documents with R and knitr Chapman; Hall/CRC, Boca Raton, Florida. ISBN 978-1498716963. http://yihui.name/knitr/

Xie Y. 2016. Bookdown: Authoring books and technical documents with R markdown Chapman; Hall/CRC, Boca Raton, Florida. ISBN 978-1138700109. https://github.com/rstudio/bookdown

Xie Y, Allaire JJ, Grolemund G. 2018. R markdown: The definitive guide Chapman; Hall/CRC, Boca Raton, Florida. ISBN 9781138359338. https://bookdown.org/yihui/rmarkdown

Yu G. 2019a. Rvcheck: R/package version check. R package version 0.1.6. https://CRAN.R-project.org/package=rvcheck

Yu G. 2019b. Badger: Badge for r package. R package version 0.0.6. https://CRAN.R-project.org/package=badger

Zhu H. 2019. KableExtra: Construct complex table with ’kable’ and pipe syntax. R package version 1.1.0. https://CRAN.R-project.org/package=kableExtra

Copy Link

Version

Down Chevron

Install

install.packages('idiogramFISH')

Monthly Downloads

1,120

Version

1.14.7

License

GPL (>= 2)

Maintainer

Last Published

March 28th, 2020

Functions in idiogramFISH (1.14.7)