rbbt-sources 3.1.33 → 3.1.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/sources/cancer_genome_interpreter.rb +73 -0
- data/lib/rbbt/sources/intogen.rb +48 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 222e00304bac396cf21d2c16d3b3d73b76749d69
|
4
|
+
data.tar.gz: 2eb84c4bb74c787554035622c10580979caba9a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9e2c189ebf74412d2a79d8ec24aff2083d231f6dbba5a3769b4f4d4b6aed70c2553fc3be31fe24ac5ec536fd238a430f451e6379da9584f946952b3505de1d0
|
7
|
+
data.tar.gz: 64cc94c0c8754622afb9af86e5d1ed281a35f46a5f0085fbaeded87ef22dc2a66a7d4a4bad6f20f3a6804f6f4ce00048e58fda69816da353abefd9ecbf9d925f
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'rbbt-util'
|
2
|
+
require 'rbbt/resource'
|
3
|
+
require 'rbbt/sources/organism'
|
4
|
+
|
5
|
+
module CancerGenomeInterpreter
|
6
|
+
extend Resource
|
7
|
+
self.subdir = 'share/databases/CancerGenomeInterpreter'
|
8
|
+
|
9
|
+
def self.organism(org="Hsa")
|
10
|
+
Organism.default_code(org)
|
11
|
+
end
|
12
|
+
|
13
|
+
#self.search_paths = {}
|
14
|
+
#self.search_paths[:default] = :lib
|
15
|
+
|
16
|
+
|
17
|
+
CancerGenomeInterpreter.claim CancerGenomeInterpreter['.source']["catalog_of_cancer_genes_latest.zip"], :url, "https://www.cancergenomeinterpreter.org/data/catalog_of_cancer_genes_latest.zip"
|
18
|
+
|
19
|
+
CancerGenomeInterpreter.claim CancerGenomeInterpreter.mode_of_action, :proc do
|
20
|
+
TmpFile.with_file do |tmpdir|
|
21
|
+
Open.mkdir tmpdir
|
22
|
+
Misc.in_dir tmpdir do
|
23
|
+
`unzip '#{CancerGenomeInterpreter['.source']["catalog_of_cancer_genes_latest.zip"].produce.find}'`
|
24
|
+
tsv = TSV.open('gene_MoA.tsv', :header_hash => '', :type => :single)
|
25
|
+
tsv.key_field = "Associated Gene Name"
|
26
|
+
tsv.namespace = CancerGenomeInterpreter.organism
|
27
|
+
tsv.fields = ["Mode of Action"]
|
28
|
+
tsv
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
CancerGenomeInterpreter.claim CancerGenomeInterpreter.mutation_and_CNA, :proc do
|
34
|
+
TmpFile.with_file do |tmpdir|
|
35
|
+
Open.mkdir tmpdir
|
36
|
+
Misc.in_dir tmpdir do
|
37
|
+
`unzip '#{CancerGenomeInterpreter['.source']["catalog_of_cancer_genes_latest.zip"].produce.find}'`
|
38
|
+
tsv = TSV.open('cancer_genes_upon_mutations_or_CNAs.tsv', :header_hash => '', :type => :list)
|
39
|
+
tsv.key_field = "Associated Gene Name"
|
40
|
+
tsv.namespace = CancerGenomeInterpreter.organism
|
41
|
+
tsv
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
CancerGenomeInterpreter.claim CancerGenomeInterpreter.translocations, :proc do
|
47
|
+
TmpFile.with_file do |tmpdir|
|
48
|
+
Open.mkdir tmpdir
|
49
|
+
Misc.in_dir tmpdir do
|
50
|
+
`unzip '#{CancerGenomeInterpreter['.source']["catalog_of_cancer_genes_latest.zip"].produce.find}'`
|
51
|
+
tsv = TSV.open('cancer_genes_upon_trans.tsv', :header_hash => '', :type => :list)
|
52
|
+
tsv.namespace = CancerGenomeInterpreter.organism
|
53
|
+
tsv
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
CancerGenomeInterpreter.claim CancerGenomeInterpreter.acronyms, :proc do
|
59
|
+
TmpFile.with_file do |tmpdir|
|
60
|
+
Open.mkdir tmpdir
|
61
|
+
Misc.in_dir tmpdir do
|
62
|
+
`unzip '#{CancerGenomeInterpreter['.source']["catalog_of_cancer_genes_latest.zip"].produce.find}'`
|
63
|
+
TSV.open('cancer_acronyms.tsv', :header_hash => '', :type => :single)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
iif CancerGenomeInterpreter.mode_of_action.produce.find if __FILE__ == $0
|
70
|
+
iif CancerGenomeInterpreter.mutation_and_CNA.produce.find if __FILE__ == $0
|
71
|
+
iif CancerGenomeInterpreter.translocations.produce.find if __FILE__ == $0
|
72
|
+
iif CancerGenomeInterpreter.acronyms.produce.find if __FILE__ == $0
|
73
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'rbbt-util'
|
2
|
+
require 'rbbt/resource'
|
3
|
+
|
4
|
+
module Intogen
|
5
|
+
extend Resource
|
6
|
+
self.subdir = 'share/databases/Intogen'
|
7
|
+
|
8
|
+
#def self.organism(org="Hsa")
|
9
|
+
# Organism.default_code(org)
|
10
|
+
#end
|
11
|
+
|
12
|
+
#self.search_paths = {}
|
13
|
+
#self.search_paths[:default] = :lib
|
14
|
+
|
15
|
+
|
16
|
+
Intogen.claim Intogen['.source']["intogen_driver_mutations_catalog.zip"], :proc do |filename|
|
17
|
+
raise "Download the fila at 'https://www.intogen.org/downloads?file=/repository/downloads/intogen_driver_mutations_catalog-2016.5.zip' into '#{filename}'"
|
18
|
+
end
|
19
|
+
|
20
|
+
Intogen.claim Intogen.driver_mutations_catalog, :proc do |filaname|
|
21
|
+
all_tsv = nil
|
22
|
+
TmpFile.with_file do |tmpdir|
|
23
|
+
Open.mkdir tmpdir
|
24
|
+
Misc.in_dir tmpdir do
|
25
|
+
`unzip '#{Intogen['.source']["intogen_driver_mutations_catalog.zip"].produce.find}'`
|
26
|
+
Dir.glob("./*/mutation_analysis.tsv").each do |file|
|
27
|
+
cohort = File.basename(File.dirname(file))
|
28
|
+
|
29
|
+
parser = TSV::Parser.new file, :header_hash => '', :type => :list
|
30
|
+
if all_tsv.nil?
|
31
|
+
all_tsv = TSV.setup({}, :key_field => 'Mutation ID', :fields => ["Sample", "Cohort", "Genomic Mutation"] + parser.fields, :type => :list)
|
32
|
+
end
|
33
|
+
|
34
|
+
TSV.traverse parser, :into => all_tsv do |sample, values|
|
35
|
+
chr, strand, pos, ref, alt, *rest = values
|
36
|
+
mutation = [chr, pos, alt] * ":"
|
37
|
+
id = [sample, mutation] * "_"
|
38
|
+
[id, [sample, cohort, mutation] + values]
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
all_tsv.to_s
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
iif Intogen.driver_mutations_catalog.produce.find if __FILE__ == $0
|
48
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-sources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- lib/rbbt/sources/barcode.rb
|
108
108
|
- lib/rbbt/sources/bibtex.rb
|
109
109
|
- lib/rbbt/sources/biomart.rb
|
110
|
+
- lib/rbbt/sources/cancer_genome_interpreter.rb
|
110
111
|
- lib/rbbt/sources/cath.rb
|
111
112
|
- lib/rbbt/sources/clinvar.rb
|
112
113
|
- lib/rbbt/sources/corum.rb
|
@@ -115,6 +116,7 @@ files:
|
|
115
116
|
- lib/rbbt/sources/entrez.rb
|
116
117
|
- lib/rbbt/sources/go.rb
|
117
118
|
- lib/rbbt/sources/gscholar.rb
|
119
|
+
- lib/rbbt/sources/intogen.rb
|
118
120
|
- lib/rbbt/sources/jochem.rb
|
119
121
|
- lib/rbbt/sources/kegg.rb
|
120
122
|
- lib/rbbt/sources/matador.rb
|