ranges2UCSC: Generates a bedfile from an input GRanges file

View source: R/exportUCSC.R

ranges2UCSCR Documentation

Generates a bedfile from an input GRanges file

Description

Write a bedfile from Breakpoint.R files for upload on to UCSC Genome browser

Usage

ranges2UCSC(gr, outputDirectory = ".", index = "bedFile", colorRGB = "0,0,0")

Arguments

gr

A GRanges-class object with genomic ranges to be exported into UCSC format.

outputDirectory

Location to write bedfile(s).

index

A character used to name the bedfile(s).

colorRGB

An RGB color to be used for submitted ranges.

Value

NULL

Author(s)

David Porubsky

Examples

## Get an example file
exampleFolder <- system.file("extdata", "example_results", package="breakpointRdata")
exampleFile <- list.files(exampleFolder, full.names=TRUE)[1]
## Load the file 
counts <- get(load(exampleFile))[['counts']]
## Export 'wc' states into a UCSC formated file
ranges2UCSC(gr=counts[counts$states == 'wc'], index='testfile', outputDirectory=tempdir())

daewoooo/breakpointR documentation built on Aug. 4, 2022, 11:21 p.m.