fix-trinity-output 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+ require 'tmpdir'
5
+
6
+ class TestFixer < Test::Unit::TestCase
7
+
8
+ context 'fixer' do
9
+
10
+ setup do
11
+ @fixer = Fixer.new
12
+ @tmpdir = Dir.mktmpdir
13
+ end
14
+
15
+ teardown do
16
+ cmd = "rm -rf #{@tmpdir}"
17
+ `#{cmd}`
18
+ end
19
+
20
+ should 'fix pair of fastq files' do
21
+ left = File.join(File.dirname(__FILE__), 'left.fq')
22
+ right = File.join(File.dirname(__FILE__), 'right.fq')
23
+ prefix = "#{@tmpdir}/test"
24
+ @fixer.run left, right, prefix
25
+ assert File.exist?("#{@tmpdir}/test-fixed.1.fastq")
26
+ assert File.exist?("#{@tmpdir}/test-fixed.2.fastq")
27
+ assert File.exist?("#{@tmpdir}/test-fixed.single.fastq")
28
+ lines = `wc -l #{@tmpdir}/test-fixed.1.fastq`
29
+ assert_equal 876, lines.split(/\s+/).first.to_i
30
+ lines = `wc -l #{@tmpdir}/test-fixed.2.fastq`
31
+ assert_equal 876, lines.split(/\s+/).first.to_i
32
+ assert_equal 762, File.size("#{@tmpdir}/test-fixed.single.fastq")
33
+
34
+ end
35
+
36
+ end
37
+ end
metadata ADDED
@@ -0,0 +1,150 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fix-trinity-output
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Chris Boursnell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: trollop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.3'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 10.3.2
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '10.3'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 10.3.2
47
+ - !ruby/object:Gem::Dependency
48
+ name: turn
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.9'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.9.7
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '0.9'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 0.9.7
67
+ - !ruby/object:Gem::Dependency
68
+ name: simplecov
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '0.8'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 0.8.2
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '0.8'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 0.8.2
87
+ - !ruby/object:Gem::Dependency
88
+ name: shoulda-context
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '1.2'
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 1.2.1
97
+ type: :development
98
+ prerelease: false
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.2'
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: 1.2.1
107
+ description: See readme
108
+ email: cmb211@cam.ac.uk
109
+ executables:
110
+ - fix-trinity-output
111
+ extensions: []
112
+ extra_rdoc_files: []
113
+ files:
114
+ - ".gitignore"
115
+ - Gemfile
116
+ - README.md
117
+ - Rakefile
118
+ - bin/fix-trinity-output
119
+ - fix-trinity-output.gemspec
120
+ - lib/fix-trinity-output.rb
121
+ - lib/fix-trinity-output/fix-trinity-output.rb
122
+ - test/helper.rb
123
+ - test/left.fq
124
+ - test/right.fq
125
+ - test/test_test.rb
126
+ homepage: http://rubygems.org/gems/fix-trinity-output
127
+ licenses:
128
+ - MIT
129
+ metadata: {}
130
+ post_install_message:
131
+ rdoc_options: []
132
+ require_paths:
133
+ - lib
134
+ required_ruby_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ required_rubygems_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ requirements: []
145
+ rubyforge_project:
146
+ rubygems_version: 2.2.2
147
+ signing_key:
148
+ specification_version: 4
149
+ summary: Fix output fastq files from Trinity
150
+ test_files: []