autoprotocol/autoprotocol-python

Destination of containers when using harness.py

bmiles opened this issue · 3 comments

Hi I'm using harness.py to package up protocols to use on Transcriptic.

When a user specifies a container in the dialogue window, where the container is used in the protocol like so:

# protocol.py
solid_culture_plate = params.solid_culture_plate
# manifest.json

"inputs": {
        "solid_culture_plate": {
          "type": "container",
          "description": "Choose the container to plate the bacteria into"
        }
}

Where is the storage location specified for this container in the protocol?

I think it might be in harness.py:

class ProtocolInfo(object):
    def __init__(self, json):
        self.input_types = json['inputs']

    def parse(self, protocol, inputs):
        refs = inputs['refs']
        params = inputs['parameters']

        for name in refs:
            ref = refs[name]
            c = protocol.ref(
                name,
                ref.get('id'),
                ref['type'],
                storage=ref.get('store'),
                discard=ref.get('discard'))
            aqs = ref.get('aliquots')
            if aqs:
                for idx in aqs:
                    aq = aqs[idx]
                    c.well(idx).set_volume(aq['volume'])
                    if "properties" in aq:
                        c.well(idx).set_properties(aq.get('properties'))

        out_params = {}
        for k in self.input_types:
            typeDesc = self.input_types[k]
            out_params[k] = convert_param(protocol, params.get(k), typeDesc)

        return out_params

But I could be wrong. Maybe storage=ref.get('store')?

The problem I have is that I am running protocols with samples originally stored at cold_4 but it is storing them at ambient after the protocol has executed and I need to fix this.

Thanks for your help, apologies in advance if I missed something, I tried to learn what I could from the source.

Hey Ben,

We're working on this right this second, will update you when it's fixed. It's partly something in the web app I believe, because you're right, it's getting your inputted container's storage condition from the line you pointed out in harness.py.

That's great thanks, Tali. I was looking into writing a setStorage function to get around it, so that will save me some time 🙌

solved by Protocol.store() in v2.2.2