[Bioperl-l] How to print encoded fastq quality string? (Bio::Seq::Quality)

Peng Yu pengyu.ut at gmail.com
Tue Jun 8 01:14:50 UTC 2010


Hello All,

I want to retrieve the original encoded quality string. But it seems
that Bio::Seq::Quality has already converted them into numerical
array. Is there a method that can help retrieve the original encoded
quality string such as
"ffffff`edfffeeff^ffefffeeeef`ffcf`deedaYcceecdcedaffffefaaYfc`ccc`TdaYT^LTb"?

-- 
Regards,
Peng

$ cat main.fastq
@HWI-EAS11X_10097:4:1:1909:9532#0/1
CGCGGGGATGACTCTAAGCATGGTGCAGGCGATAGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTC
+
ffffff`edfffeeff^ffefffeeeef`ffcf`deedaYcceecdcedaffffefaaYfc`ccc`TdaYT^LTb
@HWI-EAS11X_10097:4:1:1948:6460#0/1
CATGGCTTACATGCTGAGTGCCAACATGGACCAGGGAGATCGGAAGATCGGTTCAGCAGGAATGCCGAGACCGAT
+
dc^c^dddadLcccLc\^acaa^Yca^caYYcacc^YbJ^aTcaT`KKacY\LL\c^\YTTYLL\TL_T_BBBBB
@HWI-EAS11X_10097:4:1:1986:2311#0/1
CTAGGCTTCCTCCCCTCCGTCAGGGCCACTCTCGAGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATAT
+
effaYefffcffdfecefbeffdce^eLedd`e\YcaceeffcYeaeee\ddcT\\TaYTaddbYbbL^Y]LZL]
$ cat main.pl
#!/usr/bin/env perl

use strict;
use warnings;
use Bio::SeqIO;

my $in=Bio::SeqIO->new(-file => "main.fastq", -format => 'fastq-illumina');

while (my $seq = $in->next_seq()) {
  print ref($seq), "\n";
  print $seq->qual_text, "\n";
}
$ ./main.pl
Bio::Seq::Quality
38 38 38 38 38 38 32 37 36 38 38 38 37 37 38 38 30 38 38 37 38 38 38
37 37 37 37 38 32 38 38 35 38 32 36 37 37 36 33 25 35 35 37 37 35 36
35 37 36 33 38 38 38 38 37 38 33 33 25 38 35 32 35 35 35 32 20 36 33
25 20 30 12 20 34
Bio::Seq::Quality
36 35 30 35 30 36 36 36 33 36 12 35 35 35 12 35 28 30 33 35 33 33 30
25 35 33 30 35 33 25 25 35 33 35 35 30 25 34 10 30 33 20 35 33 20 32
11 11 33 35 25 28 12 12 28 35 30 28 25 20 20 25 12 12 28 20 12 31 20
31 2 2 2 2 2
Bio::Seq::Quality
37 38 38 33 25 37 38 38 38 35 38 38 36 38 37 35 37 38 34 37 38 38 36
35 37 30 37 12 37 36 36 32 37 28 25 35 33 35 37 37 38 38 35 25 37 33
37 37 37 28 36 36 35 20 28 28 20 33 25 20 33 36 36 34 25 34 34 12 30
25 29 12 26 12 29



More information about the Bioperl-l mailing list