A comparative genomics tool based on BLAST and graph algorithms