#!/usr/bin/perl

use strict;
use warnings;


if($#ARGV != 1) {
	print "usage: run_array_job_by_id.pl job_id id_mapping_file\n";
	exit;
}

my $id = $ARGV[0];
my $mappingFile = $ARGV[1];

my %map_hash;

open(MAPFILE, "$mappingFile");
while(<MAPFILE>) {
		my $line = $_;
		chomp $line;
		my ($map_id, $species_1, $species_2) = split(/\s+/, $line);
		$map_hash{$map_id} = "$species_1\t$species_2";
}

close(MAPFILE);

my ($species_1, $species_2) = split(/\s+/, $map_hash{$id});

system "run_inparanoid_single.sh $species_1 $species_2\n";


