A set of utilities functions to convert and extract data in 'GRanges' objects.
1 2 3
A 'GRanges' object or one inheriting from the 'GRanges' class [required].
grangesExtracts only the 'GRanges' information by dropping the metadata columns of the object. The 'seqinfo' slot is kept.
ncbi, ucscShorthand for converting the seqnames notation to 'UCSC' (e.g. 'chr1', 'chrM') or 'NCBI' (e.g. '1', 'MT”) notation, respectively. This also sets the 'genome' slot in the 'seqinfo' field to 'NA'.
seqcharExtracts the 'seqnames' as a character vector.
For 'ncbi', 'ucsc': An object of the same class as the input.
For 'seqchar': A character vector with 'seqnames'.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.