lomSpace has asked for the wisdom of the Perl Monks concerning the following question:
The problem is at "my $hit = $result->next_hit;"sub hu_bl2seq_parser{ my ($maid, $maid_dir) = @_; # Get the report my $in = new Bio::SearchIO(-format => 'blast', -file => ">".$maid_dir."\\".$maid."aln_hu +.aln", -report_type => 'blastn'); #open(my $out, ">$maid_dir/".$maid."aln_hu_parsed.out"); + #my $out = Bio::AlignIO->newFh(-format => 'clustalw' ); my $result=$in->next_result; my($hu_aln,$hu_mismatches); # Get info about the first hit my $hit = $result->next_hit; my $name = $hit->name; # get info about the first hsp of the first hit my $hsp = $hit->next_hsp; # get the alignment object my $aln = $hsp->get_aln; #my $percent_id = $hsp->percent_identity; #my $aln_length = $hsp->length('total'); my @mismatches = $hsp->seq_inds('query','nomatch'); my $aln_str=""; # access the alignment string my $strIO=IO::String->new($aln_str); # write the string alignio in clustalw format my $alnio = Bio::AlignIO->new(-format => 'clustalw', -fh=>$strIO); # now the actual alignment string is accessable for printing or in + this case moving to a db table $alnio->write_aln($aln); $hu_aln=$aln_str; $hu_mismatches = scalar @mismatches; return($hu_aln, $hu_mismatches); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: I don't understand error message
by ikegami (Patriarch) on Jun 16, 2009 at 15:31 UTC | |
|
Re: I don't understand error message
by SuicideJunkie (Vicar) on Jun 16, 2009 at 15:33 UTC | |
by lomSpace (Scribe) on Jun 16, 2009 at 20:43 UTC | |
by SuicideJunkie (Vicar) on Jun 17, 2009 at 14:34 UTC | |
|
Re: I don't understand error message
by CountZero (Bishop) on Jun 16, 2009 at 17:58 UTC | |
by lomSpace (Scribe) on Jun 16, 2009 at 20:50 UTC | |
by CountZero (Bishop) on Jun 17, 2009 at 09:26 UTC | |
by lomSpace (Scribe) on Jun 17, 2009 at 16:00 UTC | |
by CountZero (Bishop) on Jun 17, 2009 at 18:21 UTC | |
|
Re: I don't understand error message
by moritz (Cardinal) on Jun 16, 2009 at 15:33 UTC | |
by ikegami (Patriarch) on Jun 16, 2009 at 16:36 UTC | |
|
Re: I don't understand error message
by llancet (Friar) on Jun 17, 2009 at 01:04 UTC |