Task_Cluster_Job Script::: Ruffus and Rubra Infrstructure

39 views
Skip to first unread message

Olabode Ajayi

unread,
Mar 10, 2016, 6:03:31 AM3/10/16
to ruffus_discuss
Good day all,

I am currently adapting and reproducing a variants calling python scripts, and why trying to understand how the script works. I started getting errors regarding rubra and ruffus PBS/SGE, a cluster_job.py. Our SANBI cluster uses SGE torque and I don't know how I will go about editing the Rubra Cluster_job.py script. Maybe, there is better way to modify the rubra cluster_job.py script for SGE configuration.


 The following are the errors I am getting when I run the scripts and I set the config_field for job distribution on cluster to be True.


Symlinked files that will be used:
/cip0/research/ajayi/workflows/example_data/output_wgs/fastq_symlinks/NA12878wgs_20FUKAAXX_L6_1.fastq.gz
/cip0/research/ajayi/workflows/example_data/output_wgs/fastq_symlinks/NA12878wgs_20FUKAAXX_L6_2.fastq.gz

Output dir is /cip0/research/ajayi/workflows/example_data/output_wgs
Log dir is log_example_wgs

stage = fastqc, jobID = Your job 7493843 ("tmpXL92BT") has been submitted
stage = fastqc, jobID = Your job 7493842 ("tmpihkNU0") has been submitted


Traceback (most recent call last):
  File "/usr/local/bin/rubra", line 9, in <module>
    load_entry_point('Rubra==0.1.5', 'console_scripts', 'rubra')()
  File "build/bdist.linux-x86_64/egg/rubra/rubra.py", line 66, in main
  File "build/bdist.linux-x86_64/egg/ruffus/task.py", line 2680, in pipeline_run
ruffus.ruffus_exceptions.RethrownJobError: 
    
    Exceptions running jobs for
    
    'def pipeTest.fastqc(...):'
    
    Original exceptions:
    
    Exception #1
    exceptions.Exception(qstat -f Your job 7493842 ("tmpihkNU0") has been submitted
     returned non-zero exit status 5 times,                             panicking):
    for pipeTest.fastqc.Job = [NA12878wgs_20FUKAAXX_L6_1.fastq.gz -> [NA12878wgs_20FUKAAXX_L6_1_fastqc, NA12878wgs_20FUKAAXX_L6_1.fastqc.Success]]
    
    Traceback (most recent call last):
      File "build/bdist.linux-x86_64/egg/ruffus/task.py", line 517, in run_pooled_job_without_exceptions
        return_value =  job_wrapper(param, user_defined_work_func, register_cleanup, touch_files_only)
      File "build/bdist.linux-x86_64/egg/ruffus/task.py", line 447, in job_wrapper_io_files
        ret_val = user_defined_work_func(*param)
      File "pipeTest.py", line 121, in fastqc
        runStageCheck('fastqc', flagFile, fastqc_dir, sequence)
      File "build/bdist.linux-x86_64/egg/rubra/utils.py", line 128, in runStageCheck
        status = runStage(stage, *args)
      File "build/bdist.linux-x86_64/egg/rubra/utils.py", line 144, in runStage
        exitStatus = distributedCommand(stage, commandStr, pipeline_options)
      File "build/bdist.linux-x86_64/egg/rubra/utils.py", line 122, in distributedCommand
        return script.runJobAndWait(stage, logDir, verbosity)
      File "build/bdist.linux-x86_64/egg/rubra/cluster_job.py", line 72, in runJobAndWait
        return self.waitForJobCompletion(jobID)
      File "build/bdist.linux-x86_64/egg/rubra/cluster_job.py", line 56, in waitForJobCompletion
        isFinished, exitCode = self.isJobCompleted(jobID)
      File "build/bdist.linux-x86_64/egg/rubra/cluster_job.py", line 32, in isJobCompleted
        panicking" % (jobID, count))
    Exception: qstat -f Your job 7493842 ("tmpihkNU0") has been submitted
     returned non-zero exit status 5 times,                             panicking
    
    
    Exception #2
    exceptions.Exception(qstat -f Your job 7493843 ("tmpXL92BT") has been submitted
     returned non-zero exit status 5 times,                             panicking):
    for pipeTest.fastqc.Job = [NA12878wgs_20FUKAAXX_L6_2.fastq.gz -> [NA12878wgs_20FUKAAXX_L6_2_fastqc, NA12878wgs_20FUKAAXX_L6_2.fastqc.Success]]
    
    Traceback (most recent call last):
      File "build/bdist.linux-x86_64/egg/ruffus/task.py", line 517, in run_pooled_job_without_exceptions
        return_value =  job_wrapper(param, user_defined_work_func, register_cleanup, touch_files_only)
      File "build/bdist.linux-x86_64/egg/ruffus/task.py", line 447, in job_wrapper_io_files
        ret_val = user_defined_work_func(*param)
      File "pipeTest.py", line 121, in fastqc
        runStageCheck('fastqc', flagFile, fastqc_dir, sequence)
      File "build/bdist.linux-x86_64/egg/rubra/utils.py", line 128, in runStageCheck
        status = runStage(stage, *args)
      File "build/bdist.linux-x86_64/egg/rubra/utils.py", line 144, in runStage
        exitStatus = distributedCommand(stage, commandStr, pipeline_options)
      File "build/bdist.linux-x86_64/egg/rubra/utils.py", line 122, in distributedCommand
        return script.runJobAndWait(stage, logDir, verbosity)
      File "build/bdist.linux-x86_64/egg/rubra/cluster_job.py", line 72, in runJobAndWait
        return self.waitForJobCompletion(jobID)
      File "build/bdist.linux-x86_64/egg/rubra/cluster_job.py", line 56, in waitForJobCompletion
        isFinished, exitCode = self.isJobCompleted(jobID)
      File "build/bdist.linux-x86_64/egg/rubra/cluster_job.py", line 32, in isJobCompleted
        panicking" % (jobID, count))
    Exception: qstat -f Your job 7493843 ("tmpXL92BT") has been submitted
     returned non-zero exit status 5 times,                             panicking



