bio-fastqc 0.4.2 → 0.5.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/cli.rb +1 -1
- data/lib/bio/fastqc/converter.rb +31 -0
- 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: fbe1e9dae94ae5c33532fd6f90c0e576494ff6ee
|
4
|
+
data.tar.gz: 5adde2e4c5b8ac16dd36954756401386910d3f54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 530320b194014e5e3a8474afce4ca62a1c1ea6e900963a0379d0d762d92d69440be9dc41ea163a43f816c31589d60ab30311bc6d7e859512d61ea57f36bdef4c
|
7
|
+
data.tar.gz: a1711287c08560be9c8827b33ae3295de2252703236333003b4b7c0a49257060d32da091447185af959f8e5d1a94b2fd1215d907a635087598337b3ddf965509
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/bio/fastqc/cli.rb
CHANGED
@@ -6,7 +6,7 @@ require 'json'
|
|
6
6
|
module Bio
|
7
7
|
module FastQC
|
8
8
|
class CLI < Thor
|
9
|
-
desc "parse [--format format] [filename]", "parse fastqc data in fastqc directory or zipfile
|
9
|
+
desc "parse [--format format] [filename]", "parse fastqc data in fastqc directory or zipfile. output format: json (--json), json-ld (--jsonld), rdf-turtle (--ttl), or one-line tsv format (--tsv)."
|
10
10
|
option :format, :default => "json"
|
11
11
|
def parse(file)
|
12
12
|
data = Data.read(file)
|
data/lib/bio/fastqc/converter.rb
CHANGED
@@ -16,6 +16,8 @@ module Bio
|
|
16
16
|
to_jsonld
|
17
17
|
when "turtle"
|
18
18
|
to_turtle
|
19
|
+
when "tsv"
|
20
|
+
to_tsv
|
19
21
|
end
|
20
22
|
end
|
21
23
|
|
@@ -40,6 +42,35 @@ module Bio
|
|
40
42
|
def to_ttl
|
41
43
|
to_turtle
|
42
44
|
end
|
45
|
+
|
46
|
+
def to_tsv
|
47
|
+
identifier = if @id
|
48
|
+
@id
|
49
|
+
else
|
50
|
+
@summary_json[:filename].split(".").first
|
51
|
+
end
|
52
|
+
|
53
|
+
# return one-line tab separated value
|
54
|
+
[
|
55
|
+
identifier,
|
56
|
+
@summary_json[:fastqc_version],
|
57
|
+
@summary_json[:filename],
|
58
|
+
@summary_json[:file_type],
|
59
|
+
@summary_json[:encoding],
|
60
|
+
@summary_json[:total_sequences],
|
61
|
+
@summary_json[:filtered_sequences],
|
62
|
+
@summary_json[:sequence_length],
|
63
|
+
@summary_json[:min_length],
|
64
|
+
@summary_json[:max_length],
|
65
|
+
@summary_json[:mean_sequence_length],
|
66
|
+
@summary_json[:median_sequence_length],
|
67
|
+
@summary_json[:percent_gc],
|
68
|
+
@summary_json[:total_duplicate_percentage],
|
69
|
+
@summary_json[:overall_mean_quality_score],
|
70
|
+
@summary_json[:overall_median_quality_score],
|
71
|
+
@summary_json[:overall_n_content],
|
72
|
+
].join("\t")
|
73
|
+
end
|
43
74
|
end
|
44
75
|
end
|
45
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bio-fastqc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tazro Inutano Ohta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|