saveGenome: Saving and loading 'refGenome' objects

Description Usage Arguments Author(s) Examples

Description

refGenome objects contain all annotation data inside an environment. During saving and loading, the whole content of the environment is loaded and saved. The correct object type is also determined in this way.

Usage

1
saveGenome(object,filename,useBasedir=TRUE,...)

Arguments

object

refGenome (or derived)

filename

Character. Filename of the R-data-file wich is written.

useBasedir

Logical. When TRUE the output file is written into basedir. Otherwise the directory depicted by dirname(filename) is used.

...

(unused)

Author(s)

Wolfgang Kaisers

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
38
39
40
41
42
43
44
45
46
47
48
49
##-------------------------------------##
## A) Ensembl genome
##-------------------------------------##
ensfile <- system.file("extdata", "hs.ensembl.62.small.RData", package="refGenome")
ens <- loadGenome(ensfile)

saveGenome(ens, "ens.RData", useBasedir=FALSE)


## B) Ensembl junctions
junc <- getSpliceTable(ens)

saveGenome(junc, "junc.RData", useBasedir=FALSE)
loadGenome("junc.RData")


##-------------------------------------##
## C) Ensembl exons
##-------------------------------------##
enex <- refExons(ens)

saveGenome(enex, "enex.RData", useBasedir=FALSE)
er <- loadGenome("enex.RData")


##-------------------------------------##
## D) UCSC genome:
##-------------------------------------##
ucfile <- system.file("extdata", "hs.ucsc.small.RData", package="refGenome")
uc <- loadGenome(ucfile)

saveGenome(uc, "uc.RData", useBasedir=FALSE)

##-------------------------------------##
## E) UCSC junctions
##-------------------------------------##
junc <-getSpliceTable(uc)

saveGenome(junc, "junc.RData", useBasedir=FALSE)
jr <- loadGenome("junc.RData")


##-------------------------------------##
## F) UCSC exons
##-------------------------------------##
ucex <- refExons(uc)

saveGenome(ucex, "ucex.RData", useBasedir=FALSE)
ur <- loadGenome("ucex.RData")

refGenome documentation built on May 23, 2019, 1:03 a.m.