Can someone tell me how to pipe bwa and samtools to get to a pileup2fq from a "bwa sampe"?
I am trying this but it uses a humongous amount of memory and doesn't produce any results past sampe:
Not answering your qustion but..
Is it really a good idea to pipe to samtools sort from bwa?
Sorting is very memory expensive and as a general rule if the previous step is taking long time to finish and produce big quantity of data you end having the program doing the sort waiting for long time sitting idle and consuming a lot of memory, and if you are working in parallel in a multi-core machine, usually memory is the bottleneck. Would it be this the case of bwa | samtools sort? or they behave differently?
I would be a little cautious about using wildcards with BWA. I tried that once and it took the first file and ignored the rest.
nice pipeline. It's a good summary of the bwa/pileup workflow.