EdinburghGenomics / pyclarity-lims

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

Retrieval of UDFs #46

Closed dbarrell closed 5 years ago

dbarrell commented 5 years ago

Hi,

I am doing the following but it is very slow:

# Get the the values generated from the 'Calculate DNA Mass' macro
for sample in samples:
    for target_file in process.result_files():
        target_file.get(force=True)  # Does not find it unless force a GET
        file_sample = target_file.samples[0].name
        if file_sample == sample.name:
              print target_file.udf['01_O_TS_Region1Mass']

Is there a different logic I should follow to get the UDFs?

Thanks

Daniel

tcezard commented 5 years ago

Daniel, This is not the right place to ask script logic questions. In general you need to use the batch query to speed up your scripts and that means getting he two lists you want to compare separately, batch retrieve them then see which one matches. Also you might want to look at the udf parameter in lims.get_artifacts