-
-
Save lparsons/a4724b51afd9027e3c0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from galaxy.jobs import JobDestination | |
import os | |
import ast | |
from pprint import pprint | |
def bowtie2_wrapper(job): | |
pprint(dir(job)) | |
pprint(job.get_parameters()) | |
for jp in job.get_parameters(): | |
if jp.name == "analysis_type": | |
pprint(jp.value) | |
jpv = ast.literal_eval(jp.value) | |
ro = jpv.get("reporting_options") | |
if ro is not None: | |
ros = ro.get("reporting_options_selector") | |
if ros == "a": | |
return 'multicore_local' | |
if ros == "k": | |
k = ro.get("k") | |
print("k = %s" % k) | |
try: | |
kval = int(k) | |
if kval >= 40: | |
return 'multicore_local' | |
except ValueError: | |
pass | |
return 'local' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment