I'm trying (for the first time) to set up dynamic resource allocation for some jobs on a local Galaxy instance. I've read the docs here and can get a toy example working, but I know very little Python and don't fully understand how to access the job parameters from within the rules script. The tool is the phyml wrapper - there's a pruned-down snippet here. My rules file looks like this:
from galaxy.jobs import JobDestination
import os
def phyml(job):
# Allocate extra time/cores to bootstrap jobs
#support = job.parameters.???? - how to access branchSupport value?
#if support > 0:
#param_str = "-l walltime=168:00:00 -l nodes=1:ppn=60 -q batch"
#else:
param_str = "-l walltime=24:00:00 -l nodes=1:ppn=1 -q batch"
return JobDestination(runner="torque", params={"nativeSpecification": param_str})
This works but obviously doesn't do any actual decision-making as is, and even though I'm sure it's very basic python I can't figure out the correct syntax to access the "branchSupport" value from the job. I'd greatly appreciate any help.
Thanks, Jeremy