Go to home
Go to 1. monocentrics Vignette
Go to 2. holocentrics Vignette
Go to 4. phylogeny Vignette
Go to 5. human Vignette
This guide shows how to plot groups of chromosomes, this can be used to plot heteromorphic pairs
For v. > 1.1.0
1 Load package
visit gitlab for installation instructions https://gitlab.com/ferroao/idiogramFISH
2 Adding the column group
Open your chromosome data - Chr. size - as data.frame and add column
From scratch:
# Example data.frame written in R, use
dfwithgroups<-read.table(text="
chrName shortArmSize longArmSize group
1 1 3 5 1
2 1 3.2 5.5 1
3 1 3.5 4.8 1
4 4 1 3 NA
5 5 3 5 NA
6 X 4 6 NA", header=T, stringsAsFactors=F)
chrName | shortArmSize | longArmSize | group |
---|---|---|---|
1 | 3.0 | 5.0 | 1 |
1 | 3.2 | 5.5 | 1 |
1 | 3.5 | 4.8 | 1 |
4 | 1.0 | 3.0 | NA |
5 | 3.0 | 5.0 | NA |
X | 4.0 | 6.0 | NA |
3 Plotting
You can plot without marks:
plotIdiograms(dfChrSize=dfwithgroups, # chr sizes
orderBySize = TRUE, # order chr. by size
chrColor = "gray", # chr. color
cenColor = "gray", # centromere color
chrId="original", # chr. names as in you data.frame
chrIndex = FALSE, # do not add chr. indices
morpho=FALSE, # do not add chr. morphology
karIndex = FALSE, # do not add karyotype indices
rulerPos=-.5, # position of ruler
rulerNumberSize=.7, # font size of ruler
ylimBotMod = 1, # modify ylim bottom argument
xlimRightMod = 0 # modify xlim right argument
,asp=1 # y x aspect
)
4 Plot heteromorphic pairs
It can be used to plot heteromorphic pairs, see pair 1
dfwithHetero<-read.table(text="
chrName shortArmSize longArmSize group
1 1A 3 5 1
2 1B 3 5 1
4 2 1 3 NA
5 3 3 5 NA
6 4 4 6 NA", header=TRUE, stringsAsFactors=FALSE)
chrName | shortArmSize | longArmSize | group | |
---|---|---|---|---|
1 | 1A | 3 | 5 | 1 |
2 | 1B | 3 | 5 | 1 |
4 | 2 | 1 | 3 | NA |
5 | 3 | 3 | 5 | NA |
6 | 4 | 4 | 6 | NA |
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.
dfOfMarksHetero<-read.table(text=
" chrName markName chrRegion markSize markDistCen
1 1A 5S p 1 0.9
2 1B 45S p 1 0.9
3 2 CMA q 1 1.0
4 3 DAPI q 1 1.0", header=TRUE, stringsAsFactors=FALSE)
chrName | markName | chrRegion | markSize | markDistCen |
---|---|---|---|---|
1A | 5S | p | 1 | 0.9 |
1B | 45S | p | 1 | 0.9 |
2 | CMA | q | 1 | 1.0 |
3 | DAPI | q | 1 | 1.0 |
Plotting the heteromorphic pair
svg("dfwithHetero.svg",width=13.5,height=8 )
plotIdiograms(dfChrSize=dfwithHetero, # chr sizes
dfMarkPos=dfOfMarksHetero, # position of marks
chrColor = "gray", # colors of chr.
cenColor = "gray", # colors of centromeres
chrId="original", # chr. name in df.
chrIndex = FALSE, # do not add chr. indices
morpho=FALSE, # do not add chr. morphologies
karIndex = FALSE, # do not add karyotype indices
distTextChr = .8, # distance from text to chr.
markDistType="cen", # mark position measured to center of mark
orderBySize = FALSE, # do not order chr. by size
rulerPos=-.5, # position of rulers
ruler.tck=-0.01, # size and orientation of ticks of ruler
ylimBotMod = .2 # modify ylim bottom argument
, legendWidth = 1 # width of legend
, asp =1 # y x aspect of plot
)
dev.off()
5 Holocentrics in groups
Let’s modify some data.frames to add a group
data("dfChrSizeHolo")
data("dfMarkPosHolo")
dfMarkPosHoloHetero<-dfMarkPosHolo
dfMarkPosHoloHetero$chrName<-c(3,3,"1A",2,"1B","1B")
dfChrSizeHoloHetero<-dfChrSizeHolo
dfChrSizeHoloHetero$chrName<-c("1A","1B",2,3)
# Adding the group column
dfChrSizeHoloHetero$group<-c(1,1,NA,NA)
plotIdiograms(dfChrSize=dfChrSizeHoloHetero, # df of chr sizes
orderBySize = FALSE, # do not order chr. by size
dfMarkPos=dfMarkPosHoloHetero, # df of position of marks
karIndex = FALSE, # do not add karyotype asymmetry index
addOTUName=FALSE, # do not add name of OTUs
rulerPos=-.5, # position of ruler
ruler.tck=-0.03, # size and orientation of ticks
rulerNumberPos=.9, # position of rulers' numbers
xlimLeftMod=0, # modify left argument of xlim
ylimBotMod=.3 # modifiy bottom argument of ylim
,legendWidth=1 # width of legend
,asp=1 # y x aspect
)
Creating a new data.frame for holocentrics
dfChrSizeHoloGroup<-data.frame(chrName=c(1,1,1,1,2,3,4),
chrSize=c(3.1,3.2,3.3,3.4,4,5,6),
group=c(1,1,1,1,NA,NA,NA)
)
chrName | chrSize | group |
---|---|---|
1 | 3.1 | 1 |
1 | 3.2 | 1 |
1 | 3.3 | 1 |
1 | 3.4 | 1 |
2 | 4.0 | NA |
3 | 5.0 | NA |
4 | 6.0 | NA |
plotIdiograms(dfChrSize=dfChrSizeHoloGroup, # data.frame of chr sizes
orderBySize = FALSE, # do not order chr. by size
karIndex = FALSE, # do not add karyotype indices
rulerPos=-.5, # position of ruler
ruler.tck=-0.03, # size and orientation of ticks of ruler
rulerNumberPos=.9, # position of number of ruler
xlimLeftMod=0, # modify left argument of xlim
xlimRightMod=0, # modify right argument of xlim
ylimBotMod=.3 # modify bottom argument of ylim
,asp =1 # y x aspect
)