rbbt-study 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +9 -9
- data/lib/rbbt/entity/study.rb +1 -5
- data/lib/rbbt/entity/study/samples.rb +30 -12
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Nzg0NmExMGQ2YjAzMjM1YWJlOWNhN2M1MGRiYTVlZTczZmVjMjlhNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
MDBiYTE4OTc3ZmUzYjNkNTg4ZTYxNzVhOTYwNDI0YTVhZmJjYTc0ZQ==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzVkOTYzOTgyMTYzNTRkZmRlMDk1NzBmZTkxNTU1MGQ5MmFhNDFmM2E0NGYy
|
10
|
+
YTI0MjZkMjdkZmI2M2U1ZDUxNDBhZDc1MmM3YTZkNjViMWNhZDM2NGZjZDVi
|
11
|
+
N2U0N2EzMWUzYTcxMTJhMDNkNGIxMDkwMWEzMDEwZjZiZTAwNTE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzAwOTYyNDdjYTg0YjY0M2I3ZWU2NzBiYWI4YTcwOGE5YjIwOTA0N2EzZTk5
|
14
|
+
MWMzOGFmOGFlNGY3ZWVhZjFmNDU3MzlmMjcwY2VjYjYzYWFiYzNhMGM0Zjgz
|
15
|
+
MzQ2MzAwMjM2NTc4YzNjOGY3OWQwM2FiZDExZDU5N2UzMzQwYzM=
|
data/lib/rbbt/entity/study.rb
CHANGED
@@ -103,11 +103,7 @@ module Study
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def dir
|
106
|
-
|
107
|
-
@dir = Path.setup(File.join(Study.study_dir, self))
|
108
|
-
@dir.resource = Study
|
109
|
-
end
|
110
|
-
@dir
|
106
|
+
@dir ||= Path === Study.study_dir ? Study.study_dir[self] : Path.setup(File.join(Study.study_dir, self), nil, Study)
|
111
107
|
end
|
112
108
|
|
113
109
|
def metadata
|
@@ -1,3 +1,6 @@
|
|
1
|
+
module Study
|
2
|
+
end
|
3
|
+
|
1
4
|
module Sample
|
2
5
|
extend Entity
|
3
6
|
|
@@ -23,8 +26,12 @@ module Sample
|
|
23
26
|
|
24
27
|
def study
|
25
28
|
@study ||= begin
|
26
|
-
|
27
|
-
|
29
|
+
study = info[:study]
|
30
|
+
if study.nil?
|
31
|
+
study = Study.identify_study(self)
|
32
|
+
self.study = study
|
33
|
+
end
|
34
|
+
study
|
28
35
|
end
|
29
36
|
end
|
30
37
|
|
@@ -38,16 +45,18 @@ module Study
|
|
38
45
|
end
|
39
46
|
|
40
47
|
def samples
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
@samples ||= begin
|
49
|
+
samples = local_persist("Sample", :array) do
|
50
|
+
if sample_info.nil?
|
51
|
+
self.cohort.collect{|g| g.jobname }
|
52
|
+
else
|
53
|
+
sample_info.keys
|
54
|
+
end
|
55
|
+
end
|
56
|
+
Sample.setup(samples, self)
|
57
|
+
samples.study = self
|
58
|
+
samples
|
59
|
+
end
|
51
60
|
end
|
52
61
|
|
53
62
|
def match_samples(list)
|
@@ -58,4 +67,13 @@ module Study
|
|
58
67
|
end
|
59
68
|
list
|
60
69
|
end
|
70
|
+
|
71
|
+
def self.identify_study(samples)
|
72
|
+
samples = Array === samples ? samples.flatten : [samples]
|
73
|
+
|
74
|
+
studies = Study.studies.select{|study| Study.setup(study); (study.samples & samples).any? }
|
75
|
+
return nil if studies.length != 1
|
76
|
+
|
77
|
+
studies.first
|
78
|
+
end
|
61
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-study
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem add the study entity with suport for NGS, Microarray and other
|
14
14
|
types of data
|
@@ -19,6 +19,8 @@ extra_rdoc_files:
|
|
19
19
|
- LICENSE.txt
|
20
20
|
- README.rdoc
|
21
21
|
files:
|
22
|
+
- LICENSE.txt
|
23
|
+
- README.rdoc
|
22
24
|
- lib/rbbt/entity/study.rb
|
23
25
|
- lib/rbbt/entity/study/cnv.rb
|
24
26
|
- lib/rbbt/entity/study/cnv/genes.rb
|
@@ -40,8 +42,6 @@ files:
|
|
40
42
|
- lib/rbbt/entity/study/plots.rb
|
41
43
|
- lib/rbbt/entity/study/samples.rb
|
42
44
|
- lib/rbbt/entity/study/snp.rb
|
43
|
-
- LICENSE.txt
|
44
|
-
- README.rdoc
|
45
45
|
homepage: http://github.com/mikisvaz/rbbt-study
|
46
46
|
licenses:
|
47
47
|
- MIT
|
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
64
|
rubyforge_project:
|
65
|
-
rubygems_version: 2.0
|
65
|
+
rubygems_version: 2.2.0
|
66
66
|
signing_key:
|
67
67
|
specification_version: 4
|
68
68
|
summary: Genomic study entity
|