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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32e7e5890ca727590d4b83985dd6812298d9312d
4
- data.tar.gz: 05af8d4902b8e1b6438c369c5e53500152d32705
3
+ metadata.gz: 70a20a4985413f36348028410a914cb78fbf4795
4
+ data.tar.gz: 52aef24051104d8a63c3c84839abb479964d1b08
5
5
  SHA512:
6
- metadata.gz: 58b0b9a4d3a7199b4a2973358c35b8fabf3bd7fbe38d4bf9bd5faa638ab6f72ff4b54d592ee90cc80cd1b2d2f85c29f307c521715af30aadb7fadff18dc4948f
7
- data.tar.gz: 2f36800fbf43fc479546b09a28f4d59ae5c88c7222c489efc37907a17fedfaabcaba74144f70e3939b7f14be58d75602354e539bfc7af07a84ecdf3cd27e3d19
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")
@@ -19,6 +19,7 @@ module R
19
19
  end
20
20
  values = [values] unless Array === values
21
21
  field_classes = values.collect do |v|
22
+ v = v.first if Array === v
22
23
  case v
23
24
  when FalseClass, TrueClass
24
25
  "'logical'"
@@ -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.7
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-27 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake