⚠️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 several karyotypes having a set of dataframes for chromosome data and optionally marks’ data (plotIdiograms) (Roa and Telles, 2019). Marks can have square or dot form, its legend (label) can be drawn inline or to the right of karyotypes. It is possible to calculate also chromosome and karyotype indexes and classify chromosomes by morphology (Levan et al., 1964; Guerra, 1986; Romero-Zarco, 1986; Watanabe et al., 1999).

IdiogramFISH was written in R(R Core Team, 2019) and also uses crayon package (Csárdi, 2017). Manuals were written with R-packages bookdown, knitr, pkgdown and Rmarkdown (Allaire et al., 2019; Wickham and Hesselberth, 2019; Xie, 2019a, 2019b)

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

# 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(
    "knitr",
    "kableExtra",
    "prettydoc",
    "rmarkdown",
    "RCurl",
    "rvcheck"
    )
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=T)
# 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

What’s new in gitlab?

ver. > 1.0.0

Releases:

https://gitlab.com/ferroao/idiogramFISH/-/releases

Need help?

Manual in Bookdown style

https://ferroao.gitlab.io/manualidiogramfish/

Documentation in Pkgdown style

https://ferroao.gitlab.io/idiogramFISH

Vignettes:

Online:

Monocentrics
Holocentrics
Groups of chromosomes
Alongside Phylogeny
Human karyotype

Launch vignettes from R:

browseVignettes("idiogramFISH") 

Basic examples

1 How to plot a karyotype:

Define your plotting window size with something like par(pin=c(10,6))


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
par(mar = c(0, 0, 0, 0), omi=rep(0,4), oma=rep(0,4) )

plotIdiograms(dfChrSize=dfOfChrSize,    # data.frame of chr. size
              dfMarkColor=dfMarkColor,  # d.f of mark style                 < == Optional for ver. > 1.0.0
              dfMarkPos=dfOfMarks2,     # df of mark positions (includes cen. marks)
              
              rulerPos=-.9,             # position of rulers
              ruler.tck=-0.01,          # size and orientation of ruler ticks
              rulerNumberSize=.8        # font size of rulers
              
              ,legendWidth=1            # width of legend items
              ,distTextChr = .5         # chr. text separation
              
              ,xlimLeftMod = 2          # xlim left param.
              ,ylimBotMod = 0           # modify ylim bottom argument
              ,ylimTopMod = 0           # modify ylim top argument
              ,asp=1                    # y/x aspect, see ?plot
)

# par(opar)
# dev.off() # close svg()

Let’s explore the dataframes for monocentrics:

dfOfChrSize
chrNameshortArmSizelongArmSize
134
245
323
X12
dfMarkColor
markNamemarkColorstyle
5Sreddots
45Sgreensquare
DAPIbluesquare
CMAyellowsquare

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
chrNamemarkNamechrRegionmarkSizemarkDistCen
15Sp10.5
145Sq10.5
X45SpNANA
3DAPIq11.0
1DAPIcenNANA
XCMAcenNANA

2 How to plot a karyotype of holocentrics:

function plotIdiogramsHolo deprecated after ver. > 1.5.1

library(idiogramFISH)

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

# plotIdiogramsHolo is deprecated
par(mar = c(0, 0, 0, 0), omi=rep(0,4), oma=rep(0,4) )
# svg("testing.svg",width=14,height=8 )
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=-.9,            # position of ruler
              rulerNumberPos=.9,       # position of numbers of rulers
              
              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 dataframes for holocentrics:

dfChrSizeHolo
chrNamechrSize
13
24
32
45
dfMarkColor
markNamemarkColorstyle
5Sreddots
45Sgreensquare
DAPIbluesquare
CMAyellowsquare
dfMarkPosHolo
chrNamemarkNamemarkPosmarkSize
35S1.00.5
3DAPI2.00.5
145S2.00.5
2DAPI2.00.5
4CMA2.00.5
45S0.50.5

3. Plotting both mono. and holo.

Available only for ver. > 1.5.1

Merge data.frames with plyr (Wickham, 2016)

# 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)
# load some saved dataframes

# function plotIdiogramsHolo deprecated for ver. > 1.5.1
par(mar=rep(0,4))

