I can get the alignment, but I also need the print data#!/usr/bin/perl use warnings; use strict; use Bio::SearchIO; use Bio::AlignIO; my $out = ">C:/Documents and Settings/mgavi.brathwaite/Desktop/current +/bl2seq/13117_aln1.out"; my $dir = 'C:/Documents and Settings/mgavi.brathwaite/Desktop/current/ +bl2seq/'; my $in = new Bio::SearchIO(-format => 'blast', -file => $dir.'13117_2.out', -report_type => 'bl2seq'); while( my $result = $in->next_result ) { while( my $hit = $result->next_hit ) { while( my $hsp = $hit->next_hsp ) { if( $hsp->length('total') > 1000 ) { if ( $hsp->percent_identity >= 90 ) { if( $hsp->score ){ if( $hsp->gaps ){ if( $hsp->expect ){ print "Hit= ", $hit->name, " Length=", $hsp->length('total'), " Score=", $hsp->score,"\n"; print " Gaps=", $hsp->gaps, " Expect=", $hsp->expect, " Percent_id=", $hsp->percent_identity, "\n"; =cut # $hit->name, $hit->hsps, $hit->name, $hsp->length('total'), $hsp->score, $hsp->gaps, $hsp->expect, $hsp->percent_identity; =cut my $aln = $hsp->get_aln; my $alnIO = Bio::AlignIO->new(-format =>"clustalw" +, -file => $out); $alnIO->write_aln($aln); } } } } } } } }
In reply to Re^2: parsing blast output
by lomSpace
in thread parsing blast output
by lomSpace
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |