rbbt-study 0.2.29 → 0.2.30

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cac4d13f00de3f805c64db98bd8e91b0b2d8f90
4
- data.tar.gz: 91f36d14660ae42da42e0ee2a7d3efa0ad8ef53c
3
+ metadata.gz: 634c54bf8560389b8c5c49e996d968f37883b720
4
+ data.tar.gz: c848a8dd97e570a123b913a747cb3bb63787538e
5
5
  SHA512:
6
- metadata.gz: 0cd38abaa1c74acf753f075ef3b5e5efdaefb29bf4395f22722b4d6826e7925e254c19a3dbb17139f86611239754439e7816dd534def488ef3abdf510b709f33
7
- data.tar.gz: bb74c225258f3438ae85667d6fea808313a02a738ef906b9bee335d094a0eb7eda112cd44ce1bc1180634bc48aedd033a5dfc6fbed16698b6bcf5838c6d6a5f6
6
+ metadata.gz: 005e523b4449ef10dc05bf470b60ad713990e47d904dababdbb5d0a682db3782df5f1f713565fb6d2281c745281521856d930bd283b4691ee89ffa8776b79345
7
+ data.tar.gz: dd9ce8ac4736a08d5c4bee8786b843f3c0796bb8e8cb8ca81d4d0d08218888785cb49aaa76a221d4cfbb49379b766e6b5577417d8e1566c612e42536c26686db
@@ -1,6 +1,6 @@
1
1
  module Study
2
2
  property :all_mutations do
3
- cohort.metagenotype.tap{|o| o.jobname = "All mutations in #{ self }"; o.organism ||= organism; o.watson ||= watson }
3
+ cohort.metagenotype.sort.tap{|o| o.jobname = "All mutations in #{ self }"; o.organism ||= organism; o.watson ||= watson }
4
4
  end
5
5
 
6
6
  property :relevant_mutations do
@@ -11,33 +11,33 @@ module StudyWorkflow
11
11
  study.metadata[:organism]
12
12
  end
13
13
 
14
- task :binomial_significance => :tsv do
14
+ #task :binomial_significance => :tsv do
15
15
 
16
- tsv = TSV.setup({}, :key_field => "Ensembl Gene ID", :fields => ["Matches", "Bases", "Frequency", "p.value"], :namespace => organism)
16
+ # tsv = TSV.setup({}, :key_field => "Ensembl Gene ID", :fields => ["Matches", "Bases", "Frequency", "p.value"], :namespace => organism)
17
17
 
18
- matches = study.knowledge_base.get_index(:mutation_genes).keys
19
- genes = matches.collect{|m| m.partition("~").last}.uniq
20
- all_mutations = matches.collect{|m| m.partition("~").first}.uniq
18
+ # matches = study.knowledge_base.get_index(:mutation_genes).keys
19
+ # genes = matches.collect{|m| m.partition("~").last}.uniq
20
+ # all_mutations = matches.collect{|m| m.partition("~").first}.uniq
21
21
 
22
- total_bases = Gene.gene_list_exon_bases(genes)
23
- global_frequency = all_mutations.length.to_f / total_bases
22
+ # total_bases = Gene.gene_list_exon_bases(genes)
23
+ # global_frequency = all_mutations.length.to_f / total_bases
24
24
 
25
- gene2exon_size = Misc.process_to_hash(genes){|genes| genes.collect{|gene| Gene.gene_list_exon_bases([gene]) }}
25
+ # gene2exon_size = Misc.process_to_hash(genes){|genes| genes.collect{|gene| Gene.gene_list_exon_bases([gene]) }}
26
26
 
27
- genes.each do |gene|
28
- mutations = study.knowledge_base.parents(:mutation_genes, gene).target
29
- mutations = study.knowledge_base.subset(:sample_mutations, "Genomic Mutation" => mutations, "Sample" => :all).source
30
- next if mutations.empty?
31
- matches = mutations.length
32
- exon_bases = gene2exon_size[gene]
33
- next if exon_bases == 0
34
- frequency = matches.to_f / exon_bases
35
- pvalue = RSRuby.instance.binom_test(matches, exon_bases, global_frequency, 'greater')["p.value"]
36
- tsv[gene] = [matches, exon_bases, frequency, pvalue]
37
- end
27
+ # genes.each do |gene|
28
+ # mutations = study.knowledge_base.parents(:mutation_genes, gene).target
29
+ # mutations = study.knowledge_base.subset(:sample_mutations, "Genomic Mutation" => mutations, "Sample" => :all).source
30
+ # next if mutations.empty?
31
+ # matches = mutations.length
32
+ # exon_bases = gene2exon_size[gene]
33
+ # next if exon_bases == 0
34
+ # frequency = matches.to_f / exon_bases
35
+ # pvalue = RSRuby.instance.binom_test(matches, exon_bases, global_frequency, 'greater')["p.value"]
36
+ # tsv[gene] = [matches, exon_bases, frequency, pvalue]
37
+ # end
38
38
 
39
- tsv
40
- end
39
+ # tsv
40
+ #end
41
41
 
42
42
  task :genotype_overview => :tsv do
43
43
  gene_overview = TSV.setup({},
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.29
4
+ version: 0.2.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-14 00:00:00.000000000 Z
11
+ date: 2014-07-14 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