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

From one task with multiple output to many tasks with single output #77

Open
felixeye opened this issue Aug 9, 2016 · 0 comments
Open

Comments

@felixeye
Copy link

felixeye commented Aug 9, 2016

Hi,
I am having a little issue figuring out how to solve the following problem. Hope to get some helpful ideas from you guys. Please let me know if this is not the right place to ask this question.

The problem is the following:
I have a task (let's call it task4) that outputs 3 files, let's say file_A.txt, file_B.txt, file_C.txt. I would like the next task to process all these files one by one (one task per file).

Small Example to make it clear,

...
@transform(task4, 
    regex(r"(.+)\.txt$"), 
    [
        r"\1.5", #file_A.5
        r"\1.5", #file_B.5
        r"\1.5", #file_C.5
    ]
)
def task5(in_files, out_files):
    """out_files contains [file_A.X, file_B.X,file_C.X]"""
    pass

@transform(task5, suffix(".X"), ".Y")
def task6(in_files, out_files):
   """
    this task will be called once with
    in_files => [file_A.X, file_B.X,file_C.X]
    and I would like to have 3 calls with
    task6 file_A.X => file_A.Y
    task6 file_B.X => file_B.Y
    task6 file_C.X => file_C.Y
   """
   pass
...

I am using ruffus 2.6.3.
Thank you for your help.

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