Add function to subset samples
Add subset samples tests