Sorts the appropiate samplename to data