|
Last change
on this file was
10371,
checked in by aboeckma, 12 years ago
|
|
updated mafft version. Added extensions (no svn ignore, yet)
|
-
Property svn:executable set to
*
|
|
File size:
476 bytes
|
| Line | |
|---|
| 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 |
|---|
Note: See
TracBrowser
for help on using the repository browser.