-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
I'm not sure that the APIClient.tailor_to
behavior is correct. Below is the current function body. It seems to be retrieving a gate by its gate_id
, changing its fcs_file_id
and then making a PATCH call to the experiments/exp_id/gates/gate_id
endpoint with the updated property. My understanding is that this would just reassign (as in move) a tailored gate from one sample to another, but that is most likely NOT what the expected behavior would be (we would expect a copy, not a move).
On the CellEngine WebApp, the API endpoint used for applying tailoring of a gate from one sample to another sample (or to multiple other samples) is a POST to the experiments/exp_id/gates/applytailored
endpoint.
def tailor_to(self, experiment_id, gate_id, fcs_file_id):
"""Tailor a gate to a file."""
gate = self.get_gate(experiment_id, gate_id)
gate._properties["tailoredPerFile"] = True
gate._properties["fcsFileId"] = fcs_file_id
return self.update_entity(experiment_id, gate_id, "gates", gate._properties)