@@ -9,21 +9,21 @@ library(tidyverse)
9
9
10
10
debug = F
11
11
12
- # system.time({
13
- # if (debug){
14
- # tag = paste("_", "default", sep="")
15
- # } else {
16
- # # get options tag
17
- # args = commandArgs(trailingOnly = TRUE)
18
- # tag = args[1]
19
- # input_file = args[2]
20
- # if ( substr(tag, 2, 3) == "--"){
21
- # stop("Please specify an option tag (e.g. \"default\", \"i20e5\")")
22
- # }
23
- # }
24
-
25
- tag = ' I'
26
- input_file = ' ~/Desktop/CHOL/all_splicing_variants_I.bed'
12
+ system.time({
13
+ if (debug ){
14
+ tag = paste(" _" , " default" , sep = " " )
15
+ } else {
16
+ # get options tag
17
+ args = commandArgs(trailingOnly = TRUE )
18
+ tag = args [1 ]
19
+ input_file = args [2 ]
20
+ if ( substr(tag , 2 , 3 ) == " --" ){
21
+ stop(" Please specify an option tag (e.g. \" default\" , \" i20e5\" )" )
22
+ }
23
+ }
24
+
25
+ # tag = 'I'
26
+ # input_file = '~/Desktop/CHOL/all_splicing_variants_I.bed'
27
27
28
28
# All splicing relevant variants (union of rows from variants.bed files; add column with comma-separated list of sample names)
29
29
all_splicing_variants = unique(data.table :: fread(input_file ), sep = ' \t ' , header = T , stringsAsFactors = FALSE )
@@ -158,7 +158,6 @@ a <- function(x, y, z){
158
158
return (x )
159
159
}
160
160
x <- mapply(a , regtools_data $ norm_scores_non , length(all_samples ), regtools_data $ samples )
161
- # x = split(x, rep(1:ncol(x), each = nrow(x)))
162
161
regtools_data $ norm_scores_non = x
163
162
print(" test7" )
164
163
@@ -216,4 +215,4 @@ regtools_data = regtools_data %>% distinct()
216
215
217
216
write.table(regtools_data , file = paste(input_file , " _out_test.tsv" , sep = " " ), quote = FALSE , sep = ' \t ' , row.names = F )
218
217
219
- # })
218
+ })
0 commit comments