Question: How can I tell my fastq is a fastqsanger or not?
0
gravatar for diltsjeri
3.9 years ago by
diltsjeri440
Chicago, IL
diltsjeri440 wrote:

Hi,

If I'm given a fastq file. How am I able to tell if it's a fastqsanger format or not? Is there a command line tool available for this? I really don't want to have to go into galaxy to ensure its format.

Thanks!

fastqsanger fastq • 2.3k views
ADD COMMENTlink modified 3.9 years ago by GenoMax92k • written 3.9 years ago by diltsjeri440
1

A: Tool To Find Out If Fastq Is In Sanger Or Phred64 Encoding? head -n 40 file.fastq | awk '{if(NR%4==0) printf("%s",$0);}' | od -A n -t u1 | awk 'BEGIN{min=100;max=0;}{for(i=1;i<=NF;i++) {if($i>max) max=$i; if($i<min) min=$i;}}END{if(max<=74 && min<59) print "Phred+33"; else if(max>73 && min>=64) print "Phred+64"; else if(min>=59 && min<64 && max>73) print "Solexa+64"; else print "Unknown score encoding\!";}'

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by Medhat8.8k

Also, for clarification. Is it safe to assume that all the latest nexgen (NexSeq, HiSeq, IonTorrent, etc) technologies are outputting fastqsanger as the .fastq? Or should I just never assume anything?

ADD REPLYlink written 3.9 years ago by diltsjeri440

Assume it but make sure ;)

ADD REPLYlink written 3.9 years ago by Medhat8.8k
3
gravatar for Pierre Lindenbaum
3.9 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum131k wrote:

googled and got: http://wiki.bits.vib.be/index.php/Identify_the_Phred_scale_of_quality_scores_used_in_fastQ

ADD COMMENTlink written 3.9 years ago by Pierre Lindenbaum131k

Thanks! Your google skills are better than mine.

ADD REPLYlink written 3.9 years ago by diltsjeri440
1
gravatar for GenoMax
3.9 years ago by
GenoMax92k
United States
GenoMax92k wrote:

Use testformat.sh from BBMap suite.

ADD COMMENTlink written 3.9 years ago by GenoMax92k
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: 1632 users visited in the last hour