Question: Sort Fastq Files...
1
gravatar for znra1
5.0 years ago by
znra110
znra110 wrote:

Does anyone have a utility or pointers to sort fastq files based on the quality value?

TiA, Nash

fastq quality sort • 1.6k views
ADD COMMENTlink written 5.0 years ago by znra110
2

Just to be sure, by sorting you mean, reads with best average quality should be on the top of the list? Rather, what is your criteria for sorting? And by sorting, do you mean no filtering?

ADD REPLYlink written 5.0 years ago by Arun2.2k
5
gravatar for Istvan Albert
5.0 years ago by
Istvan Albert ♦♦ 71k
University Park, USA
Istvan Albert ♦♦ 71k wrote:

I assume that you wish to sort the reads by average quality. This could be done easily with Heng Li's bioawk like so:

cat test.fq | awk -c fastx ' { print meanqual($seq),$name,$seq,$qual} ' | sort -k 1 -rn | awk ' { printf("@%s\n%s\n+\n%s\n",$2,$3,$4) } ' > sorted.fq
ADD COMMENTlink written 5.0 years ago by Istvan Albert ♦♦ 71k

(+1) got to read bioawk! :)

ADD REPLYlink written 5.0 years ago by Arun2.2k
1

bioawk the awesomest tool that rocks the hardest

ADD REPLYlink modified 5.0 years ago • written 5.0 years ago by Istvan Albert ♦♦ 71k

bioawk looks really good. Is there any manual for this? I found some description here

ADD REPLYlink modified 5.0 years ago • written 5.0 years ago by Vikas Bansal2.2k
1

I wrote a mini help here: https://github.com/ialbert/bioawk/blob/master/README.bio.rst

ADD REPLYlink written 5.0 years ago by Istvan Albert ♦♦ 71k

Thanks a lot. Good to know.

ADD REPLYlink written 5.0 years ago by Vikas Bansal2.2k
0
gravatar for znra1
5.0 years ago by
znra110
znra110 wrote:

Thanks Istvan...but it looks like there might be a typo somewhere? awk on my Ubuntu 12.04 LST doesn't seem to recognize the -c option??

Nash

ADD COMMENTlink written 5.0 years ago by znra110

you should post this as a comment and you will need to install bioawk and run that!

ADD REPLYlink written 5.0 years ago by Istvan Albert ♦♦ 71k

Ok....thanks. I just tried make from your tar file, but it looks like this Ubuntu non-developer distribution really needs a lot of basic unix libs and tools (I had to get lex and yacc first!). Any idea where I can get zlib.h to compile addon.c please? Sorry for the inconvenience...

ADD REPLYlink written 5.0 years ago by znra110

try this link: http://bcc.bx.psu.edu/courses/597D-2011/getting-started.html#using-linux

ADD REPLYlink written 5.0 years ago by Istvan Albert ♦♦ 71k
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: 430 users visited in the last hour