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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjQ4ZGE4MjE3OWY4MTc3NTlkYjgyYjMyNTFhZDYzMWUzMDM2ZTMyNA==
4
+ MWRiNjkxMTQ0YzQ4YTA2N2MwNDMxNTZmNDFlOWMwMzUzMDZmZmNiNA==
5
5
  data.tar.gz: !binary |-
6
- YmRlOTI4OTgwYTQ2YjE3M2QyNWY5ZmVmYWJjN2M5YTY5N2NkYWYxMg==
6
+ MjQyMGI0MmFkYTJiNmFlNjdkNTI0MTNlYTc3ZDRiODQzZjQxNTRhMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YTNiOWUwNTE5N2Q4ZWI2NTgwNjhhNWFiM2NkNWEwNDc2OTY5MjI4YTA3YTVm
10
- MzQ4ZWI1MzAzNmMzYTJjYjc0MjU5NWY2ZDBjNTA3NTY1ZWUxNDEwYTc0OTlh
11
- ZGExNjNhNzcxNGRjNTY1NTY1NGRkOTdjYTZhZjExN2E5OGFkOWM=
9
+ MTA2OWIyZTgzYWIyZmMyZDg3MTVlNGI5MGZmYzQ5NTVjZDkwYWM1MWM3ZTlh
10
+ ZjQ5YTQzYmMyYTRhZGU5ZWRhYWJmMmFkM2U1NjYyZjU4NzQxNzA3MWVjOGIz
11
+ Yjk2Y2I1ODU0Mzg5NWY5OGY3MTU4OTY2ODkyYzRiZmY4NmRjNDQ=
12
12
  data.tar.gz: !binary |-
13
- Nzk1ZmM4MmNmYWIzNGIwZDZiNTQzYmQxYTc1ZTA3NmEzNGYzNWQzYTljM2M3
14
- MzI4MTVmN2E3ZDYxMTAzMmEwYWFiODdkOWE3YmMzZjhhZDA4MDAyMjBkNDQy
15
- NDlkODcwN2NkYWZjM2ZiODg1NDM3MWFkMGQ0MjUwNGQxYTcwOTU=
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
- require 'progress-monitor'
25
- Progress.monitor "Mon", :stack_depth => 1
26
- study.samples.select_by(:has_genotype?)[0..3].each do |sample|
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.mutated_isoforms.compact
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.1
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-23 00:00:00.000000000 Z
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