Perhaps, Is there something I was doing wrong become as its stand now. I am very retard in debugging.

Here is a link to Rubra cluster.py script: https://github.com/bjpop/rubra/blob/master/rubra/cluster_job.py

Here is also setting for my pipeline_stage_config.py:

stageDefaults = {
    'distributed': True,
    'queue': None,
    'walltime': "01:00:00",
    'memInGB': 8,
     'modules': [
        "bwa/bwa-0.7.8",
        "samtools/samtools-0.1.19",
        "python-gcc/2.7.6",
        "picard-tools/picard-tools-1.115"
     ]
}

# stages should hold the details of each stage which can be called by runStageCheck.
# This section is required for every Rubra pipeline.
# Calling a stage in this way carries out checkpointing and, if desired, batch job
# submission. 
# Each stage must contain a 'command' definition. See stageDefaults above for other 
# allowable options.
stages = {
    "fastqc": {
        "command": "fastqc --quiet -o %outdir %seq",
        'modules': [ "fastqc/0.11.4" ]
    },
    "bwaMemPE": {
        "command": "bwa mem -t 8 %meta %ref %seq1 %seq2 > %out",
        'walltime': "3:00:00",
        'queue': 'long.q',


I would appreciate your input.

Thank you,

Ajayi


Leo Goodstadt 顧維斌

unread,
Mar 10, 2016, 6:52:20 PM3/10/16
to ruffus_...@googlegroups.com
Hi Ajayi,
It looks like your fastqc command is not working. Have you tried running the command manually to see if it works? I am afraid I am not familiar enough with rubra to say much more. 
This is Bernie (Pope)'s baby, I think?

Leo

--
You received this message because you are subscribed to the Google Groups "ruffus_discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruffus_discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Bernard James Pope

unread,
Mar 11, 2016, 12:23:59 AM3/11/16
to ruffus_...@googlegroups.com
Hi Ajayi,

Thanks for responding Leo.

I'm not sure what is the cause of the problem. However, it could an incompatibility with SGE, which I've never used.

Having said that, we are not using rubra any more, because newer versions of ruffus have included many great features which make rubra more-or-less redundant.

If you want to see what an example of our ruffus pipelines look like these days, here is one for variant calling:

https://github.com/bjpop/complexo_pipeline

Note: this is from my own work, built on top of ruffus. You are welcome to use it if it suits your purposes. However, I probably don't have a lot of resources for trouble-shooting.

Cheers,
Bernie
Reply all
Reply to author
Forward
0 new messages