#!/usr/bin/perl

open (F1, $ARGV[0]) || die "Can't open $ARGV[0]\n";

while (<F1>) {
chomp;
@data = split;
push (@Ids, $data[0]);
}

open (F2, $ARGV[1]) || die "Can't open $ARGV[1]\n";

while (<F2>) {
chomp;
@data = split;

$Genotypes->{$data[1]} = $_;
}

foreach $id (@Ids) {

if (exists($Genotypes->{$id})) {
print "$Genotypes->{$id}\n";
}
else {

warn "Can't find id $id in $ATGV[1]\n";

}

}
