| genes_to_granges {multicrispr} | R Documentation |
Convert geneids into GRanges
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) |
char_to_granges, bed_to_granges
# 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))