rbbt-study 0.2.29 → 0.2.30
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 +4 -4
- data/lib/rbbt/entity/study/genotypes/mutations.rb +1 -1
- data/lib/rbbt/entity/study/genotypes.rb +21 -21
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 634c54bf8560389b8c5c49e996d968f37883b720
|
4
|
+
data.tar.gz: c848a8dd97e570a123b913a747cb3bb63787538e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
16
|
+
# tsv = TSV.setup({}, :key_field => "Ensembl Gene ID", :fields => ["Matches", "Bases", "Frequency", "p.value"], :namespace => organism)
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
23
|
-
|
22
|
+
# total_bases = Gene.gene_list_exon_bases(genes)
|
23
|
+
# global_frequency = all_mutations.length.to_f / total_bases
|
24
24
|
|
25
|
-
|
25
|
+
# gene2exon_size = Misc.process_to_hash(genes){|genes| genes.collect{|gene| Gene.gene_list_exon_bases([gene]) }}
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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
|
-
|
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.
|
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-
|
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
|