Created
May 18, 2019 01:55
-
-
Save mdozmorov/e30f6248284bf09859306fa7bd44e0ef to your computer and use it in GitHub Desktop.
Check Phred offset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.biostars.org/p/63225/ | |
FILE=VLI9_AA_S60_L008_R1_001.fastq.gz | |
zcat $FILE | head -n 40 | 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";}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment