demultiplexer 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/demultiplexer +14 -13
- data/demultiplexer.gemspec +1 -0
- data/lib/demultiplexer/version.rb +1 -1
- data/lib/sample_reader.rb +5 -1
- data/test/helper.rb +8 -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: 8ff1437c217ab2d8153534938b2712511a3c5b4e
|
4
|
+
data.tar.gz: 0271db4840b41e5172a9bee4d55c85813a7a1140
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fd4d46a4ed3775ed6168893fa023ff89bacb3c3e76b3de5ca676945218bfef1bcaec8b64ca6e91c94070318ac1521d630b75fbea8760e594738f2aeda44ceca
|
7
|
+
data.tar.gz: 241e58b5cbbe9822980a001997042b11b8b72a0b57b5a41f54e9d4b971126328bd223f2e3795b6aaf5280e1ba7b9cf1bdec3e360b7c5aa587b5398e166782a9e
|
data/bin/demultiplexer
CHANGED
@@ -73,7 +73,7 @@ USAGE = <<USAGE.gsub(/^\s+\|/, '')
|
|
73
73
|
|
|
74
74
|
|Usage: #{File.basename(__FILE__)} [options] <FASTQ files>
|
75
75
|
|
|
76
|
-
|Example: #{File.basename(__FILE__)} -
|
76
|
+
|Example: #{File.basename(__FILE__)} -s samples.tsv Data*.fastq.gz
|
77
77
|
|
|
78
78
|
|Options:
|
79
79
|
USAGE
|
@@ -89,54 +89,55 @@ options = {}
|
|
89
89
|
OptionParser.new do |opts|
|
90
90
|
opts.banner = USAGE
|
91
91
|
|
92
|
-
opts.on('-h', '--help', 'Display this screen') do
|
92
|
+
opts.on('-h', '--help', 'Display this screen.') do
|
93
93
|
$stderr.puts opts
|
94
94
|
exit
|
95
95
|
end
|
96
96
|
|
97
|
-
opts.on('-s', '--samples_file <file>', String, 'Path to samples file') do |o|
|
97
|
+
opts.on('-s', '--samples_file <file>', String, 'Path to samples file.') do |o|
|
98
98
|
options[:samples_file] = o
|
99
99
|
end
|
100
100
|
|
101
101
|
opts.on('-m', '--mismatches_max <uint>', Integer, 'Maximum mismatches_max ',
|
102
|
-
"allowed (default=#{DEFAULT_MISMATCHES})") do |o|
|
102
|
+
"allowed (default=#{DEFAULT_MISMATCHES}).") do |o|
|
103
103
|
options[:mismatches_max] = o
|
104
104
|
end
|
105
105
|
|
106
|
-
opts.on('--revcomp_index1', 'Reverse complement index1') do |o|
|
106
|
+
opts.on('--revcomp_index1', 'Reverse complement index1.') do |o|
|
107
107
|
options[:revcomp_index1] = o
|
108
108
|
end
|
109
109
|
|
110
|
-
opts.on('--revcomp_index2', 'Reverse complement index2') do |o|
|
110
|
+
opts.on('--revcomp_index2', 'Reverse complement index2.') do |o|
|
111
111
|
options[:revcomp_index2] = o
|
112
112
|
end
|
113
113
|
|
114
114
|
opts.on('--scores_min <uint>', Integer, 'Drop reads if a single position in ',
|
115
115
|
'the index have a quality score ',
|
116
|
-
'below scores_min (default=
|
117
|
-
"#{DEFAULT_SCORE_MIN})") do |o|
|
116
|
+
'below scores_min (default=' \
|
117
|
+
"#{DEFAULT_SCORE_MIN}).") do |o|
|
118
118
|
options[:scores_min] = o
|
119
119
|
end
|
120
120
|
|
121
121
|
opts.on('--scores_mean <uint>', Integer, 'Drop reads if the mean index',
|
122
122
|
'quality score is below ',
|
123
|
-
'scores_mean (default=
|
124
|
-
"#{DEFAULT_SCORE_MEAN})") do |o|
|
123
|
+
'scores_mean (default=' \
|
124
|
+
"#{DEFAULT_SCORE_MEAN}).") do |o|
|
125
125
|
options[:scores_mean] = o
|
126
126
|
end
|
127
127
|
|
128
|
-
opts.on('-o', '--output_dir <dir>', String, 'Output directory'
|
128
|
+
opts.on('-o', '--output_dir <dir>', String, 'Output directory' \
|
129
|
+
'(default=<pwd>).') do |o|
|
129
130
|
options[:output_dir] = o
|
130
131
|
end
|
131
132
|
|
132
133
|
opts.on('-c', '--compress <gzip|bzip2>', String, 'Compress output using ' \
|
133
134
|
'gzip or bzip2 ',
|
134
135
|
'(default=' \
|
135
|
-
'<no compression>)') do |o|
|
136
|
+
'<no compression>).') do |o|
|
136
137
|
options[:compress] = o.to_sym
|
137
138
|
end
|
138
139
|
|
139
|
-
opts.on('-v', '--verbose', 'Verbose output') do |o|
|
140
|
+
opts.on('-v', '--verbose', 'Verbose output.') do |o|
|
140
141
|
options[:verbose] = o
|
141
142
|
end
|
142
143
|
end.parse!
|
data/demultiplexer.gemspec
CHANGED
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.homepage = 'http://github.com/maasha/demultiplexer'
|
16
16
|
s.license = 'GPL2'
|
17
17
|
s.rubygems_version = '2.0.0'
|
18
|
+
s.executables << 'demultiplexer'
|
18
19
|
s.files = `git ls-files`.split("\n")
|
19
20
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
21
|
s.require_paths = ['lib']
|
data/lib/sample_reader.rb
CHANGED
@@ -117,9 +117,13 @@ class SampleReader
|
|
117
117
|
def samples_read(file)
|
118
118
|
samples = []
|
119
119
|
|
120
|
-
CSV.read(file, col_sep:
|
120
|
+
CSV.read(file, col_sep: ' ').each do |id, index1, index2|
|
121
121
|
next if id[0] == '#'
|
122
122
|
|
123
|
+
fail SampleReaderError, "Id not found in file: #{file}" if id.nil?
|
124
|
+
fail SampleReaderError, "Index1 not found in file: #{file}" if index1.nil?
|
125
|
+
fail SampleReaderError, "Index2 not found in file: #{file}" if index2.nil?
|
126
|
+
|
123
127
|
samples << Sample.new(id, index1.upcase, index2.upcase)
|
124
128
|
end
|
125
129
|
|
data/test/helper.rb
CHANGED
@@ -21,6 +21,14 @@
|
|
21
21
|
# #
|
22
22
|
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< #
|
23
23
|
|
24
|
+
require 'simplecov'
|
25
|
+
|
26
|
+
SimpleCov.start do
|
27
|
+
add_filter "/test/"
|
28
|
+
end
|
29
|
+
|
30
|
+
SimpleCov.command_name 'test:units'
|
31
|
+
|
24
32
|
require 'pp'
|
25
33
|
require 'fileutils'
|
26
34
|
require 'tempfile'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: demultiplexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin A. Hansen
|
@@ -68,7 +68,8 @@ dependencies:
|
|
68
68
|
version: 0.9.2
|
69
69
|
description: Demultiplex sequences from the Illumina platform.
|
70
70
|
email: mail@maasha.dk
|
71
|
-
executables:
|
71
|
+
executables:
|
72
|
+
- demultiplexer
|
72
73
|
extensions: []
|
73
74
|
extra_rdoc_files: []
|
74
75
|
files:
|