lib/ms/sequest/srf/search.rb in ms-sequest-0.0.14 vs lib/ms/sequest/srf/search.rb in ms-sequest-0.0.15
- old
+ new
@@ -126,13 +126,15 @@
puts(opts) || exit
end
format = opt[:format]
- raise "if outfiles specified, needs the same number of files as input files" unless argv.size == opt[:outfiles].size
+ if opt[:outfiles] && (opt[:outfiles].size != argv.size)
+ raise "if outfiles specified, needs the same number of files as input files"
+ end
argv.each_with_index do |srf_file,i|
- base = srf_file.sub(/\.srf$/i, '')
+ base = srf_file.chomp(File.extname(srf_file))
newfile =
if opt[:outfiles]
opt[:outfiles][i]
else
case format