Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with Ruffus 2.8.1 and gevent library not present (ant-login) #4

Closed
webermarcolivier opened this issue Feb 27, 2019 · 1 comment

Comments

@webermarcolivier
Copy link
Collaborator

webermarcolivier commented Feb 27, 2019

Important Note: I had to downgrade from ruffus 2.8.1 to 2.6.3 because of bad handling of the gevent library. Running the pipeline on the cluster environment, I kept getting the following error:

Original exception:

    Exception #1
      'builtins.NameError(name 'gevent' is not defined)' raised in ...
       Task = def filter_alignments(...):
       Job  = [Task04_convert_sam_to_bam/WT_R2_16424_ACTTGA_sorted.bam -> [Task05_filter_alignments/WT_R2_16424_ACTTGA.filtered.bed, Task05_filter_alignments/WT_R2_16424_ACTTGA.filtered.bed.nreads], WT_R2_16424_ACTTGA, Task04_convert_sam_to_bam, Task05_filter_alignments, filter_alignments, <LoggingProxy>, <unlocked _thread.lock>]
    
    Traceback (most recent call last):
      File "/nfs/users/lserrano/mweber/Software/python/envs/.virtualenvs/python351/lib/python3.5/site-packages/ruffus/task.py", line 712, in run_pooled_job_without_exceptions
        register_cleanup, touch_files_only)
      File "/nfs/users/lserrano/mweber/Software/python/envs/.virtualenvs/python351/lib/python3.5/site-packages/ruffus/task.py", line 544, in job_wrapper_io_files
        ret_val = user_defined_work_func(*params)
      File "/users/lserrano/mweber/bin/roesti/pipeline_roesti", line 1101, in filter_alignments
        job_other_options=job_other_options, retain_job_scripts=False)
      File "/nfs/users/lserrano/mweber/Software/python/envs/.virtualenvs/python351/lib/python3.5/site-packages/ruffus/drmaa_wrapper.py", line 581, in run_job
        verbose, resubmit, pipeline)
      File "/nfs/users/lserrano/mweber/Software/python/envs/.virtualenvs/python351/lib/python3.5/site-packages/ruffus/drmaa_wrapper.py", line 350, in run_job_using_drmaa
        cmd_str, drmaa_session, job_template, logger, pipeline)
      File "/nfs/users/lserrano/mweber/Software/python/envs/.virtualenvs/python351/lib/python3.5/site-packages/ruffus/drmaa_wrapper.py", line 239, in submit_drmaa_job
        gevent.sleep(GEVENT_TIMEOUT_STARTUP)
    NameError: name 'gevent' is not defined

I don't know why but ruffus 2.8.1 seems to have implemented the optional gevent package. In the drmaa_wrapper.py file, the presence of the library is first test,

try:
    import gevent
    HAVE_GEVENT = True
except ImportError:
    HAVE_GEVENT = False

but afterwards a simple try statement is not catching correclty the NameError exception, in function submit_drmaa_job:

try:
        gevent.sleep(GEVENT_TIMEOUT_STARTUP)
except JobSignalledBreak:
        # ...
@webermarcolivier
Copy link
Collaborator Author

fixed by installing package gevent,

conda install gevent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant