[Bioperl-l] Bio::SeqIO fastq

Heikki Lehvaslaiho heikki at sanbi.ac.za
Wed Feb 20 20:12:40 UTC 2008


Hang,

It works for me. The last statement should be 
   print  "@$qual", "\n";
to print out readable values.

Maybe you have an old version of BioPerl?
Try: 
perl -MBio::Perl -le 'print Bio::Perl->VERSION;'
I recommend installing the latest from CVS/SVN.

    -Heikki

On Wednesday 20 February 2008 02:20:18 Hang wrote:
> Hi,
>
> I'd like to read and write fastq entry. I don't know what is wrong with the
> following code:
>
> use Bio::SeqIO;
> my $in = Bio::SeqIO->new(-format => "fastq",
>                                     -file => "test.fq");
> while( my $seq = $in->next_seq ) {
>    my $qual = $seq->qual;
>    print $qual;
> }
>
> my test.fq file:
> @test
> AAAAA
> +test
> IIIII
>
> I got "Can't locate method 'qual' via package "AAAAA", perhaps you forgot
> to load "AAAAA?" at line XX ".
>
> Thanks
> Hang



-- 
______ _/      _/_____________________________________________________
      _/      _/
     _/  _/  _/  Heikki Lehvaslaiho    heikki at_sanbi _ac _za
    _/_/_/_/_/  Senior Scientist    skype: heikki_lehvaslaiho
   _/  _/  _/  SANBI, South African National Bioinformatics Institute
  _/  _/  _/  University of Western Cape, South Africa
     _/      Phone: +27 21 959 2096   FAX: +27 21 959 2512
___ _/_/_/_/_/________________________________________________________



More information about the Bioperl-l mailing list