This function reads a dataframe with columns: chrName
shortArmSize
and longArmSize
and plots as idiograms. If more
than one species, a column named OTU
is needed. For Mb use preferably
plotIdiogramsHolo
Optionally, it reads another dataframe with the position of
marks (sites) dfMarkPos
, in which case a dataframe for mark color is
necessary dfMarkColor
plotIdiograms(dfChrSize, dfMarkPos, dfCenMarks, dfMarkColor, mycolors,
MarkDistanceType = "beg", orderBySize = TRUE, centromereSize = 1,
chrWidth = 1.5, chrSpacing = 1.5, chrColor = "gray",
cenColor = "gray", roundness = 4, dotRoundCorr = 1.5,
karHeight = 1.2, karSpacing = 1.6, reduDistKar = TRUE,
reduDistKarTol = 9, chrId = "original", distTextChr = 0.3,
indexIdTextSize = 0.4, OTUTextSize = 0.6, legend = "inline",
markLabelSize = 0.4, markLabelSpacer = 2, chrIndex = TRUE,
nameChrIndexPos = 2, karIndex = TRUE, karIndexPos = 0.5,
morpho = TRUE, addOTUName = TRUE, revOTUs = FALSE, ruler = TRUE,
rulerPos = -0.5, rulerPosMod = 0, ruler.tck = -0.004,
rulerNumberPos = 0.2, rulerNumberSize = 0.4, xlimLeftMod = 1,
xlimRightMod = 10, ylimBotMod = 0.2, ylimTopMod = 0.2,
lwd.chr = 2, pattern = "", addMissingOTUAfter = NA,
missOTUspacings = 0, legendWidth = 1.7, ...)
mandatory dataframe, with columns: OTU (optional), chrName, shortArmSize, longArmSize
dataframe of marks (sites): cols: OTU (opt) chrName, markName (name of site), markArm, markDistCen, markSize; column markArm: use p for short and q for long; col markDistCen: use distance from centromere to mark
dataframe, specific for centromeric marks. cols: chrName and markName
dataframe, optional, specifying colors and style for marks (sites);
cols: markName
, markColor
, style
: square
or dots
. (if style
missing: all 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) )
character, if cen
= the distance you provided is to
the center of the mark, if beg
= the distance you provided is to the
beginning of the mark
logical value, when TRUE
, sorts chromosomes by total
length from the largest to the smallest
numeric, this establishes the apparent size of cen in the plot in \(\mu\)m
numeric, chromosome width
numeric, horizontal spacing among chromosomes
character, main color for chromosomes
character, color for centromeres
numeric, shape of vertices of chromosomes and square marks, higher values more squared
numeric, correct roundness of dots and vertices of chromosomes. When style of sites = dots, an increase in this, makes the horizontal radius of the dot smaller
numeric, vertical size of karyotypes
numeric, proportional to karHeight for spacing of karyotypes, y axis, if overlap, increase
boolean, reduce distance among karyotypes FALSE = equally sized karyotypes or TRUE= equally spaced karyotypes
numeric, depends on reduDistKar=TRUE, if zero your karyotypes will have no distance among them, use 1 to 11, if overlap, increase this and karSpacing
character, print name of chromosme, "original"
uses the original
name in OTU column of dfChrSize, "simple"
(just 1 to ...) or ""
(none).
numeric, distance from name of chromosome to chromosome, also affects vertical separation of indices
numeric, font size of chr. and kar. indices and chromosome name
numeric, font size of OTU name (species)
character, "" for no legend; "inline" prints labels near chromosomes; "aside" prints legend to the right of karyotypes
numeric, only if legend != "", size of the text of labels of marks (legend)
numeric, only if legend="aside", space from the rightmost chr. to legend
logical, add arm ratio and centromeric index
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, if TRUE prints the Guerra and Levan classif of cen. position. see ?armRatioCI
boolean, if TRUE adds OTU (species) name to karyotype
boolean, The order of species is the one in the main
dataframe, use TRUE
to reverse
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
numeric, modify position of numbers of ruler
numeric, size of number's font in ruler
numeric, modifies xlim
left argument of plot
numeric, xlim
modification by adding space to the right
of idiograms
numeric, modify ylim
bottom argument of plot
numeric, modify ylim
top argument of plot
thick of border of chr. and marks.
REGEX pattern to remove from names of marks
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 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
factor to increase width of squares and boxes of legend
accepts other arguments for the plot, such as, asp
plot
# NOT RUN {
data(dfOfChrSize)
plotIdiograms(dfOfChrSize)
# }
Run the code above in your browser using DataLab