plotOneIdeo: plot ideogram with data for one chromosome

View source: R/plotOneIdeo.R

plotOneIdeoR Documentation

plot ideogram with data for one chromosome

Description

plot ideogram with data for one chromosome

Usage

plotOneIdeo(
  ideo,
  dataList,
  parameterList = list(vp = plotViewport(margins = c(0.1, 4.1, 1.1, 0.1)), ideoHeight =
    unit(1/(1 + length(dataList)), "npc"), vgap = unit(1, "lines"), ylabs =
    seqlevels(ideo)[1], ylabsRot = 90, ylabsPos = unit(2.5, "lines"), xaxis = FALSE,
    yaxis = FALSE, xlab = "", types = "barplot", heights = NULL, dataColumn = "score",
    gps = gpar(col = "black", fill = "gray")),
  chrom = seqlevels(ideo)[1],
  colorSheme = gieStain(),
  gp = gpar(fill = NA, lwd = 2),
  ...
)

Arguments

ideo

output of loadIdeogram.

dataList

a GRangesList of data to plot.

parameterList

a list of parameters for each dataset in the dataList. The elements of the parameters could be xlabs, ylabs, etc. type could be barplot, line, point, heatmap.

chrom

A length 1 character vector of chromosome name.

colorSheme

A character vector of giemsa stain colors.

gp

parameters used for grid.roundrect.

...

parameters not used.

Examples

## Not run: 
ideo <- loadIdeogram("hg38")
library(rtracklayer)
library(grid)
dataList <- ideo[seqnames(ideo) %in% "chr1"]
dataList$score <- as.numeric(dataList$gieStain)
dataList <- dataList[dataList$gieStain!="gneg"]
dataList <- GRangesList(dataList, dataList)
grid.newpage()
plotOneIdeo(ideo, dataList, chrom="chr1")

## End(Not run)



jianhong/trackViewer documentation built on Dec. 10, 2024, 10:33 a.m.