EdinburghGenomics / pyclarity-lims

Python interface to the GenoLogics LIMS server via its REST API.
MIT License
11 stars 5 forks source link

Unable to read some UDFs #29

Closed dbarrell closed 6 years ago

dbarrell commented 6 years ago

Hi,

I am trying to get 'Diluent Volume' out of Clarity LIMs using pyclarity-lims. I can see the UDF if I query the REST API:

57.84 2 2.615 1 8 7.23 7.23 However, I can only return the following UDFs: {'Desired Concentration': 2.0, '03_I_StockVolume': u'8', 'Volume to be diluted': 1.0, '01_I_QB_Concentration': u'7.23'} The code I am using looks like this: ``` for sample in samples: for outart in process.result_files(): file_sample = outart.samples[0].name if file_sample == sample.name: print outart.udf ``` Anyone see where I am going wrong? The 'Diluent Volume' is set by running a script with trigger_program(). Thanks Dan
tcezard commented 6 years ago

It might be that the outart was downloaded and cached before trigger_program was run. You'll need to ensure that it get downloaded again after that by calling:

outart.get(force=True)

Another possibility is that the program has not finish yet in since trigger_program will not wait for completion of the program to return. See this example

dbarrell commented 6 years ago

Thanks, that's got it. I was doing process.get(force=True), which obviously wasn't on the right level.