rbbt-marq 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/R/GEO.R +40 -3
  2. metadata +2 -2
data/R/GEO.R CHANGED
@@ -2,7 +2,7 @@ library(Biobase);
2
2
  library(GEOquery);
3
3
 
4
4
 
5
- GEO.path <- function(dataset, datadir = NULL){
5
+ GEO.path <- function(dataset, cross_platform = FALSE, datadir = NULL){
6
6
  if (is.null(datadir) && exists('MARQ.config')){
7
7
  datadir= paste(MARQ.config$datadir, 'GEO', sep="/");
8
8
  }
@@ -11,6 +11,11 @@ GEO.path <- function(dataset, datadir = NULL){
11
11
  print("No datadir specified and no default found (MARQ.config$datadir");
12
12
  exit(-1);
13
13
  }
14
+
15
+ if ( length(grep('_cross_platform', dataset)) == 0 && cross_platform){
16
+ dataset = paste(dataset, '_cross_platform', sep = "");
17
+
18
+ }
14
19
 
15
20
 
16
21
  files = Sys.glob(paste(datadir,'*', '*', paste(dataset, 'orders', sep="."), sep="/"));
@@ -19,19 +24,51 @@ GEO.path <- function(dataset, datadir = NULL){
19
24
  return(NULL);
20
25
  }
21
26
  else{
22
- return(files[1]);
27
+ return(sub('.orders','', files[1]));
23
28
  }
24
29
  }
25
30
 
26
31
  GEO.platform <- function(dataset, datadir = NULL){
27
32
 
28
- path = GEO.path(dataset, datadir);
33
+ path = GEO.path(dataset, datadir = datadir);
29
34
 
30
35
  if (is.null(path)){ return(NULL);}
31
36
 
32
37
  return(sub(".*(GPL\\d+).*","\\1", path, perl = TRUE));
33
38
  }
34
39
 
40
+ GEO.platform.path <- function(platform, datadir = NULL){
41
+ if (is.null(datadir) && exists('MARQ.config')){
42
+ datadir= paste(MARQ.config$datadir, 'GEO', sep="/");
43
+ }
44
+
45
+ if (is.null(datadir)){
46
+ print("No datadir specified and no default found (MARQ.config$datadir");
47
+ exit(-1);
48
+ }
49
+
50
+ return(paste(datadir, platform, sep="/"));
51
+ }
52
+
53
+ GEO.platform.datasets <- function(platform, cross_platform = TRUE, series = TRUE, datadir = NULL){
54
+ if (cross_platform){
55
+ cp.suffix = '_cross_platform'
56
+ }
57
+ else{
58
+ cp.suffix = ''
59
+ }
60
+
61
+ if (series){
62
+ pattern = '*'
63
+ }
64
+ else{
65
+ pattern = 'GDS'
66
+ }
67
+ files = Sys.glob(paste(GEO.platform.path(platform, datadir), pattern, paste('*',cp.suffix,'.orders',sep=""),sep="/"))
68
+
69
+ return(sapply(files, function(path){ sub(".*((?:GDS|GSE)\\d+).*", '\\1', path, perl=TRUE)}, USE.NAMES = FALSE));
70
+ }
71
+
35
72
  GEO.values <- function(data){
36
73
  values <- MA.process(data$m, data$conditions, data$two.channel)
37
74
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-marq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-12 00:00:00 +01:00
12
+ date: 2009-11-13 00:00:00 +01:00
13
13
  default_executable: marq_config
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency