[Bioperl-l] Help with manipulating quality objects

Rich LeDuc rleduc@uiuc.edu
Wed, 23 Oct 2002 10:35:56 -0500


I have a problem, and it is really causing me grief.  I will start by 
saying that I am not a Perl guru, I am mostly self-taught over the last two 
years or so, and I still have some holes in my understanding, and I could 
easily be making a stupid mistake.  That said, here is my problem, there 
exists a bug (Bug 1268) in the way bioperl is handling quality 
sequences.  I do something like this (where qualities is a hash full of 
quality objects.):

    # Make an output files
    $qual_out = Bio::SeqIO->new(-file => ">$data_dir/$qual_seq.fasta.qual", 
'-format' => 'qual');

    # Print to quality file
    $seq = $qualities{$qual_seq};
    $qual_out->write_seq(-source => $seq);

    # Print to screen
    $my_seq = $seq->qual();
    print ">$qual_seq\n"."@$my_seq\n";

under certain circumstances write_seq does not return the same sequence as 
qual - specifically write_seq drops the last quality value - but only when 
the last value would be on a line by itself.

My question is, how are other people getting around this problem?  Is there 
a better set of objects to be using to this?  I hate the thought of simply 
substringing the $seq->qual and printing one subsequence at a time - but 
I'm in a bind.

I would greatly appreciate any suggestions from this list.

Thanks,

Rich

-------------------------------------------------------
Richard LeDuc
Research Programmer
Bioinformatics Unit
W.M. Keck Center for Comparative and Functional Genomics
Biotechnology Center
University of Illinois at Urbana-Champaign