-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.R
99 lines (88 loc) · 2.81 KB
/
startup.R
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.libPaths(unique(c("/gpfs/commons/groups/imielinski_lab/lib/R-4.0.2_KH", .libPaths())))
Sys.setenv(DEFAULT_BSGENOME = "/gpfs/commons/groups/imielinski_lab/DB/GATK/human_g1k_v37_decoy.chrom.sizes")
Sys.setenv(DEFAULT_GENOME = "/gpfs/commons/groups/imielinski_lab/DB/GATK/human_g1k_v37_decoy.chrom.sizes")
Sys.setenv(PATH = paste("~/software/bcftools-1.9", Sys.getenv("PATH"), sep = ":"))
Sys.setenv(BCFTOOLS_PLUGINS = "/gpfs/commons/groups/imielinski_lab/Software/bcftools-1.9/plugins")
startup();
library(withr)
library(skitools)
library(gGnome)
library(Flow)
library(dplyr)
library(bamUtils)
library(skidb)
library(naturalsort)
library(magrittr)
library(signature.tools.lib)
library(tidyr)
library(MASS)
library(khtools)
library(wesanderson)
forceload(.force = T)
## require3(
## withr,
## skitools,
## gGnome,
## Flow,
## dplyr,
## bamUtils,
## skidb,
## naturalsort,
## magrittr,
## signature.tools.lib,
## tidyr,
## MASS,
## khtools,
## wesanderson
## )
## source("~/lab/home/khadi/git/khscripts/patch_gtrack.R")
exprs = expression({
brewer.master <- skitools::brewer.master
`%$%` <- gUtils::`%$%`
`%&%` <- gUtils::`%&%`
## `%Q%` <- gUtils::`%Q%`
`%Q%` <- khtools::`%Q%`
`%+%` <- gUtils::`%+%`
`%-%` <- gUtils::`%-%`
`%^%` <- gUtils::`%^%`
width <- GenomicRanges::width
reduce <- GenomicRanges::reduce
between <- data.table::between
setnames <- data.table::setnames
select <- dplyr::select
update <- Flow::update
cache <- Flow::cache
set <- data.table::set
set_names <- rlang::set_names
matches <- dplyr::matches
n <- dplyr::n
last <- dplyr::last
first <- dplyr::first
tailf <- khtools::tailf
coalesce <- khtools::coalesce
ppdf <- khtools::ppdf
ppng <- khtools::ppng
with_libpaths <- withr::with_libpaths
with_options <- withr::with_options
melt <- data.table::melt
overwritefun(khtools::gr.flipstrand, gUtils::gr.flipstrand); gr.flipstrand <- khtools::gr.flipstrand
.S3method("merge", "Junction", merge.Junction)
registerS3method("merge", "Junction", merge.Junction, envir = globalenv())
.S3method("dcast", "data.table", dcast.data.table)
registerS3method("dcast", "data.table", dcast.data.table, envir = globalenv())
})
eix = seq(2, length(exprs[[1]]))
for (i in eix) {
print(exprs[[1]][[i]])
tryCatch({
eval(exprs[[1]][[i]], envir = globalenv())
}, error = function(e) NULL)
}
## tryCatch({
## .S3method("merge", "Junction", merge.Junction)
## registerS3method("merge", "Junction", merge.Junction, envir = parent.frame())
## }, error = function(e) NULL)
## tryCatch({
## .S3method("dcast", "data.table", dcast.data.table)
## registerS3method("dcast", "data.table", dcast.data.table, envir = parent.frame())
## }, error = function(e) NULL)