Question: Convert Phred score 41 to 40
0
gravatar for Biomonika (Noolean)
4.5 years ago by
State College, PA, USA
Biomonika (Noolean)3.0k wrote:

I need to convert new data (Illumina 1.8+) to 454 format (old Sanger). 

According to this page (http://www.dylanstorey.com/node/54), only difference in these two formats is that new Illumina can have score 41 (letter J), whereas old Sanger goes only up to 40. Is there any tool to convert all 41 scores to 40 (letter I) in fastq?

fastq • 1.3k views
ADD COMMENTlink modified 4.5 years ago by Giovanni M Dall'Olio26k • written 4.5 years ago by Biomonika (Noolean)3.0k
2
gravatar for xb
4.5 years ago by
xb390
Chapel Hill, NC,USA
xb390 wrote:

Is this what you want?

cat <your-fastq-file> | awk ' {if(NR %4 == 0) {gsub("J","I");print} else {print}}'

If it is a .gz file, use zcat to read it and gzip to zip it back.

 

ADD COMMENTlink written 4.5 years ago by xb390
1
gravatar for Giovanni M Dall'Olio
4.5 years ago by
London, UK
Giovanni M Dall'Olio26k wrote:

If you don't care about converting all the 'J's to 'I's (slightly lowering the scores of some bases), you can use sed:

sed -e '4~4y/J/I/' fastqfile.fastq > fastqfile.illuminaphred.fastq

You can also add the -i option to modify the file in place, without having to copy it to fastqfile.illuminaphred.fastq.

ADD COMMENTlink written 4.5 years ago by Giovanni M Dall'Olio26k
0
gravatar for Jordan
4.5 years ago by
Jordan1.1k
Pittsburgh
Jordan1.1k wrote:

I think this question has been asked before: Convert Illumina Reads To Sanger Score

ADD COMMENTlink written 4.5 years ago by Jordan1.1k

Its not the same question as I am not interested in converting ASCII-64 to Sanger score (ASCII-33). Instead, both my formats are in ASCII-33 (Sanger), just one goes from 0..41 and second from 0..40

ADD REPLYlink written 4.5 years ago by Biomonika (Noolean)3.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1219 users visited in the last hour