fix sample_id conditionals for metadata template generation