Learn R Programming

idiogramFISH (version 1.5.1)

plotIdiogramsHolo: Function to plot idiograms without centromere

Description

This function reads a dataframe with columns: chrName and chrSize and plots as idiograms. If more than one species, a column named OTU is needed. Accepts micrometers and Mb.

Optionally, it reads another dataframe with the position of marks (sites) dfMarkPos, in that case the description of marks is necessary in dataframe dfMarkColor

Usage

plotIdiogramsHolo(dfChrSize, dfMarkPos, dfMarkColor, mycolors,
  MarkDistanceType = "beg", origin = "b", orderBySize = TRUE,
  Mb = FALSE, ylabline = 0, chrWidth = 1.5, chrSpacing = 1.5,
  chrColor = "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, lwd.chr = 1,
  karIndex = TRUE, karIndexPos = 0.5, 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, addMissingOTUAfter = NA, missOTUspacings = 0,
  legendWidth = 1.75, ...)

Arguments

dfChrSize

dataframe with columns: OTU (optional), chrName, chrSize (see Mb)

dfMarkPos

dataframe of marks (sites): cols: OTU (opt) chrName, markName (name of site), markPos, markSize

dfMarkColor

dataframe specifying colors for marks (sites); cols: markName, markColor, style: square or dots

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(dfMarkPos$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

origin

use "b" if distance to mark (markPos col. in dfMarkPos) measured from bottom, use "t" for distance to mark from top

orderBySize

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

Mb

boolean, if TRUE distance in dfs is not micrometers but bases, will be shown as Megabases

ylabline,

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

chrWidth

numeric, chromosome width

chrSpacing

numeric, horizontal spacing among chromosomes

chrColor

character, main color for chromosomes

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

karSpacing

numeric, proportional to karHeight for spacing of karyotypes, y axis, if overlap, increase

reduDistKar

boolean, reduce distance among karyotypes FALSE = equally sized karyotypes or TRUE= equally spaced karyotypes

reduDistKarTol

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

chrId

character, print name of chromosme, "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

indexIdTextSize

numeric, font size of chromosome name and A2 index

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

markLabelSize

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

markLabelSpacer

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

lwd.chr

numeric, thick of border of chr. or marks

karIndex

logical, add karyotype index A2 (interchromosomal asymmetry, variation among chromosome sizes)

karIndexPos

numeric, move karyotype index

addOTUName

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

revOTUs

boolean, The order of species is the one in the main dataframe, 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 parameter of plot

xlimRightMod

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

ylimBotMod

numeric, modify ylim bottom parameter of plot

ylimTopMod

numeric, modify ylim top parameter of plot

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 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 boxes of legend

...

accepts other arguments for the plot, such as, asp

Value

plot

See Also

plotIdiograms

plotIdiograms

asymmetryA2

chrbasicdataHolo

markdataholo

dfMarkColor

Examples

Run this code
# NOT RUN {
data(dfChrSizeHolo)
plotIdiogramsHolo(dfChrSizeHolo)

# }

Run the code above in your browser using DataLab