Sort samples by metainf.