plotIdiograms {idiogramFISH} | R Documentation |
Plot idiograms of karyotypes/genomes with and without centromere
Description
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
Usage
plotIdiograms( dfChrSize, defaultFontFamily, revOTUs = FALSE,
karHeight = 2, karHeiSpace = 2.5, karSepar = TRUE, amoSepar = 10,
addMissingOTUAfter = NA, addMissingOTUBefore = NA, missOTUspacings = 0,
moveKarHor = "", moveAllKarValueHor = 0, moveAllKarValueY = 0,
karAnchorLeft = "", karAnchorRight = "", anchor = FALSE, anchorLineLty = 1,
anchorText = "", anchorTextMParental, anchorTextMoveX = 0.5,
anchorTextMoveY = 1, anchorTextMoveParenX = 0, anchorTextMoveParenY = 0,
anchorVsizeF = 0.5, anchorHsizeF = 1, pchAnchor = 23, moveAnchorV = 0,
moveAnchorH = 0, mkhValue = 0.5, n = 50, markN = 25, notes, leftNotes,
leftNotesUp, notesTextSize = 1, leftNotesTextSize = 1, leftNotesUpTextSize = 1,
notesLeft, notesPosX = 0.5, notesPosY = 0, leftNotesPosX = 0.5,
leftNotesPosY = 0, leftNotesUpPosX = 0.5, leftNotesUpPosY = 0, noteFont = 1,
leftNoteFont = 1, leftNoteFontUp = 1, parseTypes = TRUE, parseStr2lang = FALSE,
propWidth = FALSE, MbThreshold = 10000, threshold = 35, MbUnit = "Mb",
yTitle = "µm", specialyTitle = "cM", specialOTUNames = "", addOTUName = TRUE,
OTUTextSize = 1, OTUfont, OTUfamily = "", OTUasNote = FALSE,
OTUasLeftNote = FALSE, orderChr = "size", chrId = "original",
classMbName = "Pm.", classcMName = "L.G.", classChrName = "Chr.",
classChrNameUp = "Type", classGroupName = "", chrNameUp = FALSE,
chrIdPatternRem, indexIdTextSize = 1, distTextChr = 1, groupUp = FALSE,
groupName = TRUE, groupSepar = 0.5, chromatids = TRUE, arrowsBothChrt = TRUE,
holocenNotAsChromatids = FALSE, excHoloFrArrToSide = FALSE, xModifier = 12,
xModMonoHoloRate = 1, chrWidth = 0.5, chrSpacing = 0.5, specialChrWidth = 0.3,
specialChrSpacing = 0.7, chrColor = "gray", chrBorderColor, centromereSize = 0,
autoCenSize = TRUE, cenColor, fixCenBorder = NULL, gishCenBorder = FALSE,
hideCenLines = 1.75, roundedCen, cenFormat = "rounded", cenFactor = 1,
squareness = 4, lwd.chr = 0.5, lwd.cM, lwd.marks = 99, dfMarkPos,
defaultStyleMark = "square", markDistType = "beg", protruding = 0.2,
startPos = 0, pMarkFac = 0.25, origin = "b", efZero = 1e-05,
cMBeginCenter = FALSE, arrowhead = 0.3, shrinkArrow = 0.3333,
arrowheadWidthShrink = 0.1, arrowsToSide = TRUE, useOneDot = FALSE,
dotsAsOval = FALSE, dfMarkColor, mycolors, alpha_val = 1,
borderOfWhiteMarks = TRUE, colorBorderMark = "", lwd.mimicCen, defCenStyleCol,
pattern = "", legend = "aside", remSimiMarkLeg = TRUE, bannedMarkName,
bMarkNameAside = FALSE, forbiddenMark, legendWidth = 1.7, legendHeight = NA,
markLabelSize = 1, markLabelSpacer = 1, legendYcoord = 0, markNewLine = NA,
mylheight = 0.7, chrSize = FALSE, nsmall = 1, chrSizeMbp = FALSE, markPer = "",
showMarkPos = FALSE, bToRemove = "", perAsFraction = FALSE, chrIndex = "both",
morpho = "both", nameChrIndexPos = 2, karIndex = TRUE, karIndexPos = 0.5,
ruler = TRUE, useMinorTicks = FALSE, miniTickFactor = 10, rulerPos = 0,
ruler.tck = -0.02, rulerNumberPos = 0.5, rulerNumberSize = 1,
collapseCen = TRUE, rulerInterval = 0, rulerIntervalcM = 0,
rulerIntervalMb = 0, ceilingFactor = 0, xPosRulerTitle = 2.6,
yPosRulerTitle = 0, rulerTitleSize = 1, xlimLeftMod = 1, xlimRightMod = 2,
ylimBotMod = 0.2, ylimTopMod = 0.2, callPlot = TRUE, asp = 1,
circularPlot = FALSE, verticalPlot = TRUE, karSpaceHor = 0, shrinkFactor = 0.9,
separFactor = 1.5, labelSpacing = 0.7, labelOutwards = FALSE,
chrLabelSpacing = 0.5, radius = 0.5, rotation = 0.5, circleCenter = 1,
circleCenterY = 1, OTUlabelSpacing = 0.3, OTUsrt = 0, OTUplacing = "first",
OTULabelSpacerx = 0, OTULabelSpacery = 0, OTUcentered = TRUE, OTUjustif = 0,
OTUlegendHeight = NA, roundness, ...
)
Arguments
dfChrSize |
mandatory data.frame, with columns: |
defaultFontFamily |
character. use this as the font family. No default value. |
revOTUs |
boolean, The order of species is the one in the main
data.frame, use |
karHeight |
numeric, vertical size of karyotypes. See also |
karHeiSpace |
numeric, vertical size of karyotypes including spacing. Use with |
karSepar |
boolean, reduce distance among karyotypes |
amoSepar |
numeric, depends on |
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. |
addMissingOTUBefore |
character, when you want to add space (ghost OTUs) before one or several OTUs, pass the names of OTUs after
the desired space in a character vector i.e. |
missOTUspacings |
numeric, when you use |
moveKarHor |
character, OTUs' names of karyotypes that should be moved horizontally. See |
moveAllKarValueHor |
numeric, similar to |
moveAllKarValueY |
numeric, similar to |
karAnchorLeft |
character, OTUs' add anchor to the left of this OTU names of karyotypes. For |
karAnchorRight |
character, OTUs' add anchor to the right of this OTU names of karyotypes. For |
anchor |
boolean, when |
anchorLineLty |
numeric, type of line in |
anchorText |
character, text to add to |
anchorTextMParental |
character, designed to fill with a character object the space left of a missing parental in the
|
anchorTextMoveX |
numeric, for vertical plots with |
anchorTextMoveY |
numeric, for horizontal plots with |
anchorTextMoveParenX |
numeric, for plots with |
anchorTextMoveParenY |
numeric, for plots with |
anchorVsizeF |
numeric, factor to modify vertical size of anchor |
anchorHsizeF |
numeric, factor to modify horizontal size of anchor |
pchAnchor |
numeric, symbol for anchor, see |
moveAnchorV |
numeric, displace anchor vertical portion to right or left. See |
moveAnchorH |
numeric, displace anchor horizontal portion to right or left. See |
mkhValue |
numeric, value to move kar. hor. See |
n |
numeric vertices number for round corners |
markN |
numeric vertices number for round corners of marks |
notes |
data.frame, or csv file name in quotes, (shown to the right of kar.), with columns |
leftNotes |
data.frame, or csv file name in quotes (shown to the left), with columns |
leftNotesUp |
data.frame, or csv file name in quotes, (shown to the left-up), similar to |
notesTextSize |
numeric, font size of notes, see |
leftNotesTextSize |
numeric, font size of notes, see |
leftNotesUpTextSize |
numeric, font size of notes, see |
notesLeft |
deprecated, use a data.frame for |
notesPosX |
numeric, move right notes to the right or left (x axis) |
notesPosY |
numeric, move right notes down or up (y axis) |
leftNotesPosX |
numeric, move left notes to the right or left (x axis) |
leftNotesPosY |
numeric, move left notes ( |
leftNotesUpPosX |
numeric, move up left notes to the right or left (x axis) |
leftNotesUpPosY |
numeric, move up left notes ( |
noteFont |
numeric |
leftNoteFont |
numeric |
leftNoteFontUp |
numeric |
parseTypes |
boolean, parse in |
parseStr2lang |
bolean, parse string in |
propWidth |
boolean, defaults to |
MbThreshold |
numeric, if greater than this number (defaults to |
threshold |
this is the max. value allowed for the main two significative digits, otherwise scale will shrink. For example,
after 35 |
MbUnit |
character, text of units of title when |
yTitle |
character, units for common title. Defaults to |
specialyTitle |
character, title of ruler if OTU is in |
specialOTUNames |
character vector, normally title of ruler is micrometer or Mb (big numbers). Use this param. to be able to put
a different unit in ruler title. See |
addOTUName |
boolean, when |
OTUTextSize |
numeric, font size of OTU name (species). Defaults to |
OTUfont |
numeric, |
OTUfamily |
character, font family for OTU name. |
OTUasNote |
boolean, when |
OTUasLeftNote |
boolean, when |
orderChr |
character, when |
chrId |
character, print name of chromosome, |
classMbName |
character, name of "chromosome" when in Mbp. Defaults to |
classcMName |
character, name of "chromosome" when OTU in |
classChrName |
character, name of "chromosome" when in micrometers (apparently). Defaults to |
classChrNameUp |
character, name of "chromosome" for col. |
classGroupName |
character, name of groups. Defaults to |
chrNameUp |
boolean, when |
chrIdPatternRem |
character, regex pattern to remove from chr. names |
indexIdTextSize |
numeric, font size of chr. and kar. indices and
chromosome name. Defaults to |
distTextChr |
numeric, distance from name of chromosome to chromosome,
also affects vertical separation of indices. Defaults to |
groupUp |
boolean, when |
groupName |
boolean, when |
groupSepar |
numeric, factor for affecting chr. spacing |
chromatids |
boolean, when |
arrowsBothChrt |
boolean, when |
holocenNotAsChromatids |
boolean, when |
excHoloFrArrToSide |
boolean, when |
xModifier |
numeric, for |
xModMonoHoloRate |
numeric, factor to shrink chromatid separ. for holocen. 5 means 5 times smaller (quotient). |
chrWidth |
numeric, relative chromosome width. Defaults to |
chrSpacing |
numeric, horizontal spacing among chromosomes, see also |
specialChrWidth |
numeric, relative chromosome width. Defaults to |
specialChrSpacing |
numeric, horizontal spacing among chromosomes for OTUs in |
chrColor |
character, main color for chromosomes. Defaults to |
chrBorderColor |
character, color for border of chromosomes, defaults to |
centromereSize |
numeric, optional, this establishes the apparent size of cen. in the plot in |
autoCenSize |
boolean, when |
cenColor |
character, color for centromeres, if GISH use |
fixCenBorder |
boolean, when |
gishCenBorder |
boolean, when |
hideCenLines |
numeric, factor to multiply line width (lwd) used for covering cen. border, when |
roundedCen |
deprecated, see cenFormat |
cenFormat |
boolean, when |
cenFactor |
numeric, modifies any cen. mark and cen. size. Defaults to |
squareness |
numeric, shape of vertices of chromosomes and square marks,
higher values more squared. Defaults to |
lwd.chr |
thickness of border of chr., some marks and ruler. Thick of |
lwd.cM |
thickness of cM marks. Defaults to |
lwd.marks |
thickness of most marks. Except |
dfMarkPos |
data.frame of marks (sites): columns: |
defaultStyleMark |
character, default style of mark, only used when |
markDistType |
character, if |
protruding |
numeric, when style of mark is |
startPos |
numeric, factor to increase separation of |
pMarkFac |
numeric, fraction of chr. size for |
origin |
For non-monocentric chr. (for holocentrics only) Use |
efZero |
numeric, numbers below this one will be considered as zero, for comparison purposes. Defaults to |
cMBeginCenter |
boolean, start position of |
arrowhead |
numeric, proportion of head of arrow (mark styles: |
shrinkArrow |
numeric, proportion, shrinks body of arrow. Defaults to |
arrowheadWidthShrink |
numeric, proportion, shrinks head of arrow. Defaults to |
arrowsToSide |
boolean, when |
useOneDot |
boolean, use one dot instead of two in style of marks |
dotsAsOval |
boolean, use oval instead of two dots in style of marks |
dfMarkColor |
data.frame, optional, specifying colors and style for marks (sites);
columns: |
mycolors |
character vector, optional, i.e. |
alpha_val |
numeric vector, make marks transparent, accepts values from 0 to 1, @see |
borderOfWhiteMarks |
boolean, if |
colorBorderMark |
character, without default, pass a name of a color to use as border of marks. See |
lwd.mimicCen |
thickness of lines of |
defCenStyleCol |
character, color of outer part of |
pattern |
REGEX pattern to remove from names of marks |
legend |
character, |
remSimiMarkLeg |
boolean, when |
bannedMarkName |
character, character string or vector with mark names to be removed from plot. Not the marks but the labels.
Except when |
bMarkNameAside |
boolean, when |
forbiddenMark |
character, character string or vector with mark names to be removed from plot. Not the marks but the labels. |
legendWidth |
numeric, factor to increase width of squares and of legend. Defaults to |
legendHeight |
numeric, factor to increase height of squares and dots of legend. Automatic. |
markLabelSize |
numeric, only if legend != (not) "", size of the font of
labels of marks (legend). Defaults to |
markLabelSpacer |
numeric, only if |
legendYcoord |
numeric, modify Y position of legend when |
markNewLine |
character, character to split mark Names into different lines. Applies to |
mylheight |
numeric, for |
chrSize |
boolean, when |
nsmall |
numeric, rounding decimals for |
chrSizeMbp |
boolean, when |
markPer |
character vector, name of mark(s) to calculate % of mark in chr. and add it to plot. See |
showMarkPos |
boolean, adds position of marks under karyotype (fraction 0-1) when |
bToRemove |
character vector, bands to remove from calc. of pos., when |
perAsFraction |
boolean, when |
chrIndex |
character, add arm ratio with |
morpho |
character, when |
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. Defaults to |
ruler |
boolean, display ruler to the left of karyotype, when |
useMinorTicks |
boolean, display minor ticks between labeled ticks in ruler. See |
miniTickFactor |
numeric, number of minor ticks for each labeled tick. See |
rulerPos |
numeric, absolute position of ruler, corresponds to |
ruler.tck |
numeric, tick size of ruler, corresponds to |
rulerNumberPos |
numeric, modify position of numbers of ruler. Defaults to |
rulerNumberSize |
numeric, size of number's font in ruler. Defaults to |
collapseCen |
boolean, avoid spacing in ruler between short arm and long arm. |
rulerInterval |
numeric, intervals in ruler. No default, automatic. |
rulerIntervalcM |
numeric, intervals in ruler of OTU in |
rulerIntervalMb |
numeric, intervals in ruler of OTU with data in Mb (> |
ceilingFactor |
numeric, affects number of decimals for ceiling. Affects max. value of ruler. Defaults to |
xPosRulerTitle |
numeric, modify position of ruler title. See |
yPosRulerTitle |
numeric, affects vertical position of ruler title. Defaults to |
rulerTitleSize |
numeric font size of units of ruler. See also |
xlimLeftMod |
numeric, modifies |
xlimRightMod |
numeric, |
ylimBotMod |
numeric, modify |
ylimTopMod |
numeric, modify |
callPlot |
boolean, create new plot in your device. Defaults to |
asp |
numeric, y x aspect of plot. Defaults to |
circularPlot |
boolean, if |
verticalPlot |
boolean, when |
karSpaceHor |
numeric, separation among horizontal karyotypes. When |
shrinkFactor |
numeric, for |
separFactor |
numeric, for |
labelSpacing |
numeric, for |
labelOutwards |
boolean, inline labels projected outwards |
chrLabelSpacing |
numeric, for |
radius |
numeric, for |
rotation |
numeric, anti-clockwise rotation, defaults to |
circleCenter |
numeric, for |
circleCenterY |
numeric, for |
OTUlabelSpacing |
numeric, for |
OTUsrt |
numeric, for |
OTUplacing |
character, for |
OTULabelSpacerx |
numeric, for |
OTULabelSpacery |
numeric, for |
OTUcentered |
boolean, for |
OTUjustif |
numeric, for |
OTUlegendHeight |
numeric, for |
roundness |
deprecated, use |
... |
accepts other arguments for the plot, see, |
Value
plot
See Also
Examples
data(dfOfChrSize)
plotIdiograms(dfOfChrSize, ylimBotMod = .75, rulerPos = -.5)
plotIdiograms(dfOfChrSize, circularPlot = TRUE, chrLabelSpacing = 1)
plotIdiograms(dfChrSizeHolo, rulerPos = -.5)