refactor query builder to prepare for explicit support for parasitic interactions
add explicit support for parasitic interactions