granges2bed.igv: granges2bed.igv

View source: R/genomicRegions.R

granges2bed.igvR Documentation

granges2bed.igv

Description

Save a GRanges object to a bed file which can be displayed by IGV

Usage

granges2bed.igv(
  gr,
  fn,
  trackName = NULL,
  scoreCol = NULL,
  na.rm = FALSE,
  nameCol = NULL,
  col.cat = colpal.bde,
  col.cont = c("#EDF8B1", "#41B6C4", "#081D58"),
  col.na = "#bdbdbd",
  col.range = NULL,
  doSort = TRUE
)

Arguments

gr

GRanges object

fn

filename to save bed file to

trackName

track name to be displayed

scoreCol

the score column (in the GRanges elementMetadata) that is optionally used for coloring

na.rm

flag indicating whether items with NA score should be removed

nameCol

the name column (in the GRanges elementMetadata) that is used for labelling the items

col.cat

color panel for coloring categorical scores

col.cont

color panel for coloring numerical scores

col.na

color used for NA scores

col.range

vector of length 2 indicating the range of scores for the color scales to be applied (continuous scores only)

doSort

sort the regions before writing the output

Value

invisibly, the resulting data frame containing the bed file columns


demuellae/muRtools documentation built on Nov. 6, 2024, 9:44 a.m.