Write a legend file of the sample name and the label used to refer to it