onlyIDleft has asked for the wisdom of the Perl Monks concerning the following question:
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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Learning BioPerl/OOP and script troubleshooting help
by kcott (Archbishop) on Dec 07, 2015 at 06:35 UTC | |
Re: Learning BioPerl/OOP and script troubleshooting help
by Laurent_R (Canon) on Dec 07, 2015 at 07:34 UTC | |
by onlyIDleft (Scribe) on Dec 07, 2015 at 20:24 UTC | |
Re: Learning BioPerl/OOP and script troubleshooting help
by toolic (Bishop) on Dec 07, 2015 at 16:17 UTC | |
by onlyIDleft (Scribe) on Dec 09, 2015 at 08:08 UTC |