added function for filtering tables, partially addresses #65
ENH: improved filtering, fixed bug where wrong samples were being compared within a study