the sorting between the samtools and picard differs in extreme cases, samtools gives different priorities at fields than picard and that if we compare SAMRecordCoordinateComparator with the analogous of samtools
As it seems those tools do not produce the same output and when we are to use mpileup later this mplileup result differs from sort to sort. The question is here, that each tool uses different fields as priorities to sort bam/sam files by coordinates. The question here which one you think is appropriate to use and why.
1 answer
use samtools : faster, widely used. sorting should be the same unless you're sorting on query name.
Since mpileup is from samtools it makes sense to stick with the same tool for sorting. Yes, there might be some edge-case differences but this always exists if you you two different tools for the same task. Use samtools, as Pierre Lindenbaum says it is more common, faster, and by far not as picky as Picard.
Thank you very much both for your answers, I will stick with samtools.
Log in to answer this question.