source: branches/items/GDE/MAFFT/mafft-7.055-with-extensions/core/makemergetable.rb

Last change on this file was 10371, checked in by aboeckma, 11 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
2require 'getopts'
3
4seedoffset = 0
5
6if getopts( "s:" ) == nil ||  ARGV.length == 0 || $OPT_h then
7        puts "Usage: #{$0} [-s number_of_seeds] input_files"
8        exit
9end
10
11if $OPT_s
12    seedoffset = $OPT_s.to_i
13end
14
15
16files = ARGV
17
18
19num = seedoffset + 1
20for 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
32end
Note: See TracBrowser for help on using the repository browser.