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 +4 -4
- data/VERSION +1 -1
- data/lib/bio/fastqc/converter.rb +14 -4
- data/lib/bio/fastqc/semantics.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f33c80f37ab9c976d1cdfd3e12735bcc1c6216a0
|
4
|
+
data.tar.gz: 1e72aa79ffbbe2e8622434b3f81333e4c222066b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c6b23deab46efbe45a64beef5575127e1edcbaae9903b30d9d7b795b3d0151ec9d11ed14bcd2dc66b31127e9f5a3abaf7ba6c843b46a4bfd86a9446d735412f
|
7
|
+
data.tar.gz: 5bd1f534bb2dc492ca6d98b3d4b6f614e75cafb72c69f1b917acb4284087d456dc776eb6b944a8707c5f6f9401412a4b5903cdd8a4673dfb31ccb7fcad3617ec
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/lib/bio/fastqc/converter.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/bio/fastqc/semantics.rb
CHANGED
@@ -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
|
-
|
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
|