You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First execution of example code appears to work using Spyder 2.3.8 and Python 2.7.11 64bits, however it fails on subsequent tries. The only way to clear the error is to restart the Console. It's not clear if this is a Spyder issue or if it could be resolved within ruffus. Nonetheless, It has been off-putting to see the example code fail right out of the box using a popular IDE.
Code
starting_files= ["a.fasta", "b.fasta", "c.fasta"]
forffinstarting_files:
open(ff, "w")
fromruffusimport*## STAGE 1 fasta->sam#@transform(starting_files, # Input = starting filessuffix(".fasta"), # suffix = .fasta".sam") # Output suffix = .samdefmap_dna_sequence(input_file,
output_file):
ii=open(input_file)
oo=open(output_file, "w")
## STAGE 2 sam->bam#@transform(map_dna_sequence, # Input = previous stagesuffix(".sam"), # suffix = .sam".bam") # Output suffix = .bamdefcompress_sam_file(input_file,
output_file):
ii=open(input_file)
oo=open(output_file, "w")
## STAGE 3 bam->statistics#@transform(compress_sam_file, # Input = previous stagesuffix(".bam"), # suffix = .bam".statistics", # Output suffix = .statistics"use_linear_model") # Extra statistics parameterdefsummarise_bam_file(input_file,
output_file,
extra_stats_parameter):
""" Sketch of real analysis function """ii=open(input_file)
oo=open(output_file, "w")
# On Windows you have to use the main module for "freeze_support() if__name__=='__main__':
pipeline_run()
produces error:
>>> runfile('C:/Users/dayton5/Documents/pipeline/my_first_pipline.py', wdir='C:/Users/dayton5/Documents/pipeline')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "C:\Users\dayton5\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile
> execfile(filename, namespace)
> File "C:\Users\dayton5\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 74, in execfile
> exec(compile(scripttext, filename, 'exec'), glob, loc)
> File "C:/Users/dayton5/Documents/pipeline/my_first_pipline.py", line 18, in <module>
> ".sam") # Output suffix = .sam
> File "C:\Users\dayton5\AppData\Local\Continuum\Anaconda2\lib\site-packages\ruffus\task.py", line 321, in __call__
> task = main_pipeline._create_task(task_func)
> File "C:\Users\dayton5\AppData\Local\Continuum\Anaconda2\lib\site-packages\ruffus\task.py", line 962, in _create_task
> return Task(task_func, task_name, self)
> File "C:\Users\dayton5\AppData\Local\Continuum\Anaconda2\lib\site-packages\ruffus\task.py", line 1961, in __init__
> "same pipeline (%s)" % (task_name, self.pipeline.name))
> ruffus.ruffus_exceptions.error_duplicate_task_name:
>
>
> Same task name map_dna_sequence specified multiple times in the same pipeline (main)
The text was updated successfully, but these errors were encountered:
Changing the Run Settings in Spyder to execute my_pipeline.py in a new dedicated python console every time it was run resolved the annoyance of restarting the python console manually.
First execution of example code appears to work using Spyder 2.3.8 and Python 2.7.11 64bits, however it fails on subsequent tries. The only way to clear the error is to restart the Console. It's not clear if this is a Spyder issue or if it could be resolved within ruffus. Nonetheless, It has been off-putting to see the example code fail right out of the box using a popular IDE.
Code
produces error:
The text was updated successfully, but these errors were encountered: