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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.