set_ranks function

Set ranks for samples