bio-fastqc 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/bio-fastqc.rb +1 -0
- data/lib/bio/fastqc/io.rb +51 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24e302a0001de21bb4e1ad93ef748b397a5758c9
|
4
|
+
data.tar.gz: a3fecf79186d42870c47aa5f03595dc62d5c15fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93e3dff6270cd274089ac8cc0598ec66d04e5718ebd26f44ee2cfc01b19b7625f5d1a0bb40b81c18406fa91901f7975c2aab0dbea034782b073eae331cf185ab
|
7
|
+
data.tar.gz: 2441701ea9d0761bf2f9aac4ae5b9cdb7ab3d3f55270630d4ba9b1158f1dd26107b8812e8c97282541bf0f904df9e8f460047c97bf5c7a61ffe0b80c0ed40381
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/lib/bio-fastqc.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'rdf/turtle'
|
4
|
+
|
5
|
+
module Bio
|
6
|
+
module FastQC
|
7
|
+
class IO
|
8
|
+
def initialize(summary_json, id: nil)
|
9
|
+
@summary_json = summary_json
|
10
|
+
@id = id
|
11
|
+
end
|
12
|
+
|
13
|
+
def write(output_file, format)
|
14
|
+
case format
|
15
|
+
when "json"
|
16
|
+
write_json(output_file)
|
17
|
+
when "json-ld", "jsonld"
|
18
|
+
write_jsonld(output_file)
|
19
|
+
when "turtle", "ttl"
|
20
|
+
write_ttl(output_file)
|
21
|
+
when "tsv"
|
22
|
+
write_tsv(output_file)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def write_json(output_file)
|
27
|
+
json = Converter.new(@summary_json, id: @id).to_json
|
28
|
+
open(output_file, 'w'){|file| file.puts(json) }
|
29
|
+
end
|
30
|
+
|
31
|
+
def write_jsonld(output_file)
|
32
|
+
jsonld = Converter.new(@summary_json, id: @id).to_jsonld
|
33
|
+
open(output_file, 'w'){|file| file.puts(jsonld) }
|
34
|
+
end
|
35
|
+
|
36
|
+
def write_ttl(output_file)
|
37
|
+
semantics = Semantics.new(@summary_json, id: @id)
|
38
|
+
graph = semantics.turtle_graph
|
39
|
+
prefixes = semantics.turtle_prefixes
|
40
|
+
RDF::Turtle::Writer.open(output_file, prefixes: prefixes) do |writer|
|
41
|
+
writer << graph
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def write_tsv(output_file)
|
46
|
+
tsv = Converter.new(@summary_json, id: @id).to_tsv
|
47
|
+
open(output_file, 'w'){|file| file.puts(tsv) }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
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.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tazro Inutano Ohta
|
@@ -224,6 +224,7 @@ files:
|
|
224
224
|
- lib/bio/fastqc/cli.rb
|
225
225
|
- lib/bio/fastqc/converter.rb
|
226
226
|
- lib/bio/fastqc/data.rb
|
227
|
+
- lib/bio/fastqc/io.rb
|
227
228
|
- lib/bio/fastqc/parser.rb
|
228
229
|
- lib/bio/fastqc/semantics.rb
|
229
230
|
- spec/bio-fastqc_spec.rb
|