#! /usr/bin/perl -w 
use strict;

my $file = shift;
my $out_file = shift;
my $work_file = "XXX_".$file;


system( "cp $file $work_file" );

# define run cycle parameters here:
my $max_group_size = 1000;
my $min_group_size = 5;
my $group_size_decrement = 1;
my $branch_length = 0.02;

for( my $i = $max_group_size; $i >= $min_group_size; $i = $i-$group_size_decrement )
{
    print "Running iteration: $i\n";
    my $err = system( "./GrUNT -addG -f $work_file -pf forbidden_names.txt -o $out_file -mC $i -mL $branch_length" );
    system( "cp $out_file $work_file" );
}
