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 +4 -4
- data/VERSION +1 -1
- data/lib/bio/fastqc.rb +1 -1
- data/lib/bio/fastqc/data.rb +27 -22
- data/spec/corrupt_example_fastqc.zip +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97952edf408e39ea12f758937a842327541bcdca
|
4
|
+
data.tar.gz: 065a3530efa2d3c4bb0d74b3079686314b1f3469
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fba5f8517a7f02e5bce12cfa0928e13b4c478d5c4a74aa6398ab458bff682bec1b96b5fb8fde26632925da771f070277822024bd9395efe5c706253ffe7e2f5
|
7
|
+
data.tar.gz: 3575372ede801a2dbae8623854e13d8857472a95134d98810c3aac33e90c7fd592743a050ec380bf15ef70ae0ad4c23545de3e8fed81eec74b823773d50f9321
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.2
|
data/lib/bio/fastqc.rb
CHANGED
data/lib/bio/fastqc/data.rb
CHANGED
@@ -5,32 +5,37 @@ require 'zip'
|
|
5
5
|
module Bio
|
6
6
|
module FastQC
|
7
7
|
class Data
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
15
|
+
end
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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
|
-
|
24
|
-
|
25
|
-
|
25
|
+
def read_flatfile(file)
|
26
|
+
open(file).read
|
27
|
+
end
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
Binary file
|
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.
|
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-
|
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
|