Closed dbarrell closed 5 years ago
I didn't have time to look into it but the first thing that comes to mind is that you should upload the pool before advancing the step
step.pools.pooled_inputs = output_pools
step.pools.put()
step.advance()
That certainly has got me a bit further, I now have the number of samples mentioned in Lab View, whereas there was a zero before. However, I still get requests.exceptions.HTTPError: 400: Unpooled inputs exist
and upon clicking on the Work In Progress entry I'm still at the 'Samples Waiting for Pooling' stage. So close...
Note, I had to also use step.pools.get(force=True)
else I get:
requests.exceptions.HTTPError: 400: cvc-complex-type.3.2.2: Attribute 'uri' is not allowed to appear in element 'pool'.
It seems I don't actually upload the pooled_inputs:
print output_pools
step.pools.pooled_inputs = output_pools
step.pools.put()
print step.pools.pooled_inputs
The printed output_pools look like this:
{'27-8838': (Container(https://cegx-test.claritylims.com/api/v2/containers/27-8838),
(Artifact(https://cegx-test.claritylims.com/api/v2/artifacts/SHE1725A4PA1),
Artifact(https://cegx-test.claritylims.com/api/v2/artifacts/SHE1725A1PA1),
Artifact(https://cegx-test.claritylims.com/api/v2/artifacts/SHE1725A3PA1),
Artifact(https://cegx-test.claritylims.com/api/v2/artifacts/SHE1725A2PA1)
)),
'27-8839': (Container(https://cegx-test.claritylims.com/api/v2/containers/27-8839),
(Artifact(https://cegx-test.claritylims.com/api/v2/artifacts/SHE1725A8PA1),
Artifact(https://cegx-test.claritylims.com/api/v2/artifacts/SHE1725A5PA1),
Artifact(https://cegx-test.claritylims.com/api/v2/artifacts/SHE1725A7PA1),
Artifact(https://cegx-test.claritylims.com/api/v2/artifacts/SHE1725A6PA1))
)}
And when I print out the step.pools.pooled_inputs
I get an empty dictionary:
{}
I've had a deeper look and it seems that the current implementation won't support setting new pools from scratch. The pool is an Artifact not a container but when it is sent, it does not exist yet. I'll have to change the code to support this type of behaviour.
I see, thanks for looking into it. Maybe I can mock up the artifact in the meantime to make sure it exists beforehand?
Hi all, (Edited from my original post, earlier today, because I was using the wrong data structure for StepPools.pooled_inputs) Not an issue for you, rather for me! I'm trying to pool 2 plates into 2 tubes. First I create the two pools, set up the step and add the Illumina indexes to the tubes, I think I'm all set here, so you can probably ignore this:
The issue comes when I try and pool the plates. I create a data structure and try and assign this to step.pools.pooled_inputs, thus:
The error I get is:
I think I've got the data structure correct for StepPools.pooled_inputs. I'm thinking it must be the caching of the artifacts. Can anyone see where I've gone wrong?
Thanks!