bio-fastqc 0.8.0 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cbdb6a0b5125d4d90dc3e5b17f451b6a35db13f
4
- data.tar.gz: 2bf19899ae60a2ce06f129adcffb2b14ba345191
3
+ metadata.gz: 97952edf408e39ea12f758937a842327541bcdca
4
+ data.tar.gz: 065a3530efa2d3c4bb0d74b3079686314b1f3469
5
5
  SHA512:
6
- metadata.gz: 3a29404861f22e429d96f6253a7f8d3a4b3bb2c6960343bf21e627603f1f3276709004ed2e5c001d02ac1456c20d13e5e89a354b6a82d099fe085e73b86abc52
7
- data.tar.gz: c2de3c14c3d844792e1ac00e1ed5c7107754886ebdfb98be6a07071b497da108a7e6ee0ad153cf27e41380984eecbe289d8692f74032c82d9382f3202b0b5e22
6
+ metadata.gz: 7fba5f8517a7f02e5bce12cfa0928e13b4c478d5c4a74aa6398ab458bff682bec1b96b5fb8fde26632925da771f070277822024bd9395efe5c706253ffe7e2f5
7
+ data.tar.gz: 3575372ede801a2dbae8623854e13d8857472a95134d98810c3aac33e90c7fd592743a050ec380bf15ef70ae0ad4c23545de3e8fed81eec74b823773d50f9321
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.2
@@ -1,4 +1,4 @@
1
1
  module Bio
2
2
  module FastQC
3
3
  end
4
- end
4
+ end
@@ -5,32 +5,37 @@ require 'zip'
5
5
  module Bio
6
6
  module FastQC
7
7
  class Data
8
- class << self
9
- def read(file)
10
- read_zipfile(file)
11
- rescue Zip::Error
12
- read_flatfile(file)
8
+ class << self
9
+ def read(file)
10
+ read_zipfile(file)
11
+ rescue Zip::Error
12
+ read_flatfile(file)
13
13
  rescue Errno::EISDIR
14
14
  read_dir(file)
15
- end
15
+ end
16
16
 
17
- def read_zipfile(file)
18
- Zip::File.open(file) do |zipfile|
19
- zipfile.glob('*/fastqc_data.txt').first.get_input_stream.read
20
- end
21
- end
17
+ def read_zipfile(file)
18
+ Zip::File.open(file) do |zipfile|
19
+ d = zipfile.glob('*/fastqc_data.txt').first
20
+ filenotfound(file) if !d
21
+ d.get_input_stream.read
22
+ end
23
+ end
22
24
 
23
- def read_flatfile(file)
24
- open(file).read
25
- end
25
+ def read_flatfile(file)
26
+ open(file).read
27
+ end
26
28
 
27
- def read_dir(file)
28
- open(File.join(file, "fastqc_data.txt")).read
29
- rescue Errno::ENOENT
30
- puts "FastQC data file fastqc_data.txt not found"
31
- exit
32
- end
33
- end
34
- end
29
+ def read_dir(file)
30
+ open(File.join(file, "fastqc_data.txt")).read
31
+ rescue Errno::ENOENT
32
+ filenotfound(file)
33
+ end
34
+
35
+ def filenotfound(file)
36
+ raise "FastQC data file fastqc_data.txt not found, input file: #{file}"
37
+ end
38
+ end
39
+ end
35
40
  end
36
41
  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.8.0
4
+ version: 0.8.2
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-07-08 00:00:00.000000000 Z
11
+ date: 2016-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -228,6 +228,7 @@ files:
228
228
  - lib/bio/fastqc/parser.rb
229
229
  - lib/bio/fastqc/semantics.rb
230
230
  - spec/bio-fastqc_spec.rb
231
+ - spec/corrupt_example_fastqc.zip
231
232
  - spec/example_fastqc.zip
232
233
  - spec/example_fastqc_454.zip
233
234
  - spec/spec_helper.rb