pgParams: pgParams: plotgardener parameters object

View source: R/pgParams.R

pgParamsR Documentation

pgParams: plotgardener parameters object

Description

Creates an object of class "pgParams" that can be used by plotgardener functions. pgParams can be used to set a set of parameters to be shared across multiple functions.

Usage

pgParams(assembly = "hg38", gene = NULL, geneBuffer = NULL, ...)

Arguments

assembly

String defining the genome build. Default value is assembly = "hg38".

gene

(optional) String naming a gene used to set the chrom, chromstart, and chromend arguments.

geneBuffer

(optional) Integer base-pairs to extend the start and end of a gene defined by argument gene. Can be one integer or a vector of length 2, where the first integer will extend the start of the gene and the second integer will extend the end of the gene.

...

This function will take any plotgardener function parameters and their values:

  • alpha

  • altchrom

  • altchromend

  • altchromstart

  • archHeight

  • arrow

  • at

  • axis

  • axisLine

  • baseline

  • baseline.color

  • baseline.lwd

  • bg

  • binCap

  • binSize

  • border

  • boxHeight

  • boxWidth

  • breaks

  • BSgenome

  • cex

  • check.overlap

  • chrom

  • chromend

  • chromstart

  • clip

  • collapse

  • colorbyStrand

  • colorTrans

  • column

  • commas

  • curvature

  • data

  • default.units

  • digits

  • display.column

  • draw

  • extend

  • file

  • fill

  • flip

  • fontcolor

  • fontsize

  • geneBackground

  • geneHighlights

  • gene.id.column

  • geneOrder

  • Genome

  • half

  • height

  • id

  • id.lengths

  • image

  • interpolate

  • just

  • label

  • labels

  • leadSNP

  • legend

  • length

  • limitLabel

  • linecolor

  • lineend

  • linejoin

  • lty

  • lwd

  • main

  • margin

  • matrix

  • negData

  • norm

  • OrgDb

  • orientation

  • palette

  • pch

  • plot

  • quiet

  • r

  • range

  • resolution

  • res_scale

  • rot

  • scale

  • scientific

  • scipen

  • sequence

  • shift

  • showBands

  • showGuides

  • sigCol

  • sigLine

  • sigVal

  • spaceHeight

  • spaceWidth

  • strand

  • strandLabels

  • strandSplit

  • stroke

  • style

  • tcl

  • ticks

  • title

  • TxDb

  • type

  • width

  • x

  • xgrid

  • x0

  • x1

  • y

  • ygrid

  • ymax

  • y0

  • y1

  • zrange

Details

pgParams generates arguments from exported plotgardener functions at loading time of the package. Arguments defined in a pgParams object can be passed into the params argument of plotgardener functions. params arguments can be overridden from within plotgardener functions.

pgParams also provides an alternative region definition mechanism. Given a gene name and genome assembly, pgParams returns the appropriate "chrom", "chromstart", and "chromend" with a default buffer of (gene length) / 2 added to the ends of the gene coordinates. The buffer amount can be set manually with the geneBuffer parameter. Buffer extending beyond the length of the chromosome will be trimmed.

Value

Returns an object of class pgParams containing plotgardener function arguments.

Examples

## Load hg19 genomic annotation packages
library("TxDb.Hsapiens.UCSC.hg19.knownGene")
library("org.Hs.eg.db")

## Define parameters
p1 <- pgParams(gene = "IL1B", assembly = "hg19")

## Optionally add more parameters
p2 <- pgParams(fontsize = 10, assembly = "hg19")

## Combine parameters and pass them to a plotgardener function
plotGenes(params = c(p1, p2))

PhanstielLab/BentoBox documentation built on June 30, 2024, 12:50 p.m.