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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ccdfa927331155c22142f31b7338d90a5ae9f91d
4
- data.tar.gz: dcf2df85ad7a71c557b850db952a254e2267c934
3
+ metadata.gz: fbe1e9dae94ae5c33532fd6f90c0e576494ff6ee
4
+ data.tar.gz: 5adde2e4c5b8ac16dd36954756401386910d3f54
5
5
  SHA512:
6
- metadata.gz: ee30e9cf42d3f17eb74846171faf5b37a04c6c85a0663cf0692d2ba912031b29b0546edca93fde13d700533902c07640dfe45182529ac13db65ac4bf1fe618f9
7
- data.tar.gz: d422b909c2ad1097d6823f5f4facaf3a89979e84d8b45011abe901e253d108269165d22f89d759000e5f2bb06d3c78872fe435a955fb848c4da39589342b088a
6
+ metadata.gz: 530320b194014e5e3a8474afce4ca62a1c1ea6e900963a0379d0d762d92d69440be9dc41ea163a43f816c31589d60ab30311bc6d7e859512d61ea57f36bdef4c
7
+ data.tar.gz: a1711287c08560be9c8827b33ae3295de2252703236333003b4b7c0a49257060d32da091447185af959f8e5d1a94b2fd1215d907a635087598337b3ddf965509
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.5.0
@@ -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, output in json, json-ld, or rdf-turtle format."
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)
@@ -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.2
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-16 00:00:00.000000000 Z
11
+ date: 2016-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip