Go to home
Go to 2. holocentrics Vignette
Go to 3. groups Vignette
Go to 4. phylogeny Vignette
Go to 5. 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:
Open your chromosome data data.frame importing it from a .csv (read.csv) or .xls file (readxl).
For fixing column names use:
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:
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. This data.frame has also the centromeric marks present in all karyotypes.
# 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
5 \"Species one\" 1 DAPI cen
6 \"Species one\" X CMA cen", 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 |
Species one | 1 | DAPI | cen | NA | NA |
Species one | X | CMA | cen | NA | NA |
For fixing column names use something like:
5 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
svg("mydfChrSize.svg",width=13,height=8 )
# png("mydfChrSize.png", width=600, height=400)
plotIdiograms(dfChrSize=mydfChrSize, # chr. size data.frame
dfMarkPos=mydfOfMarks, # mark position df (inc. cen.)
dfMarkColor=mydfMarkColor, # mark style df
roundness=3, # vertices roundness
dotRoundCorr=2.5, # correction of roundness of dots
chrWidth=4.5, # width of chr.
chrSpacing = 4, # space among chr.
karHeiSpace=1.6, # vertical size of karyotype including spacer
indexIdTextSize=1, # font size fo chr name and indices
OTUTextSize=1.2, # font size of OTUs
markLabelSize=1, # 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=1, # font size of ruler numbers
ylimBotMod = 0.4, # modify ylim bottom argument
ylimTopMod = 0 # modify ylim top argument
# ,xlimRightMod = 12
# ,legend="aside" # <- TRY THIS
# ,legendWidth = 1.2
# ,markLabelSpacer = 4
)
dev.off()
After v. 1.1.0, vertices when centromereSize=0
are rounded:
# fig.width=7, fig.height=4.5
png("mydfChrSize2.png", width=600, height=400)
plotIdiograms(dfChrSize = mydfChrSize, # chr. size df
dfMarkColor = mydfMarkColor,# mark style df
dfMarkPos = mydfOfMarks, # mark position df
# cen. marks NOT AVAILABLE for centromereSize = 0
centromereSize = 0, # <- HERE
roundness=3, # vertices roundness
dotRoundCorr=2.5, # correction of roundness of dots
chrWidth=4.5, # width of chr.
chrSpacing = 4, # space among chr.
karHeiSpace=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
# ,markLabelSpacer=5
# ,xlimRightMod = 16 # TRY THIS
# ,legend="aside"
# ,legendWidth = 1.5
)
dev.off()
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.:
charVectorCol <- c("tomato3","darkolivegreen4","dfsd","blue","green")
png("dfOfChrSize.png", width=600, height=400)
par(mar=rep(0,4))
plotIdiograms(dfChrSize = dfOfChrSize, # d.f. of chr. sizes
dfMarkPos = dfOfMarks2, # d.f. of marks' positions
chrColor = "gray", # chr. color
cenColor = "gray", # cen. color
mycolors = charVectorCol, # colors to use
OTUTextSize = 1, # font size for OTU names
dotRoundCorr=2, # correction of roundness of vert. and dots
chrWidth=2.5, # rel. chr. width
chrSpacing = 2.5, # rel. horizontal chr. spacing
karHeiSpace=1.6, # karyotype height including spacing
indexIdTextSize=1, # font size for chr. indexes and chr. name
markLabelSize=1, # font size for labels (legend)
rulerPos=-1.9, # ruler position
ruler.tck=-0.02, # ruler tick orientation and length
rulerNumberPos=.5, # rulers' numbers position
rulerNumberSize=1 # ruler font size
)
dev.off()
6 Example with several species (OTUs)
To illustrate this, we will load some data.frames from the package
- Chromosome sizes
OTU | chrName | shortArmSize | longArmSize | |
---|---|---|---|---|
1 | Species 1 | 1 | 1.5 | 2.0 |
2 | Species 1 | 2 | 2.0 | 2.5 |
3 | Species 1 | 3 | 1.0 | 1.5 |
4 | Species 2 | 1 | 3.0 | 4.0 |
5 | Species 2 | 2 | 4.0 | 5.0 |
6 | Species 2 | 3 | 2.0 | 3.0 |
7 | Species 2 | X | 1.0 | 2.0 |
8 | Species 2 | 4 | 3.0 | 4.0 |
9 | Species 3 | 1 | 3.2 | 4.0 |
10 | Species 3 | 2 | 4.5 | 5.0 |
11 | Species 3 | 3 | 2.0 | 3.0 |
12 | Species 3 | 4 | 1.5 | 2.0 |
13 | Species 3 | 5 | 4.8 | 6.0 |
14 | Species 3 | 6 | 6.1 | 7.0 |
15 | Species 4 | 1 | 1.5 | 2.0 |
16 | Species 4 | 2 | 2.0 | 2.5 |
17 | Species 4 | 3 | 1.0 | 1.5 |
18 | Species 5 | 1 | 3.0 | 4.0 |
19 | Species 5 | 2 | 4.0 | 5.0 |
20 | Species 5 | 3 | 2.0 | 3.0 |
21 | Species 5 | X | 1.0 | 2.0 |
22 | Species 5 | 4 | 3.0 | 4.0 |
23 | Species 6 | 1 | 3.2 | 4.0 |
24 | Species 6 | 2 | 4.5 | 5.0 |
25 | Species 6 | 3 | 2.0 | 3.0 |
26 | Species 6 | 4 | 1.5 | 2.0 |
27 | Species 6 | 5 | 4.8 | 6.0 |
28 | Species 6 | 6 | 6.1 | 7.0 |
231 | Species 7 | 1 | 3.9 | 4.0 |
241 | Species 7 | 2 | 3.8 | 4.0 |
- Mark characteristics, does not require OTU
- optional for ver. > 1.0.0
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 |
Species 2 | 1 | DAPI | cen | NA | NA |
Species 2 | 4 | CMA | cen | NA | NA |
Plotting
# fig.width=6, fig.height=13
# png("bigdfOfChrSize.png", width=650, height=1300)
plotIdiograms(dfChrSize =bigdfOfChrSize,# chr sizes
dfMarkColor=dfMarkColor, # mark characteristics, optional in dev version. see above.
dfMarkPos =bigdfOfMarks, # mark positions (inc. cen. marks)
# cen. marks in bigdfOfMarks
karHeight=1.2, # karyotype rel. height
karHeiSpace=2.2, # karyotype vertical size with spacing
karSepar = TRUE, # modify vertical separation of kar.
amoSepar = 1.2, # Vertical separation of kar. when karSpear = TRUE
dotRoundCorr = .5, # correction factor for dot marks
distTextChr=.5, # distance of chr. to text
morpho=FALSE, # add chr. morphology
indexIdTextSize=.6, # 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
legendHeight = 2, # height of labels
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