Go to home
Go to holocentrics Vignette
Go to groups Vignette
Go to human Vignette
This guide shows the files to plot idiograms of measured karyotypes and optionally marks.
1 Load package
visit gitlab for installation instructions https://gitlab.com/ferroao/idiogramFISH
2 Get your chromosome size data
Initially you have to open your chromosome data as a data.frame.
From scratch:
# Example data.frame written in R, use: (column OTU is optional if only 1 OTU)
mydfChrSize<-read.table(text=
"            OTU chrName shortArmSize longArmSize 
1 \"Species one\"   1     1.5         2.0  
2 \"Species one\"   2     2.0         2.5  
3 \"Species one\"   3     1.0         1.5
4 \"Species one\"   X     2.0         3.5"  ,  header=TRUE, stringsAsFactors=FALSE,fill=TRUE)| OTU | chrName | shortArmSize | longArmSize | 
|---|---|---|---|
| Species one | 1 | 1.5 | 2.0 | 
| Species one | 2 | 2.0 | 2.5 | 
| Species one | 3 | 1.0 | 1.5 | 
| Species one | X | 2.0 | 3.5 | 
loading saved data:
Initially, if you use RStudio, use menu “Session”, “Set working directory” for choosing your desired folder or:
setwd("~/folder/subfolder")Open your chromosome data data.frame importing it from a .csv (read.csv) or .xls file (readxl).
mydfChrSize<-read.csv("somefile.csv")For fixing column names use:
colnames(mydfChrSize)<-c("OTU", "chrName","shortArmSize","longArmSize")3 Get marks general data
This data.frame is optional for ver. > 1.0.0
Open or make your mark data as a data.frame. This data.frame has the marks present in all karyotypes without position info. If style column is not present it will be filled with square during plotting.
# From scratch:
mydfMarkColor<-read.table(text=
"  markName markColor  style
1       5S       red   dots
2      45S     green square
3     DAPI      blue square
4      CMA    yellow square"  ,  header=TRUE, stringsAsFactors=FALSE,fill=TRUE)| markName | markColor | style | 
|---|---|---|
| 5S | red | dots | 
| 45S | green | square | 
| DAPI | blue | square | 
| CMA | yellow | square | 
For fixing column names use:
colnames(mydfMarkColor)<-c("markName", "markColor","style") 4 Get marks positions data
Open or write your mark positions as a data.frame. This data.frame has the marks present in all karyotypes with position info.
# We will use column OTU if data.frame because chromosome size df has it
mydfOfMarks<-read.table(text=
"            OTU chrName markName markArm markSize markDistCen
1 \"Species one\"      1       5S       p      0.5         0.5
2 \"Species one\"      1      45S       q        1         0.5
3 \"Species one\"      X      45S       p        1         1.0
4 \"Species one\"      3     DAPI       q        1         1.0"  ,  header=TRUE, stringsAsFactors=FALSE,fill=TRUE)| OTU | chrName | markName | markArm | markSize | markDistCen | 
|---|---|---|---|---|---|
| Species one | 1 | 5S | p | 0.5 | 0.5 | 
| Species one | 1 | 45S | q | 1.0 | 0.5 | 
| Species one | X | 45S | p | 1.0 | 1.0 | 
| Species one | 3 | DAPI | q | 1.0 | 1.0 | 
For fixing column names use something like:
colnames(mydfMarkColor)<-c("OTU", "chrName","markName","markArm","markSize","markDistCen") 5 Special data.frame for centromeric marks’ data
Open or make your mark data as a data.frame. This data.frame has the centromeric marks present in all karyotypes. Only for centromereSize >0.
# We will use column OTU because data.frame of chromosome size has it
mydfOfCenMarks<-read.table(text=
"             OTU chrName markName
1  \"Species one\"     1     DAPI
2  \"Species one\"     X      CMA"  ,  header=TRUE, stringsAsFactors=FALSE,fill=TRUE)| OTU | chrName | markName | 
|---|---|---|
| Species one | 1 | DAPI | 
| Species one | X | CMA | 
6 Plotting
You can plot without marks (use only 1st data.frame), but we will use all 4 data.frames created. By default the function will calculate indices and morphological categories (Levan et al., 1964; Guerra, 1986; Romero-Zarco, 1986; Watanabe et al., 1999). Use parameters of the function to modify that. See ?plotIdiograms
# fig.width=7, fig.height=4.5
plotIdiograms(dfChrSize=mydfChrSize,      # chr. size data.frame
              dfMarkPos=mydfOfMarks,      # mark position df (not cen.)
              dfCenMarks=mydfOfCenMarks,  # cen. marks df
              dfMarkColor=mydfMarkColor,  # mark style df
              roundness=3,                # vertices roundness  
              dotRoundCorr=2,             # correction of roundness of dots 
              
              chrWidth=4.5,               # width of chr.
              chrSpacing = 4,             # space among chr.
              karSpacing=1.6,             # vertical size of karyotype including spacer
              
              indexIdTextSize=.7,         # font size fo chr name and indices
              OTUTextSize=.7,             # font size of OTUs
              markLabelSize=.7,           # font size of mark legends
              
              rulerPos=-1.9,              # ruler position
              ruler.tck=-0.02,            # ticks of ruler size and orientation
              rulerNumberPos=.5,          # position of numbers in ruler
              rulerNumberSize=.7,         # font size of ruler numbers
              
              ylimBotMod = 0.4,           # modify ylim bottom argument
              ylimTopMod = 0              # modify ylim top argument
)After v. 1.1.0, vertices when centromereSize=0 are rounded:
# fig.width=7, fig.height=4.5
plotIdiograms(dfChrSize=mydfChrSize,      # chr. size df
              dfMarkPos=mydfOfMarks,      # mark position df (not cen.)
              dfMarkColor=mydfMarkColor,  # mark style df
              # dfCenMarks=mydfOfCenMarks,  # cen. marks df, NOT AVAILABLE FOR centromereSize = 0
              centromereSize = 0,         # <- HERE
              
              roundness=3,                # vertices roundness  
              dotRoundCorr=2,             # correction of roundness of dots 
              chrWidth=4.5,               # width of chr.
              chrSpacing = 4,             # space among chr.
              karSpacing=1.6,             # vertical size of karyotype including spacer
              indexIdTextSize=.7,         # font size fo chr name and indices
              OTUTextSize=.7,             # font size of OTUs
              markLabelSize=.7,           # font size of mark legends
              rulerPos=-1.9,              # ruler position
              ruler.tck=-0.02,            # ticks of ruler size and orientation
              rulerNumberPos=.5,          # position of numbers in ruler
              rulerNumberSize=.7,         # font size of ruler numbers
              ylimBotMod = 0.4,           # modify ylim bottom argument
              ylimTopMod = 0              # modify ylim top argument
)For ver. > 1.0.0 there is no need to add dfMarkColor and you can also use the parameter mycolors (optional too), to establish marks’ colors. Colors are assigned depending on the order of marks, i.e.:
unique(c(dfOfMarks$markName,dfOfCenMarks$markName) )
charVectorCol <- c("tomato3","darkolivegreen4","dfsd","blue","green")
plotIdiograms(dfChrSize=dfOfChrSize, 
              dfMarkPos=dfOfMarks, 
              chrColor = "gray",
              cenColor = "gray",
              dfCenMarks=dfOfCenMarks,
              
              mycolors = charVectorCol,
              
              dotRoundCorr=2, chrWidth=2.5, chrSpacing = 2.5,
              karSpacing=1.6, 
              indexIdTextSize=1, 
              markLabelSize=1, 
              rulerPos=-1.9, ruler.tck=-0.02, rulerNumberPos=.5, rulerNumberSize=1
)7 Example with several species (OTUs)
To illustrate this, we will load some data.frames from the package
Chromosome sizes
| OTU | chrName | shortArmSize | longArmSize | 
|---|---|---|---|
| Species 1 | 1 | 1.5 | 2.0 | 
| Species 1 | 2 | 2.0 | 2.5 | 
| Species 1 | 3 | 1.0 | 1.5 | 
| Species 2 | 1 | 3.0 | 4.0 | 
| Species 2 | 2 | 4.0 | 5.0 | 
| Species 2 | 3 | 2.0 | 3.0 | 
| Species 2 | X | 1.0 | 2.0 | 
| Species 2 | 4 | 3.0 | 4.0 | 
| Species 3 | 1 | 3.2 | 4.0 | 
| Species 3 | 2 | 4.5 | 5.0 | 
| Species 3 | 3 | 2.0 | 3.0 | 
| Species 3 | 4 | 1.5 | 2.0 | 
| Species 3 | 5 | 4.8 | 6.0 | 
| Species 3 | 6 | 6.1 | 7.0 | 
| Species 4 | 1 | 1.5 | 2.0 | 
| Species 4 | 2 | 2.0 | 2.5 | 
| Species 4 | 3 | 1.0 | 1.5 | 
| Species 5 | 1 | 3.0 | 4.0 | 
| Species 5 | 2 | 4.0 | 5.0 | 
| Species 5 | 3 | 2.0 | 3.0 | 
| Species 5 | X | 1.0 | 2.0 | 
| Species 5 | 4 | 3.0 | 4.0 | 
| Species 6 | 1 | 3.2 | 4.0 | 
| Species 6 | 2 | 4.5 | 5.0 | 
| Species 6 | 3 | 2.0 | 3.0 | 
| Species 6 | 4 | 1.5 | 2.0 | 
| Species 6 | 5 | 4.8 | 6.0 | 
| Species 6 | 6 | 6.1 | 7.0 | 
Mark characteristics, optional for ver. > 1.0.0, does not require OTU
| markName | markColor | style | 
|---|---|---|
| 5S | red | dots | 
| 45S | green | square | 
| DAPI | blue | square | 
| CMA | yellow | square | 
Mark position
| OTU | chrName | markName | markArm | markDistCen | markSize | 
|---|---|---|---|---|---|
| Species 1 | 1 | 5S | p | 0.5 | 1 | 
| Species 1 | 1 | 45S | q | 0.5 | 1 | 
| Species 1 | 2 | 45S | p | 1.0 | 1 | 
| Species 1 | 3 | DAPI | q | 1.0 | 1 | 
| Species 3 | 3 | 5S | p | 1.0 | 1 | 
| Species 3 | 3 | DAPI | q | 1.0 | 1 | 
| Species 3 | 4 | 45S | p | 2.0 | 1 | 
| Species 3 | 4 | DAPI | q | 2.0 | 1 | 
| Species 3 | 5 | CMA | q | 2.0 | 1 | 
| Species 3 | 6 | 5S | q | 0.5 | 1 | 
Centromeric Marks only
| OTU | chrName | markName | 
|---|---|---|
| Species 2 | 1 | DAPI | 
| Species 2 | 4 | CMA | 
Plotting
# library(idiogramFISH)
plotIdiograms(dfChrSize=bigdfOfChrSize,  # chr sizes
              dfMarkColor=dfMarkColor,   # mark characteristics, optional in dev version. see above. 
              dfMarkPos=bigdfOfMarks,    # mark positions (no cen. marks)
              dfCenMarks=bigdfDataCen,   # cen. marks df
              karHeight=1.2,             # karyotype rel. height
              karSpacing=2.2,            # karyotype vertical size with spacing
              
              dotRoundCorr = .5,         # correction factor for dot marks
              distTextChr=.5,            # distance of chr. to text
              indexIdTextSize=.7,        # font size of indices and chr. name
              OTUTextSize=.9,            # font size of OTU names
              legend="aside",            # position of legend not "inline"
              markLabelSize=.7,          # font size of legend
              markLabelSpacer=1,         # distance from chr. to legend
              morpho=FALSE,              # add chr. morphology
              
              ruler=TRUE,                # add ruler
              rulerPos=-.9,              # position of ruler
              rulerPosMod=3,             # modify position of ruler
              ruler.tck=-0.004,          # size and orient. of ticks in ruler
              rulerNumberPos=.4,         # position of numbers of ruler
              rulerNumberSize=.4,        # font size of ruler
              
              xlimRightMod=2,            # modify xlim right argument
              ylimBotMod = 0,            # modify ylim bottom argument
              ylimTopMod = -.3           # modify ylim top argument
              )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
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