write_mig: Save a GRanges or data frame object to tsv and UCSC-ready bed...

Description Usage Arguments Value Examples

View source: R/export_functions.R

Description

Save a GRanges or data frame object to tsv and UCSC-ready bed file for MIG.

Usage

1
write_mig(x, path = "", genome = "hg19", ucsc_suffix = ".ucsc.bed")

Arguments

x

A GenomicRanges or data.frame object.

path

Path to write to.

genome

A genome build, e.g. hg19

ucsc_suffix

The suffix for the ucsc-ready bed file.

Value

writes an object to a specific path.

Examples

1
2
3
4
5
6
gr <- GRanges(Rle(c("chr2", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)),
IRanges(1:10, width=10:1, names=head(letters, 10)),
Rle(strand(c("-", "+", "*", "+", "-")), c(1, 2, 2, 3, 2)),
score=1:10, GC=seq(1, 0, length=10))

write_bed(gr, path = "output/file.ucsc.bed", ucsc = TRUE)

rmwthorne/rangr documentation built on May 7, 2019, 11:15 a.m.