minor refactor to remove duplication of getting assay ids and relationship types

for data_file_controller