TransformToGR: Transform gene symbols or region ranges into GRanges object.

Description Usage Arguments Details Value See Also Examples

View source: R/TransformToGR.R

Description

Transform a character vector of gene symbols or region ranges into a GRanges object.

Usage

1
2
3
4
5
TransformToGR(
  genes_char,
  type = c("symbol", "region"),
  genome = c("hg38", "hg19")
)

Arguments

genes_char

A character vector of gene symbols or region ranges. If you select type to be "symbol", then please make sure your input of genes_char is in the format of c("ABCB10", "PEX26"). If you select type to be "region", then please make sure your input of genes_char is in the format of c("chr1:33772367-33791699", "chr22:18555686-18573797").

type

What is the type of genes_char. Can be "symbol" (default) or "region".

genome

Use "hg19" or "hg38" gene reference. Defaults to "hg38". It's only used when type is set to "symbol"

Details

TransformToGR() uses the hg19/hg38 genes to associate gene symbols with their genomic region ranges. The pre-processed dataset is saved in inst/extdata in this package.

Users who wish to add gene symbols to the GRanges created using function TransformToGR() can use function AddMetaData(). Please see AddMetaData for details.

Value

A GRanges object with seqnames, ranges and strand.

See Also

AllCloseByRegions, AllCoeditedRegions, CreateEditingTable, SummarizeAllRegions, TestAssociations, AnnotateResults

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  TransformToGR(
    genes_char = c("PHACTR4", "CCR5", "METTL7A"),
    type = "symbol",
    genome = "hg19"
  )
  
  TransformToGR(
    genes_char = c("chr22:18555686-18573797", "chr22:36883233-36908148"),
    type = "region",
    genome = "hg19"
  )
 

rnaEditr documentation built on Nov. 8, 2020, 8:26 p.m.