Learn R Programming

idiogramFISH (version 1.6.3)

plotIdiograms: FUNCTION to plot idiograms of karyotypes with and without centromere

Description

This function reads a data.frame with columns: chrName 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 with the position of marks (sites) dfMarkPos markpos, in which case a data.frame for mark characteristics is can be used dfMarkColor or a vector for mycolors

Usage

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, karHeiSpace = 1.6, karSepar = TRUE,
  amoSepar = 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, legendHeight = NA,
  Mb = FALSE, ylabline = 0, origin = "b", n = 50, ...)

Arguments

dfChrSize

mandatory data.frame, with columns: OTU (optional), chrName (mandatory), shortArmSize, longArmSize for monocen. or chrSize for holocen.

dfMarkPos

data.frame of marks (sites): cols: OTU (opt) chrName, markName (name of site), markArm (for monocen), markDistCen (for monocen.), markPos (for holocen.), markSize; column markArm: use p for short and q for long; col. markDistCen: use distance from centromere to mark. See param. MarkDistanceType

dfCenMarks

data.frame, specific for centromeric marks. cols: chrName and markName

dfMarkColor

data.frame, optional, specifying colors and style for marks (sites); cols: markName, markColor, style. style accepts: square or dots. (if style missing all are plotted as square)

mycolors

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) )

MarkDistanceType

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

orderBySize

logical value, when TRUE, sorts chromosomes by total length from the largest to the smallest

centromereSize

numeric, this establishes the apparent size of cen in the plot in \(\mu\)m

chrWidth

numeric, relative chromosome width

chrSpacing

numeric, horizontal spacing among chromosomes, see also chrWidth

chrColor

character, main color for chromosomes

cenColor

character, color for centromeres

roundness

numeric, shape of vertices of chromosomes and square marks, higher values more squared

dotRoundCorr

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

karHeight

numeric, vertical size of karyotypes. See also karHeiSpace

karHeiSpace

numeric, vertical size of karyotypes including spacing. Proportional to karHeight, if overlap, increase

karSepar

boolean, reduce distance among karyotypes FALSE = equally sized karyotypes or TRUE = equally spaced karyotypes. Incompatible with addMissingOTUAfter

amoSepar

numeric, depends on karSepar=TRUE, if zero your karyotypes will have no distance among them, if overlap, increase this and karHeiSpace

chrId

character, print name of chromosome, "original" uses the original name in OTU column of dfChrSize, "simple" (just 1 to ...) or "" (none).

distTextChr

numeric, distance from name of chromosome to chromosome, also affects vertical separation of indices

indexIdTextSize

numeric, font size of chr. and kar. indices and chromosome name

OTUTextSize

numeric, font size of OTU name (species)

legend

character, "" for no legend; "inline" prints labels near chromosomes; "aside" prints legend to the right of karyotypes. See markLabelSpacer

markLabelSize

numeric, only if legend != (not) "", size of the text of labels of marks (legend)

markLabelSpacer

numeric, only if legend="aside", space from the rightmost chr. to legend

chrIndex

logical, add arm ratio and centromeric index

nameChrIndexPos

numeric, modify position of name of chr. indices

karIndex

logical, add karyotype indices A (intrachromosomal - centromere pos.) and A2 (interchromosomal asymmetry, variation among chromosome sizes)

karIndexPos

numeric, move karyotype index

morpho

boolean, if TRUE prints the Guerra and Levan classif of cen. position. see ?armRatioCI

addOTUName

boolean, if TRUE adds OTU (species) name to karyotype

revOTUs

boolean, The order of species is the one in the main data.frame, use TRUE to reverse

ruler

boolean, display ruler to the left of karyotype, when FALSE no ruler

rulerPos

numeric, absolute position of ruler, corresponds to pos argument of axis R plot

rulerPosMod

numeric, modify position of ruler, corresponds to line argument of axis R plot

ruler.tck

numeric, tick size of ruler, corresponds to tck argument of axis R plot

rulerNumberPos

numeric, modify position of numbers of ruler

rulerNumberSize

numeric, size of number's font in ruler

xlimLeftMod

numeric, modifies xlim left argument of plot

xlimRightMod

numeric, xlim right side modification by adding space to the right of idiograms

ylimBotMod

numeric, modify ylim bottom argument of plot

ylimTopMod

numeric, modify ylim top argument of plot

lwd.chr

thick of border of chr. and marks.

pattern

REGEX pattern to remove from names of marks

addMissingOTUAfter

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")

missOTUspacings

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

legendWidth

factor to increase width of squares and of legend

legendHeight

factor to increase height of squares and dots of legend

Mb,

boolean, if your measures are in Megabases use TRUE

ylabline,

numeric if Mb=TRUE modify position of y axis title (Mb)

origin,

For non-monocentric chr. (for holocentrics only) Use "b" if distance to mark in ("markPos" col. in "dfMarkPos") data.frame measured from bottom of chromosome, use "t" for distance to mark from top

n,

numeric vertices number for round corners

...

accepts other arguments for the plot, such as, asp

Value

plot

See Also

asymmetry

armRatioCI

chrbasicdatamono

markpos

cenmarkdata

dfMarkColor

Examples

Run this code
# NOT RUN {
data(dfOfChrSize)
plotIdiograms(dfOfChrSize)
# }

Run the code above in your browser using DataLab