Hi!
I noticed this in the picard MergeSamFiles help:
--SORT_ORDER,-SO:SortOrder Sort order of output file Default value: coordinate. Possible values: {unsorted, queryname, coordinate, duplicate, unknown}
Does this mean that it is unnecessary to use picard SortSam before? can MergeSamFiles do the same job?
if so, is it faster to do the sorting together with merging in MergeSamFiles or is it better to do run Sortsam first?
thanks in advance!
best / Jonas
If you're merging a set of sorted SAM/BAM files, you will get a sorted file in the end. So no need to sort it then.
If you're merging (basically concatenating) unsorted files, you'll have to sort it after.
You can check if the file is sorted by indexing it with
samtools