# svg("testing.svg",width=14,height=10 )
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
              
              karHeiSpace = 3,           # karyotype height inc. spacing
              karIndexPos = .2,          # move karyotype index
              
              legendHeight= 1,           # height of legend labels
              legendWidth = 1,           # width of legend labels
              
              rulerPos= -0.5,            # position of ruler
              ruler.tck=-0.02,           # size and orientation of ruler ticks
              rulerNumberPos=.9,         # position of numbers of rulers
              
              xlimLeftMod=1,             # modify xlim left argument of plot
              xlimRightMod=3,            # modify xlim right argument of plot
              ylimBotMod=-.2             # modify ylim bottom argument of plot
              ,asp=1                     # y x aspect ratio
)
#dev.off() # close svg()

4. Plotting GISH results

Available only for ver. > 1.8.3

library(idiogramFISH)
# load some saved dataframes

par(mar=rep(0,4))

# svg("allo.svg",width=10,height=9 )

par(mar = c(0, 0, 0, 0), omi=rep(0,4), oma=rep(0,4) )

plotIdiograms(dfChrSize = parentalAndHybChrSize,  # d.f. of chr. sizes
              dfMarkPos = dfAlloParentMarks,      # d.f. of marks' positions
              cenColor  = NULL                    # cen. color when GISH
              
              ,karHeiSpace=5,                     # karyotype height including spacing
              karSepar = FALSE,                   # equally sized karyotypes       
              
              rulerPos=-1,                        # ruler position
              ruler.tck= -0.002,                  # ruler tick orientation and length
              rulerNumberSize=.5                  # ruler font size
              ,legend=""                          # no legend
              ,asp=1                              # y x aspect ratio

              ,ylimBotMod = 1                     # modifiy ylim bottom argument
              ,xlimRightMod = 0                   # modify xlim right argument
              
)
#dev.off() # close svg()

Let’s explore the dataframes for GISH:

parentalAndHybChrSize
OTUchrNameshortArmSizelongArmSize
Parental 113.24
Parental 141.52
Parental 154.86
Parental 166.17
Parental 213.24
Parental 224.55
Parental 232.03
Allopolyploid13.24
Allopolyploid24.55
Allopolyploid32.03
Allopolyploid41.52
Allopolyploid54.86
Allopolyploid66.17

Use p for short arm, q for long arm, and w for whole chromosome mark.

dfAlloParentMarks
OTUchrNamemarkNamechrRegion
Allopolyploid1Parental 1p
Allopolyploid1Parental 2q
Allopolyploid1Parental 2cen
Allopolyploid2Parental 2w
Allopolyploid3Parental 2w
Allopolyploid4Parental 1w
Allopolyploid5Parental 1w
Allopolyploid6Parental 1w
Parental 16Parental 1w
Parental 15Parental 1w
Parental 11Parental 1w
Parental 14Parental 1w
Parental 22Parental 2w
Parental 21Parental 2w
Parental 23Parental 2w

Citation

To cite idiogramFISH in publications, please use:

Roa F, Telles MPC. 2019. idiogramFISH: Idiograms with Marks and Karyotype Indices, Universidade Federal de Goiás. Brazil. R-package. https://ferroao.gitlab.io/manualidiogramfish/

Authors

Fernando Roa
Mariana Telles

References

Allaire J, Xie Y, McPherson J, Luraschi J, Ushey K, Atkins A, Wickham H, Cheng J, Chang W, Iannone R. 2019. Rmarkdown: Dynamic documents for r. https://CRAN.R-project.org/package=rmarkdown

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

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

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

Roa F, Telles MP. 2019. idiogramFISH: Idiograms with marks and karyotype indices Universidade Federal de Goiás: UFG, Goiânia. https://ferroao.gitlab.io/manualidiogramfish/

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, 145–161. http://link.springer.com/article/10.1007/PL00013869

Wickham H. 2016. Plyr: Tools for splitting, applying and combining data. https://CRAN.R-project.org/package=plyr

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

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

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

Xie Y. 2019a. Bookdown: Authoring books and technical documents with r markdown. https://github.com/rstudio/bookdown

Xie Y. 2019b. Knitr: A general-purpose package for dynamic report generation in r. https://CRAN.R-project.org/package=knitr

Copy Link

Version

Down Chevron

Install

install.packages('idiogramFISH')

Monthly Downloads

1,120

Version

1.11.1

License

GPL (>= 2)

Maintainer

Last Published

December 12th, 2019

Functions in idiogramFISH (1.11.1)