Exalted Monks!
I need your help with script troubleshooting. I am using a BioPerlmodule without really understanding Object Oriented Programming. My input file is at http://bit.ly/1LXIS26. And the script I am using to process it is below if you scroll down. The output it generates is missing information for the ID - 'Brdisv1ABR21023941m', not sure why. WIth other input files, sometimes no IDs are missing, but other times, exactly 1 ID is missing.
Furthermore, warning on STDOUT reads as below - not sure what it means!
--------------------- WARNING ---------------------
MSG: unrecognized line (2): CS -HHHHS-HHHHHHHHTTS-HHHHHHHTTT-HHHHHHHCT- HHH HH
What am I doing wrong with using the Bio::SearchIO BioPerl module, or something else? THANKS!
#!/usr/bin/perl # HMMER_parser.pl use strict; use warnings; # downloaded from https://metacpan.org/pod/Bio::SearchIO::hmmer use Bio::SearchIO; my $source = shift @ARGV; my @out; open(IN, '<', $source) or die "Can't read source file $source : $!\n"; my $in = Bio::SearchIO->new(-format => 'hmmer', -file => $source); while( my $result = $in->next_result ) { # this is a Bio::Search::Result::HMMERResult object print $result->query_name(), " for HMM ", $result->hmm_name(), "\n +"; while( my $hit = $result->next_hit ) { push @out, $hit->name(), "\t"; while( my $hsp = $hit->next_hsp ) { push @out, $hsp->length(), "\n"; } } } close IN; my @split_input_name=split('.out',$source,); my $destination = $split_input_name[0]."FBD_H2_Dom-only.IDsLens"; open(OUT, '>', $destination) or die "Can't read source file $destinati +on : $!\n"; print OUT @out; close OUT;
In reply to Learning BioPerl/OOP and script troubleshooting help by onlyIDleft
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |