Wildcards whilst specifying explicit paths.

10 views
Skip to first unread message

ben curran

unread,
Mar 3, 2019, 9:16:17 PM3/3/19
to bpipe-discuss
Does anyone know if it's possible to use wildcards whilst specifying explicit paths?

I have some initial stages, that I want done to every file, i.e. qc, trimming, alignment, removing duplicates etc. About halfway through the pipeline, I want to switch from using patterns to select input, to using explicit names so I can specify certain comparisons.

i.e. at the moment my run command looks like:
run {
   "%_*.fastq.gz" * [trim] + "%_*.trim" * [align] + "%_*" * [removeDuplicates] + "%_*" * [removeSuppplementary]
}

If I have samples
P1001A
P1001B
P1003A
P1003B
P1003C
P1003D

and I want to compare the A (normal) samples to each of the rest from the corresponding samples. I was rather hoping that the following would work, but, ...

def branches = [
    sample1: ["P1001A_*", "P1001B_*"  ],
    sample1: ["P1003A_*", "P1003B_*"  ],
    sample1: ["P1003A_*", "P1003C_*"  ],
    sample1: ["P1003A_*", "P1003D_*"  ]
]

run {
   "%_*.fastq.gz" * [trim] + "%_*.trim" * [align] + "%_*" * [removeDuplicates] + "%_*" * [removeSuppplementary] + branches * [pileUp] + "%_*" *[annotation]
}

It looks like as soon as I get to specifying the individual comparisons, the tracking of the input/output breaks and I have to specify the full path of the input files? If I put the full path - not just the name of the output files from the previous step, it works. I'd like to be able to just select all the comparisons by number/letter combo regex if possible though.

Any thoughts?

Ben.
Reply all
Reply to author
Forward
0 new messages