rbbt-util 5.19.7 → 5.19.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/etc/app.d/finder.rb +3 -0
- data/lib/rbbt/util/R/plot.rb +1 -0
- data/share/rbbt_commands/tsv/attach +9 -2
- 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: 70a20a4985413f36348028410a914cb78fbf4795
|
4
|
+
data.tar.gz: 52aef24051104d8a63c3c84839abb479964d1b08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b45d1c76971f7450d105ac1a817f0bcc87d3dbbec0427de52921844b8ea485bda96c2eed28f3bcebb056e57165c3f66cdb6577ec8f9bd4d8e9944d0a6dd9100
|
7
|
+
data.tar.gz: 60203a5f62caf8993bb33e58e4720efa941307b791d1ca6be05cf67a63913d2f27e27d7ff1a584e2d60b288565151b8c2568325636cef551a289d77501cdb47f
|
data/etc/app.d/finder.rb
CHANGED
@@ -17,6 +17,9 @@ if ENV['RBBT_FINDER']
|
|
17
17
|
|
18
18
|
organism_hash = {"organism" => /[A-Z][a-z]{2}(?:\/[a-z]{3}20\d\d)?/}
|
19
19
|
finder.add_instance(organism_hash, :namespace => organism)
|
20
|
+
|
21
|
+
snp_hash = {"SNP" => /^rs\d+$/}
|
22
|
+
finder.add_instance(snp_hash, :namespace => organism)
|
20
23
|
end
|
21
24
|
set :finder, finder
|
22
25
|
Log.debug("Finder started with: #{finder.instances.length} instances")
|
data/lib/rbbt/util/R/plot.rb
CHANGED
@@ -14,6 +14,7 @@ $ rbbt tsv attach <file1> <file2> [<file3> ...] [options]
|
|
14
14
|
Use - to read from STDIN
|
15
15
|
|
16
16
|
-f--fields* Fields to attach (all if not specified)
|
17
|
+
-i--identifiers* Identifier file
|
17
18
|
-h--help Print this help
|
18
19
|
|
19
20
|
EOF
|
@@ -28,15 +29,21 @@ end
|
|
28
29
|
|
29
30
|
file1, *rest = ARGV
|
30
31
|
fields = options[:fields]
|
32
|
+
identifiers = options[:identifiers]
|
33
|
+
|
34
|
+
if identifiers.nil?
|
35
|
+
require 'rbbt/sources/organism'
|
36
|
+
Organism.identifiers(Organism.default_code("Hsa"))
|
37
|
+
end
|
31
38
|
|
32
39
|
fields = fields ? fields.split(/[,|]/).collect{|f| f.strip} : nil
|
33
40
|
|
34
|
-
tsv = TSV.open(file1)
|
41
|
+
tsv = TSV.open(file1, :unnamed => true)
|
35
42
|
|
36
43
|
rest.each do |file2|
|
37
44
|
file_fields = TSV.parse_header(file2).all_fields - tsv.all_fields
|
38
45
|
these_fields = fields ? fields & file_fields : nil
|
39
|
-
tsv = tsv.attach file2, :fields => these_fields
|
46
|
+
tsv = tsv.attach file2, :fields => these_fields, :identifiers => identifiers
|
40
47
|
end
|
41
48
|
|
42
49
|
puts tsv.to_s
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.19.
|
4
|
+
version: 5.19.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|