granges-utils: GRanges converter functions

Description Usage Arguments Details Value See Also Examples

Description

A set of utilities functions to convert and extract data in 'GRanges' objects.

Usage

1
2
3
  ncbi(x)
  ucsc(x)
  seqchar(x)

Arguments

x

A 'GRanges' object or one inheriting from the 'GRanges' class [required].

Details

Value

For 'ncbi', 'ucsc': An object of the same class as the input.

For 'seqchar': A character vector with 'seqnames'.

See Also

seqnames, mcols

seqlevelsStyle

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  mutect_path = system.file("examples", "mutect.tsv", package = "SomaticSignatures")
  vr1 = readMutect(mutect_path, strip = TRUE)
  
  ## extract the GRanges
  gr = granges(vr1)
  
  ## convert back and forth
  gr_ncbi = ncbi(gr)
  gr_ucsc = ucsc(gr_ncbi)
  
  identical(gr, gr_ucsc)
  
  ## extract the seqnames as a character vector
  seq_chars = seqchar(gr)
  

SomaticSignatures documentation built on Nov. 1, 2018, 2:23 a.m.