rbbt-study 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjQ4ZGE4MjE3OWY4MTc3NTlkYjgyYjMyNTFhZDYzMWUzMDM2ZTMyNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmRlOTI4OTgwYTQ2YjE3M2QyNWY5ZmVmYWJjN2M5YTY5N2NkYWYxMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTNiOWUwNTE5N2Q4ZWI2NTgwNjhhNWFiM2NkNWEwNDc2OTY5MjI4YTA3YTVm
|
10
|
+
MzQ4ZWI1MzAzNmMzYTJjYjc0MjU5NWY2ZDBjNTA3NTY1ZWUxNDEwYTc0OTlh
|
11
|
+
ZGExNjNhNzcxNGRjNTY1NTY1NGRkOTdjYTZhZjExN2E5OGFkOWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Nzk1ZmM4MmNmYWIzNGIwZDZiNTQzYmQxYTc1ZTA3NmEzNGYzNWQzYTljM2M3
|
14
|
+
MzI4MTVmN2E3ZDYxMTAzMmEwYWFiODdkOWE3YmMzZjhhZDA4MDAyMjBkNDQy
|
15
|
+
NDlkODcwN2NkYWZjM2ZiODg1NDM3MWFkMGQ0MjUwNGQxYTcwOTU=
|
@@ -17,20 +17,29 @@ module Study
|
|
17
17
|
}
|
18
18
|
|
19
19
|
self.study_registry[:sample_genes] = Proc.new{|study,database|
|
20
|
-
tsv = TSV.setup({}, :key_field => "Sample", :fields => ["Ensembl Gene ID"], :type => :
|
21
|
-
study.
|
22
|
-
|
23
|
-
end
|
24
|
-
tsv
|
25
|
-
}
|
20
|
+
tsv = TSV.setup({}, :key_field => "Sample", :fields => ["Ensembl Gene ID", "Genomic Mutation", "Affected isoform", "Damaged isoform", "Exon Junction"], :type => :double, :namespace => study.organism)
|
21
|
+
gene_mutations = study.knowledge_base.get_database(:mutation_genes, :source => "Ensembl Gene ID")
|
22
|
+
sample_mutations = study.knowledge_base.get_database(:sample_mutations, :source => "Sample")
|
26
23
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
study.samples.select_by(:has_genotype?).each do |sample|
|
24
|
+
require 'progress-monitor'
|
25
|
+
Progress.monitor "Mon", :stack_depth => 1
|
26
|
+
study.samples.select_by(:has_genotype?)[0..3].each do |sample|
|
31
27
|
values = sample.affected_genes.collect do |gene|
|
32
|
-
|
28
|
+
mutations = gene_mutations[gene].subset(sample_mutations[sample] || [])
|
29
|
+
if mutations.any?
|
30
|
+
junction = mutations.select_by(:in_exon_junction?).any?
|
31
|
+
|
32
|
+
mis = Annotated.flatten mutations.mutated_isoforms.compact
|
33
|
+
|
34
|
+
affected = (mis.any? and mis.select_by(:consequence){|c| ! %w(UTR SYNONYMOUS).include? c}.any?)
|
35
|
+
damaged = (mis.any? and mis.select_by(:damaged?).any?)
|
36
|
+
|
37
|
+
[gene, mutations * ";;", affected, damaged, junction]
|
38
|
+
else
|
39
|
+
[gene, "", false, false, false]
|
40
|
+
end
|
33
41
|
end
|
42
|
+
|
34
43
|
tsv[sample] = Misc.zip_fields values
|
35
44
|
end
|
36
45
|
tsv
|
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.1
|
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-10-
|
11
|
+
date: 2013-10-23 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
|