git://source.jalview.org
/
jabaws.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
JWS-112 Bumping version of Mafft to version 7.310.
[jabaws.git]
/
binaries
/
src
/
mafft
/
core
/
makemergetable.rb
1
#!/bin/env ruby
2
require 'getopts'
3
4
seedoffset = 0
5
6
if getopts( "s:" ) == nil || ARGV.length == 0 || $OPT_h then
7
puts "Usage: #{$0} [-s number_of_seeds] input_files"
8
exit
9
end
10
11
if $OPT_s
12
seedoffset = $OPT_s.to_i
13
end
14
15
16
files = ARGV
17
18
19
num = seedoffset + 1
20
for file in files
21
output = ""
22
STDERR.puts file
23
fp = File.open( file, "r" )
24
while line = fp.gets
25
if line =~ /^>/ then
26
output += " " + num.to_s
27
num += 1
28
end
29
end
30
fp.close
31
puts output + " # " + file
32
end