Go Back   SEQanswers > Sequencing Technologies/Companies > Illumina/Solexa

Similar Threads
Thread Thread Starter Forum Replies Last Post
454 quality score, z-score,.. nii 454 Pyrosequencing 4 10-15-2020 07:29 AM
Phred score of i jmugford Bioinformatics 1 08-12-2011 06:18 PM
wiggle score captainentropy Bioinformatics 3 09-13-2010 10:42 PM
Which quality score? baohua100 Bioinformatics 2 03-28-2009 06:52 PM
Fastq quliaty score and MAQ output quality score baohua100 Bioinformatics 1 02-19-2009 10:21 AM

Thread Tools
Old 06-08-2010, 08:59 AM   #1
Location: beijing

Join Date: Jul 2008
Posts: 35
Default prhed score

In fastq file of Illumina 1.3+,quality score = Phred quality +64, which equal solexa quality+64 early, so i should change some code to deal with new solexa data.
but some calculation is puzzling.

Given a character $sq, the following Perl code gives the Phred quality $Q:

$Q = 10 * log(1 + 10 ** (ord($sq) - 64) / 10.0)) / log(10);
So it is easy to conver Solexa->Sanger quality

my @conv_table;
for (-64..64) {
$conv_table[$_+64] = chr(int(33 + 10*log(1+10**($_/10.0))/log(10)+.499));
but i do not understand where is 0.499 from. i think it should be
conv_table[$_+64] = chr(int(33 + 10*log(1+10**($_/10.0))/log(10)))
biocc is offline   Reply With Quote
Old 06-08-2010, 09:10 AM   #2
Location: Europe

Join Date: Apr 2010
Posts: 46

It looks like whoever wrote the code just wanted to round the answer to the nearest whole number (since int() on its own always rounds down).

int(3.1) -> 3
int(3.5) -> 3
int(3.9) -> 3

by adding 0.5 (or in this case 0.499) and then int(), you are rounding to the nearest whole number.

int (3.9 + 0.5) -> 4

Not sure why they are using 0.499 instead of 0.5.
Bio.X2Y is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 12:45 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO