1
Uncultured Sulfuricurvum sp. RIFRC-1, complete genome
16
2
Neosartorya fischeri NRRL 181 conserved hypothetical protein (NFIA_106270) partial mRNA
16
16a
16b
####
#!perl
use strict;
use warnings;
use XML::Simple;
use Data::Dump 'pp';
# force these tags into array
my $blast = XMLin('BLAST2.XML',ForceArray=>['Hit','Hit_hsps','Hsp']);
my $hits = $blast->{BlastOutput_iterations}->{Iteration}->{Iteration_hits}->{Hit};
my $ret;
foreach my $hit (@{$hits}) {
my @Hsp_identity;
for my $Hit_hsps ( @{$hit->{Hit_hsps}} ){
for ( @{$Hit_hsps->{'Hsp'}} ) {
push @Hsp_identity, $_->{'Hsp_identity'}
}
};
push @{$ret},join '|',
$hit->{Hit_def},
$hit->{Hit_num},
@Hsp_identity;
};
pp $ret;