Skip to contents

Helper function defining highlighted markers or genomic regions to be emphasised in mhtplot().

Usage

hmht.control(
  data = NULL,
  colors = "red",
  yoffset = 0.25,
  cex = 1.2,
  boxed = FALSE
)

Arguments

data

Data frame with four columns: chromosome, position, value and label (e.g. gene name).

colors

Character vector of colours used for highlighted regions. Colours are recycled if multiple labels are present.

yoffset

Numeric vertical offset added to the highest highlighted point before placing the label.

cex

Numeric scaling factor for label text.

boxed

Logical. If TRUE, labels are drawn inside a white box with black border.

Value

A list of highlight control parameters for mhtplot().

Examples

## Example highlight specification
hdata <- data.frame(
  chr  = c(1,3,5),
  pos  = c(10000,50000,90000),
  p    = c(1e-8,1e-7,1e-9),
  gene = c("GENE1","GENE2","GENE3")
)
hmht.control(data = hdata, cex=0.8, colors = "red", boxed = TRUE)
#> $data
#>   chr   pos     p  gene
#> 1   1 10000 1e-08 GENE1
#> 2   3 50000 1e-07 GENE2
#> 3   5 90000 1e-09 GENE3
#> 
#> $colors
#> [1] "red"
#> 
#> $yoffset
#> [1] 0.25
#> 
#> $cex
#> [1] 0.8
#> 
#> $boxed
#> [1] TRUE
#>