ranges2UCSC: Generates a bedfile from an input GRanges file

Description Usage Arguments Value Author(s) Examples

View source: R/exportUCSC.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
## 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())

breakpointR documentation built on Nov. 8, 2020, 8:04 p.m.