Hello,
I recently developed a fast stream-based .SAM sorter, streamsorter. It reads .SAM output from a stream (for instance, produced by bwa or another aligner), sorts the reads as they come in, and emits everything to standard out. Because this happens during alignment, and sorting is much faster than aligning, sorting takes essentially no extra time.
Here's the basic usage for use with bwa:
(long bwa command to create alignment) | sorter > sorted.sam
Or if you prefer bam output:
(long bwa command to create alignment) | sorter | samtools view -Sb - > sorted.bam
For big alignments this can easily shave a substantial amount of time from the pipeline. Enjoy! Let me know if you find a bug or have other feedback.
I recently developed a fast stream-based .SAM sorter, streamsorter. It reads .SAM output from a stream (for instance, produced by bwa or another aligner), sorts the reads as they come in, and emits everything to standard out. Because this happens during alignment, and sorting is much faster than aligning, sorting takes essentially no extra time.
Here's the basic usage for use with bwa:
(long bwa command to create alignment) | sorter > sorted.sam
Or if you prefer bam output:
(long bwa command to create alignment) | sorter | samtools view -Sb - > sorted.bam
For big alignments this can easily shave a substantial amount of time from the pipeline. Enjoy! Let me know if you find a bug or have other feedback.
Comment