#!/usr/bin/env perl

open ($f, "/export/home1/rsat/rsat/public_html/data/supported_organisms.tab");
@names = ();
while($row = <$f>){
    chomp $row;
    @fields = split("\t", $row);
    push @names, $fields[0];
}

open ($fb, ">", "/export/home1/rsat/rsat/public_html/data/blast.txt");
foreach $name (@names){
    if(-d $RSAT."/data/genomes/$name/blast_hits"){
        print $fb, $name;
    }
}
