set sort order in BamMergeTemplate class according to input data