Description Usage Arguments Value See Also Examples
View source: R/04_bed_to_granges.R
Convert geneids into GRanges
1 2 3 | genes_to_granges(geneids, txdb, complement = TRUE, plot = TRUE, verbose = TRUE)
genefile_to_granges(file, txdb, complement = TRUE, plot = TRUE)
|
geneids |
Gene identifier vector |
txdb |
|
complement |
TRUE (default) or FALSE: add complementary strand? |
plot |
TRUE (default) or FALSE |
verbose |
TRUE (default) or FALSE |
file |
Gene identifier file (one per row) |
GRanges-class
char_to_granges
, bed_to_granges
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Entrez
#-------
genefile <- system.file('extdata/SRF.entrez', package='multicrispr')
geneids <- as.character(read.table(genefile)[[1]])
txdb <- getFromNamespace('TxDb.Mmusculus.UCSC.mm10.knownGene',
'TxDb.Mmusculus.UCSC.mm10.knownGene')
(gr <- genes_to_granges(geneids, txdb))
(gr <- genefile_to_granges(genefile, txdb))
# Ensembl
#--------
# txdb <- AnnotationHub::AnnotationHub()[["AH75036"]]
# genefile <- system.file('extdata/SRF.ensembl', package='multicrispr')
# geneids <- as.character(read.table(genefile)[[1]])
# (gr <- genes_to_granges(geneids, txdb))
# (gr <- genefile_to_granges(genefile, txdb))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.