rbbt-study 0.2.1 → 0.2.2
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 +8 -8
- data/lib/rbbt/entity/study/genotypes/knowledge_base.rb +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWRiNjkxMTQ0YzQ4YTA2N2MwNDMxNTZmNDFlOWMwMzUzMDZmZmNiNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjQyMGI0MmFkYTJiNmFlNjdkNTI0MTNlYTc3ZDRiODQzZjQxNTRhMw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTA2OWIyZTgzYWIyZmMyZDg3MTVlNGI5MGZmYzQ5NTVjZDkwYWM1MWM3ZTlh
|
10
|
+
ZjQ5YTQzYmMyYTRhZGU5ZWRhYWJmMmFkM2U1NjYyZjU4NzQxNzA3MWVjOGIz
|
11
|
+
Yjk2Y2I1ODU0Mzg5NWY5OGY3MTU4OTY2ODkyYzRiZmY4NmRjNDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDIzZmRhNGZiMWNkMWM2MTE3ODI2YWM1Yzg3NzAyYWVhYWM0MmM1MjQ4Yzcz
|
14
|
+
M2FhYzg2NzRmMTk2YjgzMGVmMzYwMjgwOWM0MGEwZDQ0ZWM3OTJhYTgxMWIx
|
15
|
+
ZjYwYTc4NjU3MDM0ZTg0MjRhM2M1ZTNlNmZkNWEwN2Y0MTE5NDY=
|
@@ -21,18 +21,21 @@ module Study
|
|
21
21
|
gene_mutations = study.knowledge_base.get_database(:mutation_genes, :source => "Ensembl Gene ID")
|
22
22
|
sample_mutations = study.knowledge_base.get_database(:sample_mutations, :source => "Sample")
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
all_mutations = study.all_mutations
|
25
|
+
mutations2mutated_isoforms = Misc.process_to_hash(all_mutations){|mutations| mutations.mutated_isoforms }
|
26
|
+
mi2damaged = Misc.process_to_hash(MutatedIsoform.setup(mutations2mutated_isoforms.values.flatten.compact.uniq, study.organism)){|mis| mis.damaged? }
|
27
|
+
study.samples.select_by(:has_genotype?).each do |sample|
|
27
28
|
values = sample.affected_genes.collect do |gene|
|
28
29
|
mutations = gene_mutations[gene].subset(sample_mutations[sample] || [])
|
29
30
|
if mutations.any?
|
30
31
|
junction = mutations.select_by(:in_exon_junction?).any?
|
31
32
|
|
32
|
-
mis = Annotated.flatten mutations.
|
33
|
+
mis = Annotated.flatten mutations2mutated_isoforms.values_at(*mutations).compact
|
33
34
|
|
34
35
|
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
|
+
#damaged = (mis.any? and mis.select_by(:damaged?).any?)
|
37
|
+
|
38
|
+
damaged = (mis.any? and mis.select{|mi| mi2damaged[mi] }.any?)
|
36
39
|
|
37
40
|
[gene, mutations * ";;", affected, damaged, junction]
|
38
41
|
else
|
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.2
|
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-25 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
|