[Bioperl-l] Need help in needle parser

Chris Fields cjfields at uiuc.edu
Tue Jul 11 12:59:07 UTC 2006


perldoc Bio::AlignIO
perldoc Bio::AlignIO::needle

http://www.bioperl.org/wiki/FAQ
http://www.bioperl.org/wiki/HOWTO:Beginners
http://www.bioperl.org/wiki/Bptutorial.pl
http://www.catb.org/~esr/faqs/smart-questions.html

Google is your friend!

If it isn't entering the while loop, there are two possibilities:

1)  Something is wrong with the file
2)  The parser isn't reading the file correctly

In order to know which, we will need to see the alignment itself.

Chris

On Jul 11, 2006, at 7:19 AM, Khoiwal Tara wrote:

> Hi,
>   I want to parse the output of needle.I tried but didn't able to  
> get expected output.
>
>   My code is as follows:
>
>   #!/usr/local/bin/perl
>
>   use strict;
> use warnings;
> use Bio::AlignIO;
>   my $needleReport = $ARGV[0];
>
> my $in = new Bio::AlignIO(-format => 'emboss',-file =>$needleReport);
>
>   while(my $align = $in->next_aln()){
>     print "Alignment Length:".$align->length()."\n";
>   print "Percentage Identity:".$align->percentage_identity()."\n";
>   print "Consensus string:".$align->consensus_string()."\n";
>   print "Number of sequences:".$align->no_sequence()."\n";
>   print "Number of residues:".$align->no_residues()."\n";
> }
>
> But it doesn't go inside the while loop.
>   Pls help me.
>   How to find the alignment position for the query sequence on the  
> target sequence from the needle output?
>   Where can i find the good documentation on needle parser and its  
> usage?
>   Good document on bioperl for beginners.
>
>   Regards,
>   Tara Khoiwal.
>
>  			
> ---------------------------------
> Sneak preview the  all-new Yahoo.com. It's not radically different.  
> Just radically better.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign






More information about the Bioperl-l mailing list