Sort sample names before submitting jobs