This function reads a data.frame passed to dfChrSize
with columns: chrName
(mono/holo) and
shortArmSize
and longArmSize
for monocentrics or a column chrSize
for holocentrics and produces a plot of idiograms. If more
than one species, a column named OTU
is needed.
Optionally, it reads another data.frame passed to dfMarkPos
with the position of
marks (sites). Examples: markposDFs
. Another data.frame for mark characteristics
can be used dfMarkColor
or a character vector passed to mycolors
plotIdiograms(
dfChrSize,
Mb,
MbThresholds = c(10000, 1000),
addOTUName = TRUE,
OTUTextSize = 1,
OTUasNote = FALSE,
revOTUs = FALSE,
karHeight = 2,
karHeiSpace = 2.5,
karSepar = TRUE,
amoSepar = 9,
addMissingOTUAfter = NA,
missOTUspacings = 0,
n = 50,
notes,
notesTextSize = 0.4,
notesPos = 0.5,
propWidth = FALSE,
orderBySize = TRUE,
chrId = "original",
indexIdTextSize = 1,
distTextChr = 1,
groupUp = FALSE,
chrWidth = 0.5,
chrSpacing = 0.5,
chrColor = "gray",
centromereSize = 1,
cenColor = "gray",
fixCenBorder = TRUE,
roundness = 4,
lwd.chr = 2,
dfMarkPos,
dfCenMarks,
MarkDistanceType,
markDistType = "beg",
origin = "b",
dfMarkColor,
mycolors,
pattern = "",
dotRoundCorr,
useXYfactor = FALSE,
legend = "aside",
legendWidth = 1.7,
legendHeight = NA,
markLabelSize = 1,
markLabelSpacer = 1,
chrIndex = "both",
morpho = "both",
nameChrIndexPos = 2,
karIndex = TRUE,
karIndexPos = 0.5,
ruler = TRUE,
rulerPos = -0.5,
rulerPosMod = 0,
ruler.tck = -0.02,
rulerNumberPos = 0.5,
rulerNumberSize = 1,
ylabline = 0,
xlimLeftMod = 1,
xlimRightMod = 2,
ylimBotMod = 0.2,
ylimTopMod = 0.2,
...
)
mandatory data.frame, with columns: OTU
(optional), chrName
(mandatory),
shortArmSize
, longArmSize
for monocen. or chrSize
for holocen.
deprecated, use MbThresholds
numeric vector of length 2. c(10000,1000)
. If chrSize > 10000 will be considered Mb. If markSize > 1000 will be considered Mb.
boolean, if TRUE
adds OTU (species) name to karyotype
numeric, font size of OTU name (species). Defaults to 1
. When OTUasNote
is TRUE
, use notesTextSize
instead
boolean, if TRUE
adds OTU (species) name to the right, see notes
boolean, The order of species is the one in the main
data.frame, use TRUE
to reverse
numeric, vertical size of karyotypes. See also karHeiSpace
. Defaults to 2
numeric, vertical size of karyotypes including spacing. Proportional to karHeight
, if overlap, increase
boolean, reduce distance among karyotypes FALSE
= equally
sized karyotypes or TRUE
= equally spaced karyotypes. Incompatible with addMissingOTUAfter
numeric, depends on karSepar=TRUE
, if zero your
karyotypes will have no distance among them, if overlap,
increase this and karHeiSpace
character, when you want to add space (ghost OTUs) after one or several OTUs, pass the names of OTUs preceding the desired space in a character vector i.e. c("species one","species five")
numeric, when you use addMissingOTUAfter
this numeric vector should have the same length and corresponds to the number of free spaces (ghost OTUs) to add after each OTU respectively
numeric vertices number for round corners
data.frame, optional, with columns OTU
and note
for adding notes to each OTU, they appear to the right of chromosomes
numeric, font size of notes, see notes
numeric, move notes to the right
boolean, defaults to FALSE
. Diminishes chr. width with increasing number of OTUs
logical value, when TRUE
, sorts chromosomes by total
length from the largest to the smallest
character, print name of chromosome, "original"
uses the original
name in OTU column of dfChrSize, "simple"
(just 1 to ...) or ""
(none).
numeric, font size of chr. and kar. indices and
chromosome name. Defaults to 1
numeric, distance from name of chromosome to chromosome,
also affects vertical separation of indices. Defaults to 1
boolean, when TRUE
when groups present, they appear over the chr. name. Defaults to TRUE
numeric, relative chromosome width. Defaults to 0.5
numeric, horizontal spacing among chromosomes, see also chrWidth
. Defaults to 0.5
character, main color for chromosomes
numeric, this establishes the apparent size of cen in the plot in \(\mu\)m
character, color for centromeres, if GISH use NULL
boolean, use chr. color as centromere border color, see cenColor
numeric, shape of vertices of chromosomes and square marks, higher values more squared
thick of border of chr. and marks.
data.frame of marks (sites): columns: OTU
(opt), chrName
,
markName
(name of site), chrRegion
(for monocen. and opt for whole arm (w) in holocen.), markDistCen
(for monocen.),
markPos
(for holocen.), markSize
; column chrRegion
:
use p
for short arm, q
for long arm, cen
for centromeric mark and w
for whole chr. mark; column
markDistCen
: use distance from
centromere to mark, not necessary for cen. marks (cen), w, p, q (when whole arm). See also param. markDistType
data.frame, specific for centromeric marks. columns: chrName
and markName
. See also dfMarkPos
for another option to pass cen. marks
deprecated, use markDistType
character, if "cen"
= the distance you provided in data.frame (dfMarkPos
) column markDistCen
or markPos
is to
the center of the mark, if "beg"
= the distance you provided is to the
beginning of the mark (Default)
For non-monocentric chr. (for holocentrics only) Use "b"
if distance to mark in ("markPos"
column in "dfMarkPos"
) data.frame measured from bottom of chromosome, use "t"
for distance to mark from top of chr.
data.frame, optional, specifying colors and style for marks (sites);
columns: markName
, markColor
, style
. style
accepts: square
or dots
.
(if style
missing all are plotted as square
)
character vector, optional, i.e. c("blue","red","green")
for specifying color of marks in order of appearance. if diverges with number of marks will be recycled if dfMarkColor
present, mycolors will be ignored. To know the
order of your marks use something like: unique(c(dfMarkPos$markName,dfCenMarks$markName) )
REGEX pattern to remove from names of marks
numeric, to be deprecated, requires useXYfactor=TRUE
corrects roundness of dots and vertices of chromosomes. When style
of sites = dots
, an increase in this, makes the horizontal radius of the dot smaller. Use asp=1
instead
boolean, for backwards compatibility, for using dotRoundCorr
. Defaults to FALSE
character, ""
for no legend; "inline"
prints labels near
chromosomes; "aside"
prints legend to the right of karyotypes (default). See markLabelSpacer
factor to increase width of squares and of legend
factor to increase height of squares and dots of legend
numeric, only if legend != (not) "", size of the text of
labels of marks (legend). Defaults to 1
numeric, only if legend="aside"
, space from the
rightmost chr. to legend. Defaults to 1
character, add arm ratio with "AR"
and centromeric index with "CI"
, or "both"
(Default), or ""
for none
character, if "both"
(default) prints the Guerra and Levan classif of cen. position, use also "Guerra"
or "Levan"
or ""
for none. See also ?armRatioCI
.
numeric, modify position of name of chr. indices
logical, add karyotype indices A (intrachromosomal - centromere pos.) and A2 (interchromosomal asymmetry, variation among chromosome sizes)
numeric, move karyotype index
boolean, display ruler to the left of karyotype, when FALSE
no ruler
numeric, absolute position of ruler, corresponds to pos
argument of axis
R plot
numeric, modify position of ruler, corresponds to line
argument of axis
R plot
numeric, tick size of ruler, corresponds to tck
argument of
axis
R plot. Defaults to -0.02
numeric, modify position of numbers of ruler. Defaults to 0.5
numeric, size of number's font in ruler. Defaults to 1
numeric, modify position of y axis title (Mb). See MbThresholds
numeric, modifies xlim
left argument of plot
numeric, xlim
right side modification by adding space to the right
of idiograms. Defaults to 2
numeric, modify ylim
bottom argument of plot
numeric, modify ylim
top argument of plot
accepts other arguments for the plot, such as, asp
plot
# NOT RUN {
data(dfOfChrSize)
plotIdiograms(dfOfChrSize, ylimBotMod = .75)
plotIdiograms(dfChrSizeHolo)
# }
Run the code above in your browser using DataLab