# This code is inserted instead of # the Blasting and parsing part of the original code. # Creating blast.in open(OUTPUT_FILE, "> blast.in") or die "Could not create the output file \"blast.in\"\n"; # Writing blast.in sequence file in FASTA format foreach(@translated_seqs){ print OUTPUT_FILE (">".$_->id()."\n".$_->seq()."\n");} # Performing blast `blastall -i "blast_beta.in" -d /share/raid1/database/ftp.ncbi.nih.gov/blast/db/20090602/nr -p blastp -e 200000 -W 2 -M PAM30 -G 9.1 -F F -m 8 -o "blast.out"`; # Creating SearchIO my $blast_report = Bio::SearchIO->new(-format => "blasttable", -file => "blast.out"); # Testing SearchIO for data. my $result = $blast_report->next_result(); my $hit = $result->next_hit(); print("Number of hits: ".$hit->length()."\n");