Plot the gene patters for given ids.

plotGeneClusterPatterns(
  genesList,
  ids,
  additionalID,
  max_gap = 1e+07,
  colors,
  maxNonEssential = 5,
  alignType = c("local", "global"),
  label_size = 0.5
)

Arguments

genesList

A list of GRanges.

ids

IDs to be plotted. See getGeneCluster.

additionalID

Other IDs should be included.

max_gap

The maximal gaps from the first ID in `ids`.

colors

The colors for genes

maxNonEssential

The maximal number for non-essential genes between two essential genes.

alignType

Align the gene pattern by query gene ('local') or by the clusters ('global').

label_size

The label cex value. default is 0.5.

Value

invisible list of plot data.

Examples

fish <- readRDS(system.file('extdata', 'fish.rds',
                            package = 'geneClusterPattern'))
homologs <- readRDS(system.file('extdata', 'homologs.rds',
                                package = 'geneClusterPattern'))
queryGene <- 'inhbaa'
nearestNeighbors <- getGeneCluster(fish, queryGene, homologs)
genesList <- c(drerio=fish, homologs)
pgp <- plotGeneClusterPatterns(genesList, nearestNeighbors)