bio-fastqc 0.3.1 → 0.4.0

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: 7e21d6a0e0f6ec91c058b8a574e79e6fa9dad431
4
- data.tar.gz: 93ed09413b3fdb49564c43e68a49bed3d1937d88
3
+ metadata.gz: f33c80f37ab9c976d1cdfd3e12735bcc1c6216a0
4
+ data.tar.gz: 1e72aa79ffbbe2e8622434b3f81333e4c222066b
5
5
  SHA512:
6
- metadata.gz: 48097e944bd5c7e76a804f7d0623f869dddb17fceb4da878878489f2ad745dab9b0c925cadccce12bee332ff3b3c8db5dea1ce22085acf1be914bddec2f04998
7
- data.tar.gz: fc4ac83bb59b47e5bf554884efbdc7e7f179fece8bd94fa70529fe7858727cdf6826ec87ac6081c68d91c3c82f0c908ab46a8798f9b180d9974839aa02daa77c
6
+ metadata.gz: 1c6b23deab46efbe45a64beef5575127e1edcbaae9903b30d9d7b795b3d0151ec9d11ed14bcd2dc66b31127e9f5a3abaf7ba6c843b46a4bfd86a9446d735412f
7
+ data.tar.gz: 5bd1f534bb2dc492ca6d98b3d4b6f614e75cafb72c69f1b917acb4284087d456dc776eb6b944a8707c5f6f9401412a4b5903cdd8a4673dfb31ccb7fcad3617ec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
@@ -3,7 +3,8 @@
3
3
  module Bio
4
4
  module FastQC
5
5
  class Converter
6
- def initialize(summary_json)
6
+ def initialize(summary_json, id: nil)
7
+ @id = id
7
8
  @summary_json = summary_json
8
9
  end
9
10
 
@@ -19,16 +20,25 @@ module Bio
19
20
  end
20
21
 
21
22
  def to_json
22
- JSON.dump(@summary_json)
23
+ json = if @id
24
+ { @id => @summary_json }
25
+ else
26
+ @summary_json
27
+ end
28
+ JSON.dump(json)
23
29
  end
24
30
 
25
31
  def to_jsonld
26
- json_ld_object = Semantics.new(@summary_json).json_ld_object
32
+ json_ld_object = Semantics.new(@summary_json, id: @id).json_ld_object
27
33
  JSON.dump(json_ld_object)
28
34
  end
29
35
 
30
36
  def to_turtle
31
- Semantics.new(@summary_json).turtle
37
+ Semantics.new(@summary_json, id: @id).turtle
38
+ end
39
+
40
+ def to_ttl
41
+ to_turtle
32
42
  end
33
43
  end
34
44
  end
@@ -6,7 +6,8 @@ require 'rdf/turtle'
6
6
  module Bio
7
7
  module FastQC
8
8
  class Semantics
9
- def initialize(summary_json)
9
+ def initialize(summary_json, id: nil)
10
+ @id = id
10
11
  @summary = summary_json
11
12
  end
12
13
 
@@ -30,7 +31,11 @@ module Bio
30
31
  end
31
32
 
32
33
  def identifier
33
- "http://me.com/data/QNT" + @summary[:filename].split(".").first
34
+ if @id
35
+ @id
36
+ else
37
+ "http://me.com/data/QNT" + @summary[:filename].split(".").first
38
+ end
34
39
  end
35
40
 
36
41
  def object_core
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-fastqc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tazro Inutano Ohta