#!/usr/bin/perl

use strict;
use warnings;

if(-e "$ENV{HOME}/scripts/jaiswallab/interactome_scripts/find_species.pl") {
	require "$ENV{HOME}/scripts/jaiswallab/interactome_scripts/find_species.pl";
}elsif(-e "$ENV{HOME}/bin/find_species.pl") {
	require "$ENV{HOME}/bin/find_species.pl";
}

my @files = glob(*.fa);
open(OUTFILE, ">fasta_taxon_mapping.txt";

foreach my $file (@files){
		my $species = find_species($file);
		my $taxon = find_taxon($species);
		print OUTFILE "$file\t$taxon\n";
}
close(OUTFILE);
