Hello,
I am wanting to use a curate exposures job but I am not sure on how to do this via a script. I looked through the T20S extensive workflow script (curate exposures section is below) and I am not sure how/where I would give values for ‘total motion’ or ‘CTF fit to A’ as a parameter to filter the micrographs .
Can you offer some advice on how to do this?
# connect rigid motion and ctf estimation to exposure curation
juids['curate_exposures'] = cli.make_job(
job_type='curate_exposures',
title='bench/curate_exposures{}/{}'.format(suffix, run_count),
project_uid=puid,
workspace_uid=wuid,
user_id=uuid,
created_by_job_uid=workflow_juid,
input_group_connects={'exposures': parent_input_group},
enable_bench=True)
time.sleep(0.3)
cli.enqueue_job(puid, juids['curate_exposures'], lane)
# ---- interactive exposure curation
# wait for job to be ready
jstatus = rc.wait_job_status(puid, juids['curate_exposures'], ['waiting'], timeout=120)
assert jstatus == 'waiting', "Curate exposures did not start within 120 seconds!"
# the following will error if the response is not JSON-able:
fieldsres = cli.interactive_post(puid, juids['curate_exposures'], 'get_fields_and_thresholds', {})
cli.interactive_post(puid, juids['curate_exposures'], 'modify_all', {'value': False})
cli.interactive_post(puid, juids['curate_exposures'], 'modify_selection', {'value': True})
fields = fieldsres['fields']
field = rc.com.query(fields, lambda f: f['name'] == 'idx')
field['active'] = True
field['thresholds'][1] = 9
cli.interactive_post(puid, juids['curate_exposures'], 'set_thresholds', {'fields':fields})
counts = cli.interactive_post(puid, juids['curate_exposures'], 'get_counts', {})
assert counts['total'] == 20
assert counts['total_accepted'] == 20
assert counts['total_selected'] == 10
# now finish job
cli.interactive_post(puid, juids['curate_exposures'], 'shutdown', {})
jstatus = rc.wait_job_status(puid, juids['curate_exposures'], ['completed'], timeout=120)
assert jstatus == 'completed', "Curate exposures did not finish within 120 seconds!"
Thanks,
Kye