Browse code

fix local processing

Simone authored on 25/04/2021 14:30:39
Showing 2 changed files

... ...
@@ -35,8 +35,9 @@ execute <- function() {
35 35
   WrappeR <- J("it/polimi/genomics/r/Wrapper")
36 36
   remote_proc <- WrappeR$is_remote_processing()
37 37
   datasets <- .jevalArray(WrappeR$get_dataset_list(), simplify = TRUE)
38
+  exists_credential <- exists("GMQL_credentials", envir = .GlobalEnv)
38 39
   
39
-  if(!remote_proc)
40
+  if(!remote_proc && exists_credential)
40 41
     .download_or_upload(datasets)
41 42
   
42 43
   response <- WrappeR$execute()
... ...
@@ -30,7 +30,11 @@ corresponding prefix.}
30 30
 \item{region_attributes}{vector of strings that extracts only region
31 31
 attributes  specified; if NULL no regions attribute is taken and the output
32 32
 is only GRanges made up by the region coordinate attributes
33
-(seqnames, start, end, strand)}
33
+(seqnames, start, end, strand);
34
+It is also possible to assign the \code{\link{FULL}} with or without 
35
+its input parameter; in case was without the `except` parameter, 
36
+all the region attributes are taken, otherwise all the region attributes 
37
+are taken except the input attribute defined by except.}
34 38
 
35 39
 \item{suffix}{name for each metadata column of GRanges. By default it is the
36 40
 value of the metadata attribute named "antibody_target". This string is
... ...
@@ -75,19 +79,14 @@ grl <- import_gmql(test_path, TRUE)
75 79
 sorted_grl <- sort(grl)
76 80
 filter_and_extract(sorted_grl, region_attributes = c("pvalue", "peak"))
77 81
 
78
-## It is also possible to define the region attributes, using the FULL() 
79
-## function parameter, in order to includes every region 
80
-## attributes present into the schema file
82
+## This statement imports a GMQL dataset as GRangesList and filters it
83
+## including all the region attributes
81 84
 
82 85
 sorted_grl_full <- sort(grl)
83
-filter_and_extract(sorted_grl, region_attributes = FULL())
86
+filter_and_extract(sorted_grl_full, region_attributes = FULL())
84 87
 
85
-grl <- import_gmql(test_path, TRUE)
86
-sorted_grl <- sort(grl)
87
-filter_and_extract(sorted_grl, region_attributes = FULL())
88
-
89
-## Also, we can inlcude a list of region attribute inside the FULL() 
90
-## function to exlucde that regions
88
+## This statement imports a GMQL dataset as GRangesList and filters it
89
+## including all the region attributes except "jaccard" and "score"
91 90
 
92 91
 sorted_grl_full_except <- sort(grl)
93 92
 filter_and_extract(