getAllHumanGenes: getAllHumanGenes

Description Usage Arguments Value Examples

Description

This function uses the ensembldb package to extract information on all human genes

Usage

1
getAllHumanGenes(con, EnsDb = EnsDb.Hsapiens.v79::EnsDb.Hsapiens.v79)

Arguments

con

A SQLiteConnection object

EnsDb

An EnsDb-class object. Defaults to EnsDb.Hsapiens.v79.

Value

a data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## Not run: 
#standard usage
library(ensembldb)
library(EnsDb.Hsapiens.v79)

ex_con <- setupSQLite()
all_genes <- getAllHumanGenes(ex_con, EnsDb=EnsDb.Hsapiens.v79)

#using annotation hub to make an EnsDb object
library(AnnotationHub)
ah <- AnnotationHub()

## query all available files from Ensembl release 84 for
## Homo sapiens
query(ah, c("Homo", "release-82"))

## get the gtf file
Gtf <- ah[["AH50308"]]

## create a EnsDb database file from the Gtf
DbFile <- ensDbFromGRanges(Gtf, path=tempdir(), organism="Homo_sapiens", version=82, genomeVersion = 'GRCh38')
## Make an EnsDb object from the database file
Edb <- EnsDb(DbFile)

# use the newly create db file
all_genes <- getAllHumanGenes(ex_con, EnsDb=Edb)

#or from a GTF file
## ftp://ftp.ensembl.org/pub/release-82/gtf/homo_sapiens/
gtffile <- "Homo_sapiens.GRCh38.82.gtf.gz"
## generate the SQLite database file
DbFile2 <- ensDbFromGtf(gtf=gtffile, verbose=TRUE)
Edb2 <- EnsDb(DbFile2)
all_genes <- getAllHumanGenes(ex_con, EnsDb=Edb2)


## End(Not run)

chapmandu2/CollateralVulnerability2016 documentation built on May 13, 2019, 3:27 p.m.