Refactor protein interaction query (untested)