scbi_fastq 0.0.18 → 0.0.19
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 +5 -13
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/{README.rdoc → README.md} +8 -24
- data/Rakefile +8 -26
- data/lib/scbi_fastq.rb +3 -4
- data/lib/scbi_fastq/fastq_file.rb +8 -5
- data/lib/scbi_fastq/version.rb +3 -0
- data/scbi_fastq.gemspec +24 -0
- data/test/final.fastq.gz +0 -0
- data/test/fq_all2std.pl +194 -0
- data/test/gz.rb +11 -0
- data/test/h1.fastq.gz +0 -0
- data/test/h2.fastq.gz +0 -0
- data/test/minitest.fastq.gz +0 -0
- data/test/prueba.rb +8 -0
- data/test/sanger.fastq +3996 -0
- data/test/sanger.fastq.gz +0 -0
- data/test/sanger2.fastq +400 -0
- data/test/sanger2.fastq.gz +0 -0
- data/test/sanger_all.fastq.gz +0 -0
- data/test/scbi_fastq_test.rb +262 -0
- data/test/solexa.fastq +20 -0
- metadata +62 -45
- data/.gemtest +0 -0
- data/History.txt +0 -23
- data/Manifest.txt +0 -12
- data/PostInstall.txt +0 -7
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/test/test_scbi_fastq.rb +0 -223
data/test/solexa.fastq
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
@SLXA-B3_649_FC8437_R1_1_1_610_79
|
2
|
+
GATGTGCAATACCTTTGTAGAGGAA
|
3
|
+
+SLXA-B3_649_FC8437_R1_1_1_610_79
|
4
|
+
YYYYYYYYYYYYYYYYYYWYWYYSU
|
5
|
+
@SLXA-B3_649_FC8437_R1_1_1_397_389
|
6
|
+
GGTTTGAGAAAGAGAAATGAGATAA
|
7
|
+
+SLXA-B3_649_FC8437_R1_1_1_397_389
|
8
|
+
YYYYYYYYYWYYYYWWYYYWYWYWW
|
9
|
+
@SLXA-B3_649_FC8437_R1_1_1_850_123
|
10
|
+
GAGGGTGTTGATCATGATGATGGCG
|
11
|
+
+SLXA-B3_649_FC8437_R1_1_1_850_123
|
12
|
+
YYYYYYYYYYYYYWYYWYYSYYYSY
|
13
|
+
@SLXA-B3_649_FC8437_R1_1_1_362_549
|
14
|
+
GGAAACAAAGTTTTTCTCAACATAG
|
15
|
+
+SLXA-B3_649_FC8437_R1_1_1_362_549
|
16
|
+
YYYYYYYYYYYYYYYYYYWWWWYWY
|
17
|
+
@SLXA-B3_649_FC8437_R1_1_1_183_714
|
18
|
+
GTATTATTTAATGGCATACACTCAA
|
19
|
+
+SLXA-B3_649_FC8437_R1_1_1_183_714
|
20
|
+
YYYYYYYYYYWYYYYWYWWUWWWQQ
|
metadata
CHANGED
@@ -1,109 +1,126 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scbi_fastq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- dariogf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: scbi_multi_gz_reader
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: '1.7'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: '1.7'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '10.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '10.0'
|
55
55
|
description: scbi_fastq is a ruby gem to read/write FASTQ files (DNA/RNA sequences)
|
56
56
|
with qualities in a variety of formats (Sanger, Solexa, Ilumina).
|
57
57
|
email:
|
58
58
|
- dariogf@scbi.uma.es
|
59
59
|
executables: []
|
60
60
|
extensions: []
|
61
|
-
extra_rdoc_files:
|
62
|
-
- History.txt
|
63
|
-
- Manifest.txt
|
64
|
-
- PostInstall.txt
|
65
|
-
- README.rdoc
|
61
|
+
extra_rdoc_files: []
|
66
62
|
files:
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
- README.
|
63
|
+
- ".gitignore"
|
64
|
+
- Gemfile
|
65
|
+
- LICENSE.txt
|
66
|
+
- README.md
|
71
67
|
- Rakefile
|
72
68
|
- lib/scbi_fastq.rb
|
73
69
|
- lib/scbi_fastq/fastq_file.rb
|
74
|
-
-
|
75
|
-
-
|
76
|
-
-
|
70
|
+
- lib/scbi_fastq/version.rb
|
71
|
+
- scbi_fastq.gemspec
|
72
|
+
- test/final.fastq.gz
|
73
|
+
- test/fq_all2std.pl
|
74
|
+
- test/gz.rb
|
75
|
+
- test/h1.fastq.gz
|
76
|
+
- test/h2.fastq.gz
|
77
|
+
- test/minitest.fastq.gz
|
78
|
+
- test/prueba.rb
|
79
|
+
- test/sanger.fastq
|
80
|
+
- test/sanger.fastq.gz
|
81
|
+
- test/sanger2.fastq
|
82
|
+
- test/sanger2.fastq.gz
|
83
|
+
- test/sanger_all.fastq.gz
|
84
|
+
- test/scbi_fastq_test.rb
|
85
|
+
- test/solexa.fastq
|
77
86
|
- test/test_helper.rb
|
78
|
-
|
79
|
-
- .gemtest
|
80
|
-
homepage: http://www.scbi.uma.es/downloads
|
87
|
+
homepage: ''
|
81
88
|
licenses:
|
82
89
|
- MIT
|
83
90
|
metadata: {}
|
84
|
-
post_install_message:
|
85
|
-
rdoc_options:
|
86
|
-
- --main
|
87
|
-
- README.rdoc
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
88
93
|
require_paths:
|
89
94
|
- lib
|
90
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
96
|
requirements:
|
92
|
-
- -
|
97
|
+
- - ">="
|
93
98
|
- !ruby/object:Gem::Version
|
94
99
|
version: '0'
|
95
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
101
|
requirements:
|
97
|
-
- -
|
102
|
+
- - ">="
|
98
103
|
- !ruby/object:Gem::Version
|
99
104
|
version: '0'
|
100
105
|
requirements: []
|
101
|
-
rubyforge_project:
|
102
|
-
rubygems_version: 2.
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.4.4
|
103
108
|
signing_key:
|
104
109
|
specification_version: 4
|
105
|
-
summary:
|
106
|
-
qualities in a variety of formats (Sanger, Solexa, Ilumina).
|
110
|
+
summary: read/write FASTQ files
|
107
111
|
test_files:
|
108
|
-
- test/
|
112
|
+
- test/final.fastq.gz
|
113
|
+
- test/fq_all2std.pl
|
114
|
+
- test/gz.rb
|
115
|
+
- test/h1.fastq.gz
|
116
|
+
- test/h2.fastq.gz
|
117
|
+
- test/minitest.fastq.gz
|
118
|
+
- test/prueba.rb
|
119
|
+
- test/sanger.fastq
|
120
|
+
- test/sanger.fastq.gz
|
121
|
+
- test/sanger2.fastq
|
122
|
+
- test/sanger2.fastq.gz
|
123
|
+
- test/sanger_all.fastq.gz
|
124
|
+
- test/scbi_fastq_test.rb
|
125
|
+
- test/solexa.fastq
|
109
126
|
- test/test_helper.rb
|
data/.gemtest
DELETED
File without changes
|
data/History.txt
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
=== 0.0.18 2013-12-16
|
2
|
-
|
3
|
-
Write GZ
|
4
|
-
|
5
|
-
=== 0.0.17 2012-07-13
|
6
|
-
|
7
|
-
Read gzip files
|
8
|
-
|
9
|
-
=== 0.0.16 2012-06-13
|
10
|
-
|
11
|
-
Class method to_fastq saves with phred qualities
|
12
|
-
|
13
|
-
=== 0.0.15 2012-05-24
|
14
|
-
|
15
|
-
Uses default qual when no qual is present
|
16
|
-
|
17
|
-
=== 0.0.14 2011-05-31
|
18
|
-
|
19
|
-
release to rubygems
|
20
|
-
|
21
|
-
=== 0.0.1 2010-11-29
|
22
|
-
|
23
|
-
* Initial release
|
data/Manifest.txt
DELETED
data/PostInstall.txt
DELETED
data/script/console
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# File: script/console
|
3
|
-
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
-
|
5
|
-
libs = " -r irb/completion"
|
6
|
-
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
-
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
-
libs << " -r #{File.expand_path(File.dirname(__FILE__) + '/../lib/scbi_fastq.rb')}"
|
9
|
-
puts "Loading scbi_fastq gem"
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/destroy'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/generate'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/test/test_scbi_fastq.rb
DELETED
@@ -1,223 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
-
|
3
|
-
class TestScbiFastq < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def setup
|
6
|
-
@test_file='/tmp/sanger.fastq';
|
7
|
-
@test_file_gz='/tmp/sanger.fastq.gz';
|
8
|
-
|
9
|
-
|
10
|
-
@seq_fasta='ACTG'
|
11
|
-
@seq_qual=[31]
|
12
|
-
@seq_name='SEQ'
|
13
|
-
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_gz_sanger
|
17
|
-
|
18
|
-
fqr=FastqFile.new(File.join(File.dirname(__FILE__),'sanger2.fastq.gz'))
|
19
|
-
|
20
|
-
i=1
|
21
|
-
|
22
|
-
fqr.each do |n,s,q|
|
23
|
-
|
24
|
-
assert_equal(@seq_name+i.to_s,n)
|
25
|
-
assert_equal(@seq_fasta*i,s)
|
26
|
-
assert_equal((@seq_qual*i*@seq_fasta.length),q)
|
27
|
-
|
28
|
-
i+=1
|
29
|
-
end
|
30
|
-
|
31
|
-
fqr.close
|
32
|
-
|
33
|
-
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
|
-
def fill_file(n,offset=33)
|
38
|
-
f=FastqFile.new(@test_file,'w')
|
39
|
-
|
40
|
-
n.times do |c|
|
41
|
-
i = c+1
|
42
|
-
|
43
|
-
name = "#{@seq_name+i.to_s}"
|
44
|
-
f.write_seq(name,@seq_fasta*i,(@seq_qual*i*@seq_fasta.length),'comments')
|
45
|
-
# f.puts('@'+name)
|
46
|
-
# f.puts(@seq_fasta*i)
|
47
|
-
# f.puts('+'+name)
|
48
|
-
# f.puts((@seq_qual*i*@seq_fasta.length).map{|e| (e+offset).chr}.join)
|
49
|
-
end
|
50
|
-
|
51
|
-
f.close
|
52
|
-
end
|
53
|
-
|
54
|
-
def fill_file_no_qual(n,offset=33)
|
55
|
-
f=FastqFile.new(@test_file,'w')
|
56
|
-
|
57
|
-
n.times do |c|
|
58
|
-
i = c+1
|
59
|
-
|
60
|
-
name = "#{@seq_name+i.to_s}"
|
61
|
-
f.write_seq(name,@seq_fasta*i,'','comments')
|
62
|
-
# f.puts('@'+name)
|
63
|
-
# f.puts(@seq_fasta*i)
|
64
|
-
# f.puts('+'+name)
|
65
|
-
# f.puts((@seq_qual*i*@seq_fasta.length).map{|e| (e+offset).chr}.join)
|
66
|
-
end
|
67
|
-
|
68
|
-
f.close
|
69
|
-
end
|
70
|
-
|
71
|
-
|
72
|
-
def test_each
|
73
|
-
|
74
|
-
# make new file and fill with data
|
75
|
-
fill_file(100)
|
76
|
-
|
77
|
-
|
78
|
-
fqr=FastqFile.new(@test_file)
|
79
|
-
|
80
|
-
i=1
|
81
|
-
|
82
|
-
fqr.each do |n,s,q|
|
83
|
-
|
84
|
-
assert_equal(@seq_name+i.to_s,n)
|
85
|
-
assert_equal(@seq_fasta*i,s)
|
86
|
-
assert_equal((@seq_qual*i*@seq_fasta.length),q)
|
87
|
-
|
88
|
-
i+=1
|
89
|
-
end
|
90
|
-
|
91
|
-
fqr.close
|
92
|
-
end
|
93
|
-
|
94
|
-
def test_each_comments
|
95
|
-
|
96
|
-
# make new file and fill with data
|
97
|
-
fill_file(100)
|
98
|
-
|
99
|
-
|
100
|
-
fqr=FastqFile.new(@test_file)
|
101
|
-
|
102
|
-
i=1
|
103
|
-
|
104
|
-
fqr.each do |n,s,q,c|
|
105
|
-
|
106
|
-
assert_equal(@seq_name+i.to_s,n)
|
107
|
-
assert_equal(@seq_fasta*i,s)
|
108
|
-
assert_equal((@seq_qual*i*@seq_fasta.length),q)
|
109
|
-
assert_equal('comments',c)
|
110
|
-
|
111
|
-
i+=1
|
112
|
-
end
|
113
|
-
|
114
|
-
fqr.close
|
115
|
-
end
|
116
|
-
|
117
|
-
def test_next_seq_comments
|
118
|
-
|
119
|
-
# make new file and fill with data
|
120
|
-
fill_file(100)
|
121
|
-
|
122
|
-
|
123
|
-
fqr=FastqFile.new(@test_file)
|
124
|
-
|
125
|
-
i=1
|
126
|
-
|
127
|
-
begin
|
128
|
-
n,s,q,c = fqr.next_seq
|
129
|
-
|
130
|
-
if !n.nil?
|
131
|
-
assert_equal(@seq_name+i.to_s,n)
|
132
|
-
assert_equal(@seq_fasta*i,s)
|
133
|
-
assert_equal((@seq_qual*i*@seq_fasta.length),q)
|
134
|
-
assert_equal('comments',c)
|
135
|
-
|
136
|
-
i+=1
|
137
|
-
end
|
138
|
-
end until n.nil?
|
139
|
-
|
140
|
-
fqr.close
|
141
|
-
end
|
142
|
-
|
143
|
-
def test_to_fastq
|
144
|
-
puts FastqFile.to_fastq(@seq_name,@seq_fasta*10,'','')
|
145
|
-
|
146
|
-
end
|
147
|
-
|
148
|
-
def test_each_no_qual
|
149
|
-
|
150
|
-
# make new file and fill with data
|
151
|
-
fill_file_no_qual(100)
|
152
|
-
|
153
|
-
|
154
|
-
fqr=FastqFile.new(@test_file,'r',:sanger, false,false)
|
155
|
-
|
156
|
-
i=1
|
157
|
-
|
158
|
-
fqr.each do |n,s,q|
|
159
|
-
# puts n,s,q
|
160
|
-
assert_equal(@seq_name+i.to_s,n)
|
161
|
-
assert_equal(@seq_fasta*i,s)
|
162
|
-
# assert_equal((@seq_qual*i*@seq_fasta.length),q)
|
163
|
-
|
164
|
-
i+=1
|
165
|
-
end
|
166
|
-
|
167
|
-
fqr.close
|
168
|
-
end
|
169
|
-
|
170
|
-
|
171
|
-
def fill_file_gz(n,offset=33)
|
172
|
-
f=FastqFile.new(@test_file_gz,'w.gz')
|
173
|
-
puts "FILE GZ"
|
174
|
-
n.times do |c|
|
175
|
-
i = c+1
|
176
|
-
|
177
|
-
name = "#{@seq_name+i.to_s}"
|
178
|
-
f.write_seq(name,@seq_fasta*i,(@seq_qual*i*@seq_fasta.length),'comments')
|
179
|
-
# f.puts('@'+name)
|
180
|
-
# f.puts(@seq_fasta*i)
|
181
|
-
# f.puts('+'+name)
|
182
|
-
# f.puts((@seq_qual*i*@seq_fasta.length).map{|e| (e+offset).chr}.join)
|
183
|
-
end
|
184
|
-
|
185
|
-
f.close
|
186
|
-
end
|
187
|
-
|
188
|
-
def test_each_gz
|
189
|
-
# make new file and fill with data
|
190
|
-
fill_file_gz(100)
|
191
|
-
|
192
|
-
|
193
|
-
fqr=FastqFile.new(@test_file_gz)
|
194
|
-
|
195
|
-
i=1
|
196
|
-
|
197
|
-
fqr.each do |n,s,q|
|
198
|
-
|
199
|
-
assert_equal(@seq_name+i.to_s,n)
|
200
|
-
assert_equal(@seq_fasta*i,s)
|
201
|
-
assert_equal((@seq_qual*i*@seq_fasta.length),q)
|
202
|
-
|
203
|
-
i+=1
|
204
|
-
end
|
205
|
-
assert_equal(i,101)
|
206
|
-
|
207
|
-
fqr.close
|
208
|
-
end
|
209
|
-
|
210
|
-
|
211
|
-
# def test_open_file
|
212
|
-
# fill_file(100)
|
213
|
-
# fq=FastqFile.new('test/sanger.fastq')
|
214
|
-
#
|
215
|
-
# fq.each do |n,f,q|
|
216
|
-
# puts n,f,q
|
217
|
-
# puts fq.num_seqs
|
218
|
-
# end
|
219
|
-
#
|
220
|
-
# fq.close
|
221
|
-
#
|
222
|
-
# end
|
223
|
-
end
|